diff --git a/app/scripts/controllers/threebox.js b/app/scripts/controllers/threebox.js index ab78ad46d..e6ae41f9c 100644 --- a/app/scripts/controllers/threebox.js +++ b/app/scripts/controllers/threebox.js @@ -118,7 +118,7 @@ class ThreeBoxController { const threeBoxConfig = await Box.getConfig(this.address) backupExists = threeBoxConfig.spaces && threeBoxConfig.spaces.metamask } catch (e) { - if (e.message.match(/^Error: Invalid response (404)/)) { + if (e.message.match(/^Error: Invalid response \(404\)/)) { backupExists = false } else { throw e diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index d6c19deb8..9e339d596 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -754,12 +754,16 @@ module.exports = class MetamaskController extends EventEmitter { await this.preferencesController.syncAddresses(accounts) await this.txController.pendingTxTracker.updatePendingTxs() - const threeBoxSyncingAllowed = this.threeBoxController.getThreeBoxSyncingState() - if (threeBoxSyncingAllowed && !this.threeBoxController.box) { - await this.threeBoxController.new3Box() - this.threeBoxController.turnThreeBoxSyncingOn() - } else if (threeBoxSyncingAllowed && this.threeBoxController.box) { - this.threeBoxController.turnThreeBoxSyncingOn() + try { + const threeBoxSyncingAllowed = this.threeBoxController.getThreeBoxSyncingState() + if (threeBoxSyncingAllowed && !this.threeBoxController.box) { + await this.threeBoxController.new3Box() + this.threeBoxController.turnThreeBoxSyncingOn() + } else if (threeBoxSyncingAllowed && this.threeBoxController.box) { + this.threeBoxController.turnThreeBoxSyncingOn() + } + } catch (error) { + log.error(error) } return this.keyringController.fullUpdate()