Skip to content

Commit

Permalink
Merge pull request #349 from simelo/stdevMauricio1802_t347_History_as…
Browse files Browse the repository at this point in the history
…ync_update_not_accurate

Update history UI after every new transaction
  • Loading branch information
stdevMac committed Mar 8, 2020
2 parents 44dd804 + e85bc03 commit c651489
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/models/history/historyManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ func (hm *HistoryManager) updateTxns() {
logHistoryManager.Warn("Couldn't get address iterator")
continue
}
var newTxnsFinded bool

for addressIterator.Next() {
newTxnsFinded = false
txnsIterator := addressIterator.Value().GetCryptoAccount().ListTransactions()
if txnsIterator == nil {
logHistoryManager.Warn("Couldn't get transaction iterator")
Expand Down Expand Up @@ -186,15 +185,10 @@ func (hm *HistoryManager) updateTxns() {
if corrupted {
continue
}
newTxnsFinded = true
hm.NewTransactions()
hm.txnFinded[txnsIterator.Value().GetId()] = struct{}{}
}
}
if newTxnsFinded {
models.Helper.RunInMain(func() {
hm.NewTransactions()
})
}

}
}
Expand Down

0 comments on commit c651489

Please sign in to comment.