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