mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
parent
d5fea389e3
commit
49c8b279be
@ -1593,7 +1593,6 @@ export default class MetamaskController extends EventEmitter {
|
||||
detectTokensController,
|
||||
ensController,
|
||||
gasFeeController,
|
||||
keyringController,
|
||||
metaMetricsController,
|
||||
networkController,
|
||||
announcementController,
|
||||
@ -1813,7 +1812,7 @@ export default class MetamaskController extends EventEmitter {
|
||||
setLocked: this.setLocked.bind(this),
|
||||
createNewVaultAndKeychain: this.createNewVaultAndKeychain.bind(this),
|
||||
createNewVaultAndRestore: this.createNewVaultAndRestore.bind(this),
|
||||
exportAccount: keyringController.exportAccount.bind(keyringController),
|
||||
exportAccount: this.exportAccount.bind(this),
|
||||
|
||||
// txController
|
||||
cancelTransaction: txController.cancelTransaction.bind(txController),
|
||||
@ -2056,6 +2055,11 @@ export default class MetamaskController extends EventEmitter {
|
||||
};
|
||||
}
|
||||
|
||||
async exportAccount(address, password) {
|
||||
await this.verifyPassword(password);
|
||||
return this.keyringController.exportAccount(address, password);
|
||||
}
|
||||
|
||||
async getTokenStandardAndDetails(address, userAddress, tokenId) {
|
||||
const details =
|
||||
await this.assetsContractController.getTokenStandardAndDetails(
|
||||
|
@ -2385,7 +2385,7 @@ export function exportAccount(password, address) {
|
||||
log.debug(`background.exportAccount`);
|
||||
callBackgroundMethod(
|
||||
'exportAccount',
|
||||
[address],
|
||||
[address, password],
|
||||
function (err2, result) {
|
||||
dispatch(hideLoadingIndication());
|
||||
|
||||
@ -2421,7 +2421,7 @@ export function exportAccounts(password, addresses) {
|
||||
new Promise((resolve2, reject2) =>
|
||||
callBackgroundMethod(
|
||||
'exportAccount',
|
||||
[address],
|
||||
[address, password],
|
||||
function (err2, result) {
|
||||
if (err2) {
|
||||
log.error(err2);
|
||||
|
@ -1259,7 +1259,7 @@ describe('Actions', () => {
|
||||
|
||||
const exportAccountStub = sinon
|
||||
.stub()
|
||||
.callsFake((_, cb) => cb(null, testPrivKey));
|
||||
.callsFake((_, _2, cb) => cb(null, testPrivKey));
|
||||
|
||||
background.getApi.returns({
|
||||
verifyPassword: verifyPasswordStub,
|
||||
@ -1318,7 +1318,7 @@ describe('Actions', () => {
|
||||
|
||||
const exportAccountStub = sinon
|
||||
.stub()
|
||||
.callsFake((_, cb) => cb(new Error('error')));
|
||||
.callsFake((_, _2, cb) => cb(new Error('error')));
|
||||
|
||||
background.getApi.returns({
|
||||
verifyPassword: verifyPasswordStub,
|
||||
|
Loading…
Reference in New Issue
Block a user