aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-08-01 11:32:46 -0700
committerAdam Soltys <[email protected]>2022-08-01 11:32:46 -0700
commit2b232a584144a92188b1ef337e90c7848b007dbe (patch)
tree19cf3320b21e506c777bb5a964442a133f318577 /src
parenta54d21b74afb4bfc55c48828a716b43acbbc7819 (diff)
downloadcoinos-ui-2b232a584144a92188b1ef337e90c7848b007dbe.tar.gz
coinos-ui-2b232a584144a92188b1ef337e90c7848b007dbe.zip
pass amount to lightning invoice endpoint
Diffstat (limited to 'src')
-rw-r--r--src/routes/invoice/[id].svelte1
-rw-r--r--src/routes/invoice/index.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/routes/invoice/[id].svelte b/src/routes/invoice/[id].svelte
index 05d4b9ee..d9b1540e 100644
--- a/src/routes/invoice/[id].svelte
+++ b/src/routes/invoice/[id].svelte
@@ -65,6 +65,7 @@
onMount(async () => {
if (browser) {
let { default: QRCodeStyling } = await import('qr-code-styling');
+ console.log("text", text)
const qrCode = new QRCodeStyling({
width: window.screen.width < 640 ? 250 : 300,
type: 'svg',
diff --git a/src/routes/invoice/index.js b/src/routes/invoice/index.js
index f6b1f2cf..2bd95538 100644
--- a/src/routes/invoice/index.js
+++ b/src/routes/invoice/index.js
@@ -4,7 +4,7 @@ let network = 'lightning';
export async function POST({ request }) {
let { amount, rate, username } = await request.json();
- let { text } = await post('/lightning/invoice');
+ let { text } = await post('/lightning/invoice', { amount });
let { uuid: id } = await post('/invoice', {
invoice: { amount, currency: 'USD', network, rate, text },
user: { username }