From ebbdadb4b6bd59e57b0eec8e280c7c5c12453167 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 14 Sep 2016 15:55:10 +0200 Subject: sort out libs / fix warnings --- lib/wallet/wallet.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/wallet/wallet.ts') 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]; -- cgit v1.2.3