aboutsummaryrefslogtreecommitdiff
path: root/lib/wallet/wallet.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wallet/wallet.ts')
-rw-r--r--lib/wallet/wallet.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/wallet/wallet.ts b/lib/wallet/wallet.ts
index 209c7a253..367c9cbcd 100644
--- a/lib/wallet/wallet.ts
+++ b/lib/wallet/wallet.ts
@@ -373,18 +373,16 @@ export class Wallet {
exchange.baseUrl);
return;
}
- let cd = {
- coin: coin,
- denom: exchange.active_denoms.find((e) => e.denom_pub === coin.denomPub)
- };
- if (!cd.denom) {
+ let denom = exchange.active_denoms.find((e) => e.denom_pub === coin.denomPub);
+ if (!denom) {
console.warn("denom not found (database inconsistent)");
return;
}
- if (cd.denom.value.currency !== paymentAmount.currency) {
+ if (denom.value.currency !== paymentAmount.currency) {
console.warn("same pubkey for different currencies");
return;
}
+ let cd = {coin, denom};
let x = m[url];
if (!x) {
m[url] = [cd];