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)/ln | |
| 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)/ln')
| -rw-r--r-- | src/routes/(app)/ln/[lnurl]/+page.server.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/routes/(app)/ln/[lnurl]/+page.server.js b/src/routes/(app)/ln/[lnurl]/+page.server.js index a12b063c..ddd714bf 100644 --- a/src/routes/(app)/ln/[lnurl]/+page.server.js +++ b/src/routes/(app)/ln/[lnurl]/+page.server.js @@ -1,4 +1,4 @@ -import { auth, get, post } from '$lib/utils'; +import { fd, auth, get, post } from '$lib/utils'; import { error, fail, redirect } from '@sveltejs/kit'; export async function load({ params, parent }) { @@ -24,10 +24,7 @@ export const actions = { pay: async ({ cookies, fetch, request }) => { let error; - let { callback, amount, minSendable, maxSendable } = Object.fromEntries( - await request.formData() - ); - + let { callback, amount, minSendable, maxSendable } = await fd(request); minSendable = Math.round(minSendable / 1000); maxSendable = Math.round(maxSendable / 1000); @@ -42,8 +39,9 @@ export const actions = { withdraw: async ({ cookies, fetch, request }) => { let error; - let { callback, amount, username, currency, minWithdrawable, maxWithdrawable, k1 } = - Object.fromEntries(await request.formData()); + let { callback, amount, username, currency, minWithdrawable, maxWithdrawable, k1 } = await fd( + request + ); minWithdrawable = Math.round(minWithdrawable / 1000); maxWithdrawable = Math.round(maxWithdrawable / 1000); |
