From aa5e75f0bd7f88a9f7f56da3a22b9e8ea47f3ec7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 12 Nov 2022 20:49:09 -0800 Subject: subtract tip from received amount --- src/routes/(app)/invoice/[id]/paid/+page.svelte | 8 ++++---- 1 file 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)); @@ -32,7 +32,7 @@ {/if}

- {sat(received)} + {sat(received - tip)} {#if tip} +{sat(tip)} {/if} @@ -48,7 +48,7 @@ {/if}

- {sat(pending)} + {sat(pending - tip)} {#if tip} +{sat(tip)} {/if} -- cgit v1.2.3