aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-08-19 15:26:26 -0700
committerAdam Soltys <[email protected]>2024-08-19 15:26:26 -0700
commita1d9fa7118963e899a358ae6aebff8081d2f7eba (patch)
treea68f98fa01ce73d8151f034ccef75687d73872e1 /src/routes/(app)
parent52b8b05c28a5eb71451a96fa1b95d25c026ffec6 (diff)
downloadcoinos-ui-a1d9fa7118963e899a358ae6aebff8081d2f7eba.tar.gz
coinos-ui-a1d9fa7118963e899a358ae6aebff8081d2f7eba.zip
fix receive route
Diffstat (limited to 'src/routes/(app)')
-rw-r--r--src/routes/(app)/[username]/invoice/[id]/+page.svelte8
-rw-r--r--src/routes/(app)/[username]/receive/[...param]/+page.server.js5
2 files changed, 7 insertions, 6 deletions
diff --git a/src/routes/(app)/[username]/invoice/[id]/+page.svelte b/src/routes/(app)/[username]/invoice/[id]/+page.svelte
index 776820ce..9ad3fa14 100644
--- a/src/routes/(app)/[username]/invoice/[id]/+page.svelte
+++ b/src/routes/(app)/[username]/invoice/[id]/+page.svelte
@@ -194,10 +194,10 @@
</div>
{/if}
- <div class="text-secondary space-y-1">
+ <div class="text-secondary space-y-2 text-xl">
<button
type="button"
- class="flex gap-2 text-center break-all rounded-2xl hover:opacity-80 py-5 px-6 w-full mx-auto justify-center border text-xl whitespace-nowrap"
+ class="flex gap-2 text-center break-all rounded-2xl hover:opacity-80 py-5 px-6 w-full mx-auto justify-center border whitespace-nowrap mb-2"
on:click={() => copy(txt)}
>
<Icon icon="copy" style="w-8 my-auto" />
@@ -209,7 +209,7 @@
{#if user?.id === invoice?.user?.id}
<button
- class="w-full flex justify-center rounded-2xl border py-5 px-6 hover:opacity-80 text-xl"
+ class="w-full flex justify-center rounded-2xl border py-5 px-6 hover:opacity-80"
on:click={toggleAmount}
>
<Icon icon="edit" style="mr-1 w-8" />
@@ -226,7 +226,7 @@
</a>
{/if}
- <div class="w-full flex justify-center gap-2 flex-wrap text-xl">
+ <div class="w-full flex justify-center gap-2 flex-wrap">
<button
class="w-full flex justify-center rounded-2xl border py-5 px-6 hover:opacity-80"
on:click={() => ($showQr = !$showQr)}
diff --git a/src/routes/(app)/[username]/receive/[...param]/+page.server.js b/src/routes/(app)/[username]/receive/[...param]/+page.server.js
index c3b6ca64..953954e9 100644
--- a/src/routes/(app)/[username]/receive/[...param]/+page.server.js
+++ b/src/routes/(app)/[username]/receive/[...param]/+page.server.js
@@ -3,13 +3,14 @@ import { auth, post } from "$lib/utils";
import invoice from "$lib/invoice";
export let load = async ({ cookies, parent }) => {
- let { user, rates } = await parent();
+ let {subject, user, rates } = await parent();
let invoice = {
type: "lightning",
- rate: rates[user.currency],
+ rate: rates[user?.currency || subject?.currency],
};
+ if(!user) user = subject;
invoice = await post("/invoice", { invoice, user }, auth(cookies));
let { id } = invoice;