diff options
| author | Adam Soltys <[email protected]> | 2022-11-12 20:49:09 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-12 20:49:09 -0800 |
| commit | aa5e75f0bd7f88a9f7f56da3a22b9e8ea47f3ec7 (patch) | |
| tree | 789bb3cbd986ef18ce3332ea0d6b52acff10d3a6 | |
| parent | 76bbc66976aaec36424259415d460c32745fe616 (diff) | |
| download | coinos-ui-aa5e75f0bd7f88a9f7f56da3a22b9e8ea47f3ec7.tar.gz coinos-ui-aa5e75f0bd7f88a9f7f56da3a22b9e8ea47f3ec7.zip | |
subtract tip from received amount
| -rw-r--r-- | src/routes/(app)/invoice/[id]/paid/+page.svelte | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/routes/(app)/invoice/[id]/paid/+page.svelte b/src/routes/(app)/invoice/[id]/paid/+page.svelte index ec80c14d..5b7b9ada 100644 --- a/src/routes/(app)/invoice/[id]/paid/+page.svelte +++ b/src/routes/(app)/invoice/[id]/paid/+page.svelte @@ -14,8 +14,8 @@ toast.pop(0); - $: amountFiat = parseFloat(((received * rate) / sats).toFixed(2)); - $: pendingFiat = parseFloat(((pending * rate) / sats).toFixed(2)); + $: amountFiat = parseFloat((((received - tip) * rate) / sats).toFixed(2)); + $: pendingFiat = parseFloat((((pending - tip) * rate) / sats).toFixed(2)); $: tipFiat = parseFloat(((tip * rate) / sats).toFixed(2)); </script> @@ -32,7 +32,7 @@ {/if} </h2> <h3 class="text-secondary md:text-lg mb-6 mt-1"> - {sat(received)} + {sat(received - tip)} {#if tip} +{sat(tip)} {/if} @@ -48,7 +48,7 @@ {/if} </h2> <h3 class="text-secondary md:text-lg mb-6 mt-1"> - {sat(pending)} + {sat(pending - tip)} {#if tip} +{sat(tip)} {/if} |
