diff options
5 files changed, 15 insertions, 7 deletions
diff --git a/src/components/Numpad.svelte b/src/components/Numpad.svelte index fe018dce..713f2e4d 100644 --- a/src/components/Numpad.svelte +++ b/src/components/Numpad.svelte @@ -93,9 +93,7 @@ } else if (value !== "<" && parseInt(amount + value) > sats) { warning($t("user.receive.lessThan1BTCWarning")); } else { - console.log("CLICK", amount.toString(), value); amount = parseInt(amount.toString() + value); - console.log("AMOUNT", amount); } } }; @@ -171,6 +169,10 @@ sel.addRange(range); }; + let blur = () => { + if (!html) html = "0"; + }; + let keydown = (e) => e.key === "Enter" && (e.preventDefault() || submit.click()); </script> @@ -189,6 +191,7 @@ contenteditable bind:innerHTML={html} on:focus={select} + on:blur={blur} on:input={input} on:keydown={keydown} class="outline-none my-auto" @@ -221,7 +224,8 @@ <button type="button" class="bg-primary rounded-xl py-4 px-8 font-semibold active:bg-black active:text-white flex justify-center items-center hover:opacity-80" - on:click={() => handleInput(value)}> + on:click={() => handleInput(value)} + > <Left /> </button> {:else} diff --git a/src/routes/(app)/send/[...text]/+page.svelte b/src/routes/(app)/send/[...text]/+page.svelte index effaea60..343bffd5 100644 --- a/src/routes/(app)/send/[...text]/+page.svelte +++ b/src/routes/(app)/send/[...text]/+page.svelte @@ -59,7 +59,10 @@ </div> <div class="grid grid-cols-2 md:grid-cols-4 gap-2"> - <a href={`/qr/${encodeURIComponent(text)}`} class:invisible={!text?.length}> + <a + href={`/qr/${encodeURIComponent(text)}`} + class:invisible={!text?.length} + > <button type="button" class="flex border rounded-full px-6 py-2 font-bold hover:opacity-80 mr-1 w-full" diff --git a/src/routes/(app)/send/lightning/[payreq]/+page.server.js b/src/routes/(app)/send/lightning/[payreq]/+page.server.js index a2b60356..89bcc3c3 100644 --- a/src/routes/(app)/send/lightning/[payreq]/+page.server.js +++ b/src/routes/(app)/send/lightning/[payreq]/+page.server.js @@ -3,7 +3,7 @@ import { fd, auth, post } from "$lib/utils"; export async function load({ cookies, params }) { return post("/parse", params, auth(cookies)); - } +} export const actions = { setAmount: async ({ cookies, request }) => fd(request), diff --git a/src/routes/(app)/send/lightning/[payreq]/+page.svelte b/src/routes/(app)/send/lightning/[payreq]/+page.svelte index 6a5eca87..57a17e01 100644 --- a/src/routes/(app)/send/lightning/[payreq]/+page.svelte +++ b/src/routes/(app)/send/lightning/[payreq]/+page.svelte @@ -43,7 +43,8 @@ ? amount * 0.1 : amount < 1000000 ? amount * 0.05 - : amount * 0.01); + : amount * 0.01 + ); let loading; let submit = () => (loading = true); diff --git a/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js b/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js index 9e586f84..fe004408 100644 --- a/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js +++ b/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js @@ -24,7 +24,7 @@ export async function load({ cookies, params, parent }) { amount, currency: currency === subject.currency ? currency : undefined, prompt: false, - rate: currency === subject.currency ? rate : undefined, + rate: currency === subject.currency ? rate : undefined, type: types.lightning, }, user: { username }, |
