From ceaf038cd70fb2601a3752936d1fdfd9cd7e6888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Mon, 30 Jul 2018 13:15:18 +0200 Subject: [PATCH] Refresh ETH balance even if there is still no txs this is a workaround because API don't show contract txs --- src/bridge/EthereumJSBridge.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bridge/EthereumJSBridge.js b/src/bridge/EthereumJSBridge.js index fd02539a..a91229a8 100644 --- a/src/bridge/EthereumJSBridge.js +++ b/src/bridge/EthereumJSBridge.js @@ -322,17 +322,18 @@ const EthereumBridge: WalletBridge = { const blockHash = operations.length > 0 ? operations[0].blockHash : undefined const { txs } = await api.getTransactions(freshAddress, blockHash) if (unsubscribed) return + const balance = await api.getAccountBalance(freshAddress) + if (unsubscribed) return if (txs.length === 0) { o.next(a => ({ ...a, + balance, blockHeight: block.height, lastSyncDate: new Date(), })) o.complete() return } - const balance = await api.getAccountBalance(freshAddress) - if (unsubscribed) return const nonce = await api.getAccountNonce(freshAddress) if (unsubscribed) return o.next(a => {