aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/invoice/+server.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-30 15:52:10 -0700
committerAdam Soltys <[email protected]>2022-09-30 15:52:27 -0700
commit63e3eaaa7bf3ba43b95927c1421b0b13cb5816b3 (patch)
treeca8b4e6a04b4b977379f3b147c2eccc23de04fb6 /src/routes/invoice/+server.js
parent6bc16274bd37759c060d18e39f8caee373b09dd2 (diff)
downloadcoinos-ui-63e3eaaa7bf3ba43b95927c1421b0b13cb5816b3.tar.gz
coinos-ui-63e3eaaa7bf3ba43b95927c1421b0b13cb5816b3.zip
sent payment confirmation
Diffstat (limited to 'src/routes/invoice/+server.js')
-rw-r--r--src/routes/invoice/+server.js6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/routes/invoice/+server.js b/src/routes/invoice/+server.js
index 759c9315..9b96b114 100644
--- a/src/routes/invoice/+server.js
+++ b/src/routes/invoice/+server.js
@@ -4,12 +4,6 @@ export async function POST({ request, parent }) {
let { amount, currency, network = 'lightning', prompt, rate, tip, user } = await request.json();
let invoice = { amount, currency, network, prompt, rate, tip };
- if (network === 'lightning') {
- invoice.text = (await post('/lightning/invoice', { amount }, auth(request))).text;
- } else {
- invoice.address = (await get('/address?network=bitcoin&type=bech32')).address;
- }
-
return new Response(JSON.stringify(await post('/invoice', { invoice, user }, auth(request))), {
headers: { 'content-type': 'application/json' }
});