diff options
| author | Adam Soltys <[email protected]> | 2022-09-07 13:58:00 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-07 13:58:00 -0700 |
| commit | 3170bcd8c9ed53d548b51254e20d1e027cb2c138 (patch) | |
| tree | 64192da314d8428746f649a1e8fc9fb7abb97633 /src/routes/invoice | |
| parent | e0616f3ddd0cc006fa2a2f4493e623a4b86f276f (diff) | |
| download | coinos-ui-3170bcd8c9ed53d548b51254e20d1e027cb2c138.tar.gz coinos-ui-3170bcd8c9ed53d548b51254e20d1e027cb2c138.zip | |
image uploads
Diffstat (limited to 'src/routes/invoice')
| -rw-r--r-- | src/routes/invoice/+server.js | 1 | ||||
| -rw-r--r-- | src/routes/invoice/[id]/+page.server.js | 3 | ||||
| -rw-r--r-- | src/routes/invoice/[id]/+page.svelte | 4 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/routes/invoice/+server.js b/src/routes/invoice/+server.js index a4c4f9c8..225f6bb1 100644 --- a/src/routes/invoice/+server.js +++ b/src/routes/invoice/+server.js @@ -3,7 +3,6 @@ import { auth, get, post } from '$lib/utils'; export async function POST({ request }) { let network = 'lightning'; let { amount, currency, rate, tip, text, username } = await request.json(); - ({ text } = await post('/lightning/invoice', { amount }, auth(request))); let invoice = { amount, currency, network, rate, tip, text }; let { uuid } = await post('/invoice', { invoice, user: { username } }, auth(request)); diff --git a/src/routes/invoice/[id]/+page.server.js b/src/routes/invoice/[id]/+page.server.js index 5ab0069a..e123c7d7 100644 --- a/src/routes/invoice/[id]/+page.server.js +++ b/src/routes/invoice/[id]/+page.server.js @@ -1,5 +1,4 @@ -import cookie from 'cookie'; -import { get, post } from '$lib/utils'; +import { get } from '$lib/utils'; export async function load({ params }) { let { id } = params; diff --git a/src/routes/invoice/[id]/+page.svelte b/src/routes/invoice/[id]/+page.svelte index e8d5562c..f6ecdc0e 100644 --- a/src/routes/invoice/[id]/+page.svelte +++ b/src/routes/invoice/[id]/+page.svelte @@ -69,9 +69,9 @@ let update = async () => { await tick(); - tip = (tipAmount * 100000000) / rate; + tip = Math.round((tipAmount * 100000000) / rate); let r = await post(`/invoice`, { - amount: amount + tip, + amount: parseInt(amount + tip), rate, tip, text, |
