diff options
| author | Adam Soltys <[email protected]> | 2024-11-08 22:59:34 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-08 22:59:39 -0800 |
| commit | c37ec8a0ad4fc1342de7277e789cbf1a506ea4cf (patch) | |
| tree | a65c0df68fcf47d3d97877e43b8d6a5c244bf654 /src/routes | |
| parent | 9fb49a6a61239ac30d6b85befc4f33a5f3469611 (diff) | |
| download | coinos-ui-c37ec8a0ad4fc1342de7277e789cbf1a506ea4cf.tar.gz coinos-ui-c37ec8a0ad4fc1342de7277e789cbf1a506ea4cf.zip | |
fix invoice variables
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/(app)/invoice/[id]/+page.svelte | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/routes/(app)/invoice/[id]/+page.svelte b/src/routes/(app)/invoice/[id]/+page.svelte index 29684703..c87d972b 100644 --- a/src/routes/(app)/invoice/[id]/+page.svelte +++ b/src/routes/(app)/invoice/[id]/+page.svelte @@ -26,18 +26,11 @@ let readingerror = (e) => console.log("nfc error", e); - let { invoice, id, subject, user } = $state(data); - let src = $derived(data.src); - let { - aid, - amount, - hash, - type, - rate, - text, - tip, - user: { username, currency }, - } = $state(invoice); + let { id, subject, user } = $state(data); + let { invoice, src } = $derived(data); + let { hash, text } = $derived(invoice); + let { aid, amount, type, rate, tip } = $state(invoice); + let { username, currency } = invoice.user; let tipPercent = $derived(tip ? (tip / amount) * 100 : 0); @@ -102,6 +95,7 @@ let link = $derived( [types.bitcoin, types.liquid].includes(type) ? text : `lightning:${text}`, ); + let txt = $derived( [types.bitcoin, types.liquid].includes(type) ? hash : text, ); |
