aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-10-07 23:30:52 -0700
committerAdam Soltys <[email protected]>2023-10-07 23:30:52 -0700
commit222bbc9080fbb15861cc5c0802449fcf06a53532 (patch)
tree95f9ef93daacf8f9b5bf7e5f3a181b46747f08df /src/routes/(app)/send
parent6b7f03fcf87d346f8e25a954220570da5b9a5c3d (diff)
downloadcoinos-ui-222bbc9080fbb15861cc5c0802449fcf06a53532.tar.gz
coinos-ui-222bbc9080fbb15861cc5c0802449fcf06a53532.zip
fix more options invoices
Diffstat (limited to 'src/routes/(app)/send')
-rw-r--r--src/routes/(app)/send/invoice/[id]/+page.svelte15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/routes/(app)/send/invoice/[id]/+page.svelte b/src/routes/(app)/send/invoice/[id]/+page.svelte
index 554eef6f..a71c697a 100644
--- a/src/routes/(app)/send/invoice/[id]/+page.svelte
+++ b/src/routes/(app)/send/invoice/[id]/+page.svelte
@@ -28,12 +28,13 @@
let submit = () => (loading = true);
let external = async () => {
- let invoice = { type: 'lightning', amount };
- let { hash } = await post(`/${recipient.username}/invoice`, {
- invoice
+ let invoice = { type: 'lightning', amount, currency };
+ let {id }= await post(`/${recipient.username}/invoice`, {
+ invoice,
+ user: { username: recipient.username }
});
- goto(`/${recipient.username}/invoice/${hash}`, { invalidateAll: true });
+ goto(`/${recipient.username}/invoice/${id}?options=true`, { invalidateAll: true });
};
$: rate = data.rate * (rates[user.currency] / rates[data.currency]);
@@ -139,7 +140,7 @@
{/if}
</div>
</form>
- <div class="flex my-20">
- <button class="mx-auto" on:click={external}>{$t('payments.moreOptions')}</button>
- </div>
+ <div class="flex my-20">
+ <button class="mx-auto" on:click={external}>{$t('payments.moreOptions')}</button>
+ </div>
</div>