diff options
| -rw-r--r-- | src/routes/(app)/[username]/payments/[...page]/+page.svelte | 8 | ||||
| -rw-r--r-- | src/routes/(app)/payment/[id]/+page.svelte | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/routes/(app)/[username]/payments/[...page]/+page.svelte b/src/routes/(app)/[username]/payments/[...page]/+page.svelte index 84891b92..aa2ad72b 100644 --- a/src/routes/(app)/[username]/payments/[...page]/+page.svelte +++ b/src/routes/(app)/[username]/payments/[...page]/+page.svelte @@ -60,11 +60,11 @@ payments = payments.map((p) => ({ ...p, created: new Date(p.created), - total: p.amount + p.tip || 0, + total: p.amount + (p.tip || 0), amount_fiat: f((p.amount * p.rate) / sats, p.currency), fee_fiat: p.fee ? f((p.fee * p.rate) / sats, p.currency) : null, tip_fiat: p.tip ? f((p.tip * p.rate) / sats, p.currency) : null, - total_fiat: f(((p.amount + p.tip || 0) * p.rate) / sats, p.currency) + total_fiat: f(((p.amount + (p.tip || 0)) * p.rate) / sats, p.currency) })); let keys = [ @@ -147,8 +147,8 @@ <a href={`/payment/${p.id}`}> <div class="grid grid-cols-3 border-b h-24 hover:bg-gray-100 px-4"> <div class="whitespace-nowrap my-auto"> - <div class="font-bold" class:text-red-800={p.amount < 0}> - {f((Math.abs(p.amount) + p.tip || 0) * (p.rate / sats), p.currency)} + <div class="font-bold" class:text-red-800={p.amount < 0}> + {f((Math.abs(p.amount) + (p.tip || 0)) * (p.rate / sats), p.currency)} {#if p.tip} <span class="text-xs text-secondary"> {f(Math.abs(p.amount) * (p.rate / sats), p.currency)} + {f( diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte index c3f8cdf0..34e2d327 100644 --- a/src/routes/(app)/payment/[id]/+page.svelte +++ b/src/routes/(app)/payment/[id]/+page.svelte @@ -61,8 +61,8 @@ <div> <span class="text-lg text-secondary">Total</span> <div> - {f(fiat(a + tip || 0, rate), currency)} - <span class="text-secondary text-lg">⚡️{`${s(a + tip || 0)}`} </span> + {f(fiat(a + (tip || 0), rate), currency)} + <span class="text-secondary text-lg">⚡️{`${s(a + (tip || 0))}`} </span> </div> </div> {/if} |
