aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-15 22:26:55 -0800
committerAdam Soltys <[email protected]>2026-02-15 22:26:55 -0800
commit8905ad48f91e24cbb2427256a88128462a51a7a0 (patch)
tree5caa0acb92988511b01cba5aa19297cf96aa241a /src/routes/(app)/send
parentc7e8f628aa215caaa999f06d7fccb910fd5cc099 (diff)
downloadcoinos-ui-8905ad48f91e24cbb2427256a88128462a51a7a0.tar.gz
coinos-ui-8905ad48f91e24cbb2427256a88128462a51a7a0.zip
e2e tests
Diffstat (limited to 'src/routes/(app)/send')
-rw-r--r--src/routes/(app)/send/bitcoin/[address]/+layout.server.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts b/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts
index 6acb36b6..acf6a370 100644
--- a/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts
+++ b/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts
@@ -5,7 +5,8 @@ export async function load({ cookies, params, parent }) {
const { user } = await parent();
const aid = cookies.get("aid") || user.id;
const { address, amount } = params;
- const { balance } = await get(`/account/${aid}`, auth(cookies));
+ const account = await get(`/account/${aid}`, auth(cookies));
+ const senderIsVault = account.pubkey || account.seed;
let invoice;
try {
@@ -14,7 +15,7 @@ export async function load({ cookies, params, parent }) {
// invoice not found
}
- if (invoice) {
+ if (invoice && !senderIsVault) {
const isVault = invoice.account?.pubkey || invoice.account?.seed;
if (isVault) {
// Vault account — stay on /send/bitcoin for on-chain send
@@ -24,5 +25,5 @@ export async function load({ cookies, params, parent }) {
}
}
- return { balance };
+ return { balance: account.balance };
}