diff options
| author | Adam Soltys <[email protected]> | 2025-11-26 10:56:00 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 15:33:08 -0800 |
| commit | 5f1c31b6618f0b895fb98c8f2a841989625eaf16 (patch) | |
| tree | 668a3cddaacbb03a1f3b5fdcf8700e49674dada0 /src/routes/(app)/invoice | |
| parent | 21023052918c0b787916ef78937e0be41f46142a (diff) | |
| download | coinos-ui-5f1c31b6618f0b895fb98c8f2a841989625eaf16.tar.gz coinos-ui-5f1c31b6618f0b895fb98c8f2a841989625eaf16.zip | |
ark
Diffstat (limited to 'src/routes/(app)/invoice')
| -rw-r--r-- | src/routes/(app)/invoice/[id]/+layout.server.ts | 1 | ||||
| -rw-r--r-- | src/routes/(app)/invoice/[id]/+page.svelte | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/routes/(app)/invoice/[id]/+layout.server.ts b/src/routes/(app)/invoice/[id]/+layout.server.ts index ab41dddc..a18dad4e 100644 --- a/src/routes/(app)/invoice/[id]/+layout.server.ts +++ b/src/routes/(app)/invoice/[id]/+layout.server.ts @@ -11,6 +11,7 @@ export async function load({ cookies, depends, params, url, parent }) { if (id) { invoice = await get(`/invoice/${id}`); + console.log("INV", invoice); const options = !!url.searchParams.get("options"); let { amount, pending, received } = invoice; amount = parseInt(amount); diff --git a/src/routes/(app)/invoice/[id]/+page.svelte b/src/routes/(app)/invoice/[id]/+page.svelte index 29dd815d..30fa3dce 100644 --- a/src/routes/(app)/invoice/[id]/+page.svelte +++ b/src/routes/(app)/invoice/[id]/+page.svelte @@ -1,4 +1,5 @@ <script> + import { getWallet } from "$lib/ark"; import { enhance } from "$app/forms"; import { send } from "$lib/socket"; import { @@ -8,6 +9,7 @@ copy, f, fail, + success, get, types, sat, @@ -97,6 +99,12 @@ if (typeof newAmount !== "undefined") invoice.amount = newAmount; invoice.address_type = address_type; invoice.type = type; + + if (type === "ark") { + const wallet = await getWallet(); + invoice.hash = await wallet.getAddress(); + } + await update(); } settingType = false; |
