|
|
|
@ -367,7 +367,7 @@ module.exports = class MetamaskController extends EventEmitter { |
|
|
|
|
placeSeedWords: this.placeSeedWords.bind(this), |
|
|
|
|
verifySeedPhrase: nodeify(this.verifySeedPhrase, this), |
|
|
|
|
clearSeedWordCache: this.clearSeedWordCache.bind(this), |
|
|
|
|
resetAccount: this.resetAccount.bind(this), |
|
|
|
|
resetAccount: nodeify(this.resetAccount, this), |
|
|
|
|
importAccountWithStrategy: this.importAccountWithStrategy.bind(this), |
|
|
|
|
|
|
|
|
|
// vault management
|
|
|
|
@ -585,10 +585,15 @@ module.exports = class MetamaskController extends EventEmitter { |
|
|
|
|
/** |
|
|
|
|
* ? |
|
|
|
|
*/ |
|
|
|
|
resetAccount (cb) { |
|
|
|
|
async resetAccount (cb) { |
|
|
|
|
const selectedAddress = this.preferencesController.getSelectedAddress() |
|
|
|
|
this.txController.wipeTransactions(selectedAddress) |
|
|
|
|
cb(null, selectedAddress) |
|
|
|
|
|
|
|
|
|
const networkController = this.networkController |
|
|
|
|
const oldType = networkController.getProviderConfig().type |
|
|
|
|
await networkController.setProviderType(oldType, true) |
|
|
|
|
|
|
|
|
|
return selectedAddress |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|