diff options
| author | Adam Soltys <[email protected]> | 2022-10-06 02:57:39 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-06 02:57:39 -0700 |
| commit | 8c8779162bf003ab65e2a6361d51ea0bc75092f3 (patch) | |
| tree | 1be4a8731fe5e2bbd9f2ab3cf5c05c7d171c5474 /src/routes/sent | |
| parent | 7e925d8c5fb7f732093b3736bc6e837bf60adfe1 (diff) | |
| download | coinos-ui-8c8779162bf003ab65e2a6361d51ea0bc75092f3.tar.gz coinos-ui-8c8779162bf003ab65e2a6361d51ea0bc75092f3.zip | |
handle internal payments better
Diffstat (limited to 'src/routes/sent')
| -rw-r--r-- | src/routes/sent/+page.svelte | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/routes/sent/+page.svelte b/src/routes/sent/+page.svelte index f79166e4..95612a17 100644 --- a/src/routes/sent/+page.svelte +++ b/src/routes/sent/+page.svelte @@ -1,4 +1,5 @@ <script> + import { f, s, sats } from '$lib/utils'; import { scale } from 'svelte/transition'; import { Icon } from '$comp'; import { toast } from '@zerodevx/svelte-toast'; @@ -7,6 +8,12 @@ export let data; let { user } = data; + let payment = user.payments[0]; + let { amount, rate } = payment; + amount = Math.abs(amount); + + let fiat = (amount * rate) / sats; + toast.pop(0); </script> @@ -15,6 +22,10 @@ <Icon icon="check" style="mx-auto" /> </div> <h1 class="text-3xl md:text-4xl font-bold mb-6">Sent!</h1> + <h2 class="text-2xl md:text-3xl font-semibold"> + {f(fiat, user.currency)} + </h2> + <h3 class="text-secondary md:text-lg mb-6 mt-1">({s(amount)} SAT)</h3> <a href={`/${user.username}/transactions`}> <button class="bg-black text-white rounded-2xl w-20 py-3 font-bold hover:opacity-80"> {$t('invoice.done')} |
