|
@ -199,7 +199,7 @@ const EthereumBridge: WalletBridge<Transaction> = { |
|
|
const freshAddress = address |
|
|
const freshAddress = address |
|
|
const accountId = `ethereumjs:${currency.id}:${address}:${publicKey}` |
|
|
const accountId = `ethereumjs:${currency.id}:${address}:${publicKey}` |
|
|
|
|
|
|
|
|
if (txs.length === 0) { |
|
|
if (txs.length === 0 && balance.isZero()) { |
|
|
// this is an empty account
|
|
|
// this is an empty account
|
|
|
if (isStandard) { |
|
|
if (isStandard) { |
|
|
if (newAccountCount === 0) { |
|
|
if (newAccountCount === 0) { |
|
@ -322,17 +322,18 @@ const EthereumBridge: WalletBridge<Transaction> = { |
|
|
const blockHash = operations.length > 0 ? operations[0].blockHash : undefined |
|
|
const blockHash = operations.length > 0 ? operations[0].blockHash : undefined |
|
|
const { txs } = await api.getTransactions(freshAddress, blockHash) |
|
|
const { txs } = await api.getTransactions(freshAddress, blockHash) |
|
|
if (unsubscribed) return |
|
|
if (unsubscribed) return |
|
|
|
|
|
const balance = await api.getAccountBalance(freshAddress) |
|
|
|
|
|
if (unsubscribed) return |
|
|
if (txs.length === 0) { |
|
|
if (txs.length === 0) { |
|
|
o.next(a => ({ |
|
|
o.next(a => ({ |
|
|
...a, |
|
|
...a, |
|
|
|
|
|
balance, |
|
|
blockHeight: block.height, |
|
|
blockHeight: block.height, |
|
|
lastSyncDate: new Date(), |
|
|
lastSyncDate: new Date(), |
|
|
})) |
|
|
})) |
|
|
o.complete() |
|
|
o.complete() |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
const balance = await api.getAccountBalance(freshAddress) |
|
|
|
|
|
if (unsubscribed) return |
|
|
|
|
|
const nonce = await api.getAccountNonce(freshAddress) |
|
|
const nonce = await api.getAccountNonce(freshAddress) |
|
|
if (unsubscribed) return |
|
|
if (unsubscribed) return |
|
|
o.next(a => { |
|
|
o.next(a => { |
|
|