From 2114156be3f89a2ef4c5bd13fd6d7a51d8fbc135 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 12 Sep 2024 15:23:45 -0700 Subject: self custodial send --- src/routes/(app)/sent/+page.server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/routes/(app)/sent/+page.server.ts') diff --git a/src/routes/(app)/sent/+page.server.ts b/src/routes/(app)/sent/+page.server.ts index 62a4d9b4..4cf580ee 100644 --- a/src/routes/(app)/sent/+page.server.ts +++ b/src/routes/(app)/sent/+page.server.ts @@ -1,6 +1,7 @@ import { get, auth } from "$lib/utils"; export let load = async ({ cookies }) => { - let { payments } = await get("/payments", auth(cookies)); + let account = cookies.get("account"); + let { payments } = await get(`/payments?account=${account}`, auth(cookies)); return { payments }; }; -- cgit v1.2.3 From 5c86d9eadaa0021928ea39c7d0e875d0c446280f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 20 Sep 2024 10:03:22 -0700 Subject: import key --- src/routes/(app)/account/import/+page.svelte | 15 +++++++++------ src/routes/(app)/account/pass/+page.svelte | 7 ++++--- src/routes/(app)/payments/[...page]/+page.server.ts | 4 ++-- src/routes/(app)/send/bitcoin/[address]/+page.server.ts | 4 ++-- .../[address]/[amount]/[...feeRate]/+page.server.ts | 8 ++++---- src/routes/(app)/sent/+page.server.ts | 4 ++-- 6 files changed, 23 insertions(+), 19 deletions(-) (limited to 'src/routes/(app)/sent/+page.server.ts') diff --git a/src/routes/(app)/account/import/+page.svelte b/src/routes/(app)/account/import/+page.svelte index 1e28f9df..866c1b1a 100644 --- a/src/routes/(app)/account/import/+page.svelte +++ b/src/routes/(app)/account/import/+page.svelte @@ -1,11 +1,12 @@ diff --git a/src/lib/invoice.ts b/src/lib/invoice.ts index 0a50b876..fa2f7786 100644 --- a/src/lib/invoice.ts +++ b/src/lib/invoice.ts @@ -2,14 +2,14 @@ import { auth, get, post } from "$lib/utils"; import { redirect } from "@sveltejs/kit"; export default async ({ cookies, request }) => { - let account_id = cookies.get("account_id"); + let aid = cookies.get("aid"); let form = await request.formData(); let rates = await get("/rates"); let amount = parseInt(form.get("amount")); let invoice = { - account_id, + aid, amount, items: JSON.parse(form.get("items")), memo: form.get("memo"), diff --git a/src/lib/types.ts b/src/lib/types.ts index 67a51f62..827f96aa 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -14,7 +14,7 @@ export interface User { } export interface Invoice { - account_id: string; + aid: string; id?: string; memoPrompt?: boolean; memo?: string; diff --git a/src/routes/(app)/[username]/receive/+page.svelte b/src/routes/(app)/[username]/receive/+page.svelte index 7d7958f1..9977cc76 100644 --- a/src/routes/(app)/[username]/receive/+page.svelte +++ b/src/routes/(app)/[username]/receive/+page.svelte @@ -39,7 +39,7 @@ $: refresh(data); let { invoice, id, subject, user, src } = data; let { - account_id, + aid, amount, hash, type, @@ -55,7 +55,7 @@ let refresh = async (data) => { ({ invoice, id, user, src } = data); ({ - account_id, + aid, amount, hash, type, @@ -235,7 +235,7 @@ - {#if account_id === user.id} + {#if aid === user.id}
- {#if account_id === user.id} + {#if aid === user.id}
- + +
+
+ + +
+ + + diff --git a/src/lib/utils.ts b/src/lib/utils.ts index c20a7d29..0997eeb9 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -287,6 +287,7 @@ export let types = { internal: "internal", fund: "fund", ecash: "ecash", + reconcile: "reconcile", }; export let ease = (t: number): number => diff --git a/src/locales/en.json b/src/locales/en.json index 9752a41d..78ef8de1 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,6 +1,18 @@ { "accounts": { - "savings": "Savings" + "addAccount": "Add account", + "create": "Create", + "import": "Import", + "accountSetup": "Account setup", + "enterSeed": "Enter a seed phrase", + "passwordMismatch": "Passwords don't match", + "generateSeed": "Generate a new seed phrase in your browser", + "accountPassword": "Account password", + "importSeed": "Enter an existing seed phrase", + "passwordWarning": "If you lose this password you won't be able to withdraw funds from the account or restore your seed phrase. We can't recover it for you.", + "savings": "Savings", + "password": "Password", + "confirmPassword": "Confirm password" }, "404": { "404": "404", diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte index 03fbc454..2c2ff9a8 100644 --- a/src/routes/(app)/[username]/(profile)/+page.svelte +++ b/src/routes/(app)/[username]/(profile)/+page.svelte @@ -41,13 +41,13 @@ {/each}
- + diff --git a/src/routes/(app)/account/[id]/+page.svelte b/src/routes/(app)/account/[id]/+page.svelte index df121168..3dcd99b8 100644 --- a/src/routes/(app)/account/[id]/+page.svelte +++ b/src/routes/(app)/account/[id]/+page.svelte @@ -1,13 +1,27 @@
-

Import

+

{$t("accounts.import")}

-
-
-