diff options
| author | secondl1ght <[email protected]> | 2022-08-25 10:57:24 -0400 |
|---|---|---|
| committer | secondl1ght <[email protected]> | 2022-08-25 10:57:24 -0400 |
| commit | 824de42415aa097ff5c04af8a9c2c56234fdc26c (patch) | |
| tree | d544ea37a9ed5ab24d9123ba66e72fd8f5a9ad71 /src | |
| parent | 4a95796c4fe85c8550c124523c0e474a5396b884 (diff) | |
| download | coinos-ui-824de42415aa097ff5c04af8a9c2c56234fdc26c.tar.gz coinos-ui-824de42415aa097ff5c04af8a9c2c56234fdc26c.zip | |
bug fixes on receive page
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/[username]/receive/+page.svelte | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/routes/[username]/receive/+page.svelte b/src/routes/[username]/receive/+page.svelte index c588bbe0..c1af8465 100644 --- a/src/routes/[username]/receive/+page.svelte +++ b/src/routes/[username]/receive/+page.svelte @@ -14,18 +14,20 @@ $: amount = useFiat ? Math.round(amountFiat / ($selectedRate / 100000000)) : amountSats; $: $invoiceAmount = parseInt( - amountSats === 0 ? amountFiat / ($selectedRate / 100000000) : amountSats + amountSats === 0 || amountSats === '0' ? amountFiat / ($selectedRate / 100000000) : amountSats ); + $: $invoiceAmountFiat = parseInt( amountFiat === 0 ? amountSats * ($selectedRate / 100000000) : amountFiat ); + $: amountSatsFormatted = new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format( amountSats ); $: amountFiatConverted = new Intl.NumberFormat('en-US', { style: 'currency', - currency: $user.currency + currency: $user ? $user.currency : 'USD' }).format(amountSats * ($selectedRate / 100000000)); $: amountSatsConverted = new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format( |
