diff options
| author | Adam Soltys <[email protected]> | 2024-11-06 08:24:01 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-06 08:24:01 -0800 |
| commit | 053bbfbe4945d230ebf1c79cc12b340f0075f37c (patch) | |
| tree | 99bb6e82a6813423dcb9a185c87b9e0a4aa1e70d | |
| parent | 59659fa49ab868bec38ed3a7767de6486a54e414 (diff) | |
| download | coinos-ui-053bbfbe4945d230ebf1c79cc12b340f0075f37c.tar.gz coinos-ui-053bbfbe4945d230ebf1c79cc12b340f0075f37c.zip | |
check for user
| -rw-r--r-- | src/components/InvoiceActions.svelte | 2 | ||||
| -rw-r--r-- | src/routes/(app)/send/invoice/[id]/+page.server.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/components/InvoiceActions.svelte b/src/components/InvoiceActions.svelte index 21bbb386..7f1607e0 100644 --- a/src/components/InvoiceActions.svelte +++ b/src/components/InvoiceActions.svelte @@ -25,7 +25,7 @@ <div class="my-auto">{t("payments.setAmount")}</div> </button> {:else} - <a href={link} class="block contents"> + <a href={link} class="block"> <button class="btn"> <iconify-icon icon="ph:wallet-bold" width="32" /> <div class="my-auto">{t("payments.openLink")}</div> diff --git a/src/routes/(app)/send/invoice/[id]/+page.server.ts b/src/routes/(app)/send/invoice/[id]/+page.server.ts index 55228025..2b10b375 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.server.ts +++ b/src/routes/(app)/send/invoice/[id]/+page.server.ts @@ -13,7 +13,7 @@ export async function load({ cookies, params: { id }, parent }) { if (invoice.memoPrompt && invoice.memo === null) redirect(307, `/invoice/${id}/memo`); - if (invoice.aid === aid) error(500, { message: "Cannot send to self" }); + if (user && invoice.aid === aid) error(500, { message: "Cannot send to self" }); else if (user && invoice.type !== types.lightning) redirect(307, `/send/${invoice.type}/${invoice.hash}`); if (!user) redirect(307, `/invoice/${id}`); |
