Remove redundant error logging (#7158)

The `_fetchAll` function is expected to return values, so catching
errors and logging them only results in an additional error at the
place where `_fetchAll` is called. It's better instead to let the
error get thrown as normal.

In this particular case `_fetchAll` is only called in once place. The
error is still correctly caught and logged (in the `_update` function)
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent 34440d63eb
commit a00493fdbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      app/scripts/controllers/incoming-transactions.js

@ -171,12 +171,8 @@ class IncomingTransactionsController {
} }
async _fetchAll (address, fromBlock, networkType) { async _fetchAll (address, fromBlock, networkType) {
try { const fetchedTxResponse = await this._fetchTxs(address, fromBlock, networkType)
const fetchedTxResponse = await this._fetchTxs(address, fromBlock, networkType) return this._processTxFetchResponse(fetchedTxResponse)
return this._processTxFetchResponse(fetchedTxResponse)
} catch (err) {
log.error(err)
}
} }
async _fetchTxs (address, fromBlock, networkType) { async _fetchTxs (address, fromBlock, networkType) {

Loading…
Cancel
Save