aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/invoice.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-10-08 00:17:32 -0700
committerAdam Soltys <[email protected]>2023-10-08 00:17:32 -0700
commit0212fe0032eb0c5d6bfb74ebaab42543b73d6d6b (patch)
tree56bffdb4556c10bde68d5aed3bea389197e9965c /src/lib/invoice.js
parent222bbc9080fbb15861cc5c0802449fcf06a53532 (diff)
downloadcoinos-ui-0212fe0032eb0c5d6bfb74ebaab42543b73d6d6b.tar.gz
coinos-ui-0212fe0032eb0c5d6bfb74ebaab42543b73d6d6b.zip
payments fixes
Diffstat (limited to 'src/lib/invoice.js')
-rw-r--r--src/lib/invoice.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/invoice.js b/src/lib/invoice.js
index 23ce1757..218972c6 100644
--- a/src/lib/invoice.js
+++ b/src/lib/invoice.js
@@ -21,16 +21,16 @@ export default async ({ cookies, request, url }) => {
let user = { username: form.get('username'), currency: form.get('currency') };
invoice = await post('/invoice', { invoice, user }, auth(cookies));
- let { hash } = invoice;
+ let { id } = invoice;
if (request_id) {
if (url.pathname.endsWith('tip')) {
- throw redirect(307, `/send/invoice/${hash}`);
+ throw redirect(307, `/send/invoice/${id}`);
}
throw redirect(307, `/${user.username}/request/${request_id}`);
}
- if (invoice.prompt) throw redirect(307, `/${user.username}/invoice/${hash}/tip`);
- else throw redirect(307, `/${user.username}/invoice/${hash}`);
+ if (invoice.prompt) throw redirect(307, `/${user.username}/invoice/${id}/tip`);
+ else throw redirect(307, `/${user.username}/invoice/${id}`);
};