diff options
| author | John Barratt <[email protected]> | 2023-03-07 10:29:49 -0800 |
|---|---|---|
| committer | John Barratt <[email protected]> | 2023-03-07 10:29:49 -0800 |
| commit | 8ef9568cd1bd822495ce005d4e4cfaa6cb0d92ce (patch) | |
| tree | 4ea5530cc2b7e5d970dc8a84cacfecfe2cce46b7 /src/routes/(app)/send/invoice | |
| parent | c97fb43abba375920fff361ec5fa4eb64a5a0d3f (diff) | |
| parent | 0f44e3283c25c9783a52cf20957661da49d2f90b (diff) | |
| download | coinos-ui-notifications.tar.gz coinos-ui-notifications.zip | |
Merge branch 'master' of https://github.com/coinos/coinos-ui into notificationsnotifications
Diffstat (limited to 'src/routes/(app)/send/invoice')
| -rw-r--r-- | src/routes/(app)/send/invoice/[id]/+page.server.js | 9 | ||||
| -rw-r--r-- | src/routes/(app)/send/invoice/[id]/+page.svelte | 1 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/routes/(app)/send/invoice/[id]/+page.server.js b/src/routes/(app)/send/invoice/[id]/+page.server.js index 2df19985..3db03123 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.server.js +++ b/src/routes/(app)/send/invoice/[id]/+page.server.js @@ -1,5 +1,5 @@ import { error, fail, redirect } from '@sveltejs/kit'; -import { btc as asset, auth, get, post } from '$lib/utils'; +import { fd, auth, get, post } from '$lib/utils'; export async function load({ params: { id }, parent }) { let { user } = await parent(); @@ -13,15 +13,10 @@ export async function load({ params: { id }, parent }) { export const actions = { default: async ({ cookies, params: { hash }, request }) => { try { - let body = Object.fromEntries(await request.formData()); - let { confirmed } = body; + let body = await fd(request); body.amount = parseInt(body.amount); body.hash = hash; - if (!confirmed) { - return fail(400, { amount, confirm: true }); - } - await post('/payments', body, auth(cookies)); } catch (e) { return fail(400, { message: e.message }); diff --git a/src/routes/(app)/send/invoice/[id]/+page.svelte b/src/routes/(app)/send/invoice/[id]/+page.svelte index 27837bca..7570a61a 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.svelte +++ b/src/routes/(app)/send/invoice/[id]/+page.svelte @@ -69,7 +69,6 @@ <input name="amount" value={amount} type="hidden" /> <input name="payreq" value={payreq} type="hidden" /> <input name="username" value={recipient.username} type="hidden" /> - <input name="confirmed" value={form?.confirm} type="hidden" /> <input name="pin" value={$pin} type="hidden" /> <div class="flex w-full"> |
