aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-03-21 21:25:47 -0700
committerAdam Soltys <[email protected]>2023-03-21 21:25:47 -0700
commit2ddca459458c2a5feb3b6bbc9027f5fcc5903fc1 (patch)
tree5cff7a9780489b09332d98442fce2afe3ba46f6f /src/routes
parent0964394b86961e60b9aba43701fb4236e1ce5890 (diff)
downloadcoinos-ui-2ddca459458c2a5feb3b6bbc9027f5fcc5903fc1.tar.gz
coinos-ui-2ddca459458c2a5feb3b6bbc9027f5fcc5903fc1.zip
check currency existence
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/(app)/send/user/[username]/[...amount]/+page.server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js b/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js
index 6fc74577..f6ffbcd5 100644
--- a/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js
+++ b/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js
@@ -7,7 +7,7 @@ export async function load({ cookies, params, parent }) {
let [amount, currency] = params.amount.split('/');
if (amount) {
- let rate = rates[currency.toUpperCase() || user.currency];
+ let rate = rates[currency ? currency.toUpperCase() : user.currency];
if (!rate) throw error(500, "Invalid currency symbol");
if (currency) amount = (amount * sats) / rate;