aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-11-03 15:57:03 -0700
committerAdam Soltys <[email protected]>2022-11-03 15:57:03 -0700
commitbf925a332a7fde8b19f5eea677dcb0346805facd (patch)
tree1524ee617a25935b385a8f7d21865b29f0589e6a /src/routes/(app)/send
parentd608c466c30019c4cc7d038f2308ac0e5b204841 (diff)
downloadcoinos-ui-bf925a332a7fde8b19f5eea677dcb0346805facd.tar.gz
coinos-ui-bf925a332a7fde8b19f5eea677dcb0346805facd.zip
display tips
Diffstat (limited to 'src/routes/(app)/send')
-rw-r--r--src/routes/(app)/send/[uuid=uuid]/+page.server.js3
-rw-r--r--src/routes/(app)/send/[uuid=uuid]/+page.svelte5
2 files changed, 3 insertions, 5 deletions
diff --git a/src/routes/(app)/send/[uuid=uuid]/+page.server.js b/src/routes/(app)/send/[uuid=uuid]/+page.server.js
index c9c77f70..cdf06e5c 100644
--- a/src/routes/(app)/send/[uuid=uuid]/+page.server.js
+++ b/src/routes/(app)/send/[uuid=uuid]/+page.server.js
@@ -3,8 +3,9 @@ import { btc as asset, auth, get, post } from '$lib/utils';
export async function load({ params, parent }) {
let { user } = await parent();
- let { amount, address, text, user: recipient } = await get(`/invoice/${params.uuid}`);
+ let { amount, address, tip, text, user: recipient } = await get(`/invoice/${params.uuid}`);
if (recipient.username === user.username) throw error(500, { message: 'Cannot send to self' });
+ if (tip) amount += tip;
return { amount, address, payreq: text, recipient };
}
diff --git a/src/routes/(app)/send/[uuid=uuid]/+page.svelte b/src/routes/(app)/send/[uuid=uuid]/+page.svelte
index b5a1593a..a07ae937 100644
--- a/src/routes/(app)/send/[uuid=uuid]/+page.svelte
+++ b/src/routes/(app)/send/[uuid=uuid]/+page.svelte
@@ -54,10 +54,7 @@
<div class="text-center mb-8">
<h1 class="text-xl md:text-2xl text-secondary mb-2">Send</h1>
<p class="text-6xl break-words mb-4">
- {fiat ? f(amountFiat, currency) : s(amount)}
- {#if !fiat}
- <span class="text-xl md:text-2xl text-secondary">sats</span>
- {/if}
+ {fiat ? f(amountFiat, currency) : '⚡️' + s(amount)}
</p>
<h1 class="text-xl md:text-2xl text-secondary mb-2">to</h1>