diff options
| author | Adam Soltys <[email protected]> | 2024-03-08 23:01:49 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-03-08 23:01:49 -0800 |
| commit | 6b8c43f3577513427bddc57503cbb5c2f1cbf462 (patch) | |
| tree | 80bbac096126aee555bb8d566e5164aec57674b0 /src/components | |
| parent | 59e2f69f0b0ab31e18bdc36e1d605ba2c82bed1d (diff) | |
| download | coinos-ui-lnurl-fiat.tar.gz coinos-ui-lnurl-fiat.zip | |
wiplnurl-fiat
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Lnurlp.svelte | 14 | ||||
| -rw-r--r-- | src/components/Numpad.svelte | 1 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/components/Lnurlp.svelte b/src/components/Lnurlp.svelte index 6785061a..c8427fac 100644 --- a/src/components/Lnurlp.svelte +++ b/src/components/Lnurlp.svelte @@ -7,7 +7,9 @@ export let data, form, send; let { currency } = data.user; - let { minSendable, maxSendable, callback, metadata, rates } = data; + let { currencies, minSendable, maxSendable, callback, metadata, rates } = + data; + $: rate = rates[currency]; @@ -36,7 +38,15 @@ </div> {/if} - <Numpad bind:amount bind:rate {currency} bind:submit={send} /> + {JSON.stringify(currencies[currency])} + <select bind:value={currency}> + {#each currencies as c} + <option value={c.code}>{c.symbol}</option> + {/each} + </select> + + {amount} {rate} {currency} + <Numpad bind:amount bind:rate bind:currency bind:submit={send} /> <form action="?/pay" method="POST" use:enhance on:submit={submit}> <input name="amount" value={amount} type="hidden" /> diff --git a/src/components/Numpad.svelte b/src/components/Numpad.svelte index 9119999f..b7551a73 100644 --- a/src/components/Numpad.svelte +++ b/src/components/Numpad.svelte @@ -183,6 +183,7 @@ e.key === "Enter" && (e.preventDefault() || submit.click()); </script> +{symbol} <div class="flex justify-center items-center mb-3 px-3"> <div class="space-y-5"> <div class="text-center"> |
