diff options
| author | Adam Soltys <[email protected]> | 2024-08-31 15:23:49 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-08-31 15:23:49 -0700 |
| commit | e11b199080b4b295dfb7b95187275565bce9c35a (patch) | |
| tree | 46098814beabc79de334898dbc4808aed8d5f329 /src/routes/(app)/send/bitcoin | |
| parent | c9acca0218d47226c567da62c4a8bf97691c9b0d (diff) | |
| download | coinos-ui-e11b199080b4b295dfb7b95187275565bce9c35a.tar.gz coinos-ui-e11b199080b4b295dfb7b95187275565bce9c35a.zip | |
typescript
Diffstat (limited to 'src/routes/(app)/send/bitcoin')
| -rw-r--r-- | src/routes/(app)/send/bitcoin/[address]/[amount]/[...feeRate]/+page.server.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/routes/(app)/send/bitcoin/[address]/[amount]/[...feeRate]/+page.server.ts b/src/routes/(app)/send/bitcoin/[address]/[amount]/[...feeRate]/+page.server.ts index d4498b39..7efe6e49 100644 --- a/src/routes/(app)/send/bitcoin/[address]/[amount]/[...feeRate]/+page.server.ts +++ b/src/routes/(app)/send/bitcoin/[address]/[amount]/[...feeRate]/+page.server.ts @@ -1,8 +1,6 @@ import { fail, redirect } from "@sveltejs/kit"; import { auth, post, fd } from "$lib/utils"; -let seen = {}; - export async function load({ params: { address, amount, feeRate }, cookies }) { try { let { fee, fees, ourfee, hex } = await post( @@ -12,7 +10,7 @@ export async function load({ params: { address, amount, feeRate }, cookies }) { ); return { amount, address, fee, fees, feeRate, ourfee, hex }; - } catch (e) { + } catch (e: any) { return { amount, address, feeRate, message: e.message }; } } @@ -24,8 +22,8 @@ export const actions = { request, }) => { try { - let r = await post("/bitcoin/send", await fd(request), auth(cookies)); - } catch (e) { + await post("/bitcoin/send", await fd(request), auth(cookies)); + } catch (e: any) { console.log("problem sending bitcoin", e); return fail(400, { address, amount, feeRate, message: e.message }); } |
