From 2aa7156e12200798c45a53878dbcc37c77625752 Mon Sep 17 00:00:00 2001 From: secondl1ght <85003930+secondl1ght@users.noreply.github.com> Date: Mon, 22 Aug 2022 18:00:00 -0400 Subject: finish hooking up currency selection --- src/routes/invoice/+server.js | 3 ++- src/routes/invoice/[id]/+page.svelte | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/routes/invoice') diff --git a/src/routes/invoice/+server.js b/src/routes/invoice/+server.js index 24fffb21..c77784d7 100644 --- a/src/routes/invoice/+server.js +++ b/src/routes/invoice/+server.js @@ -1,5 +1,6 @@ import { json as json$1 } from '@sveltejs/kit'; import { post } from '$lib/utils'; +import { user } from '$lib/store'; let network = 'lightning'; @@ -7,7 +8,7 @@ export async function POST({ request }) { let { amount, rate, username, text } = await request.json(); if (!text) ({ text } = await post('/lightning/invoice', { amount })); let { uuid: id } = await post('/invoice', { - invoice: { amount, currency: 'USD', network, rate, text }, + invoice: { amount, currency: user.currency, network, rate, text }, user: { username } }); diff --git a/src/routes/invoice/[id]/+page.svelte b/src/routes/invoice/[id]/+page.svelte index d7824710..f42aba04 100644 --- a/src/routes/invoice/[id]/+page.svelte +++ b/src/routes/invoice/[id]/+page.svelte @@ -1,7 +1,7 @@