mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix the Sentry error for eth_getBalance
(#14953)
Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: Brad Decker <bhdecker84@gmail.com>
This commit is contained in:
parent
81a876f979
commit
769b16eaa9
@ -243,8 +243,17 @@ export default class AccountTracker {
|
||||
* @returns {Promise} after the account balance is updated
|
||||
*/
|
||||
async _updateAccount(address) {
|
||||
let balance = '0x0';
|
||||
|
||||
// query balance
|
||||
const balance = await this._query.getBalance(address);
|
||||
try {
|
||||
balance = await this._query.getBalance(address);
|
||||
} catch (error) {
|
||||
if (error.data.request.method !== 'eth_getBalance') {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
const result = { address, balance };
|
||||
// update accounts state
|
||||
const { accounts } = this.store.getState();
|
||||
|
Loading…
Reference in New Issue
Block a user