diff options
| author | Adam Soltys <[email protected]> | 2024-09-25 13:22:07 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-09-25 13:22:07 -0700 |
| commit | a1fe5569468ac189a3506526a448942a8c132b76 (patch) | |
| tree | 2a1efbf9638aa4110ff47cd43662c7080a3a2a87 /src | |
| parent | 3be85cc511220725bfff7add3a6cb4927f73b15c (diff) | |
| download | coinos-ui-a1fe5569468ac189a3506526a448942a8c132b76.tar.gz coinos-ui-a1fe5569468ac189a3506526a448942a8c132b76.zip | |
payments button
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/Account.svelte | 7 | ||||
| -rw-r--r-- | src/routes/(app)/invoice/[id]/+page.svelte | 2 | ||||
| -rw-r--r-- | src/routes/(app)/pay/[username]/[...amount]/+page.server.ts | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/components/Account.svelte b/src/components/Account.svelte index 7c72eed5..b8cc76dc 100644 --- a/src/components/Account.svelte +++ b/src/components/Account.svelte @@ -16,9 +16,14 @@ <a href={`/payments`} class="block space-y-2" on:click={setAccount}> <div class="flex"> <Balance {balance} {user} {rate} /> + <a href={`/payments`} class="contents" on:click={setAccount}> + <button class="ml-auto flex gap-1 mb-auto pb-4 pl-4"> + <Icon icon="clock" style="w-8 my-auto" /> + </button> + </a> {#if seed} <a href={`/account/${id}`} class="contents"> - <button class="ml-auto flex gap-1 mb-auto pb-4 pl-4"> + <button class="flex gap-1 mb-auto pb-4 pl-4"> <Icon icon="settings" style="w-8 my-auto" /> </button> </a> diff --git a/src/routes/(app)/invoice/[id]/+page.svelte b/src/routes/(app)/invoice/[id]/+page.svelte index ac4c2d32..e1763013 100644 --- a/src/routes/(app)/invoice/[id]/+page.svelte +++ b/src/routes/(app)/invoice/[id]/+page.svelte @@ -272,7 +272,6 @@ <div class="my-auto text-lg">Lightning</div> </button> - {#if user?.id === invoice?.user?.id} <a href={`/receive`} class="block contents"> <button class="hover:bg-primary flex gap-1 sm:gap-2 py-3 px-2 sm:px-5 justify-center" @@ -281,7 +280,6 @@ <div class="my-auto text-lg">Ecash</div> </button> </a> - {/if} </div> {#if type === types.liquid} diff --git a/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts b/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts index 5fa7737f..93100ff0 100644 --- a/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts +++ b/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts @@ -5,8 +5,8 @@ export async function load({ cookies, params, parent }) { let { username } = params; let { rates, user } = await parent(); - if (user.username = username) error(500, "Cannot send to self"); - let subject = await get(`/users/${params.username}`); + if ((user?.username === username)) error(500, "Cannot send to self"); + let subject = await get(`/users/${username}`); let [amount, currency] = params.amount.split("/"); |
