diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-09-14 15:55:10 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-09-14 15:55:10 +0200 |
commit | ebbdadb4b6bd59e57b0eec8e280c7c5c12453167 (patch) | |
tree | 8f9fdbd1cf0e2d1b79884dfe15828f3c98f28da6 /lib/wallet/wallet.ts | |
parent | fc6db1824e6974898f177ffb0ffd2eb138a653ce (diff) | |
download | wallet-core-ebbdadb4b6bd59e57b0eec8e280c7c5c12453167.tar.xz |
sort out libs / fix warnings
Diffstat (limited to 'lib/wallet/wallet.ts')
-rw-r--r-- | lib/wallet/wallet.ts | 10 |
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]; |