1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Ordered keyringController methods the same in metamask-controller

This commit is contained in:
Dan Finlay 2016-11-29 11:41:13 -08:00
parent b81f00849d
commit 4b6b1db4f0
2 changed files with 9 additions and 5 deletions

View File

@ -611,7 +611,11 @@ module.exports = class KeyringController extends EventEmitter {
// Attempts to sign the provided @object msgParams.
signMessage (msgParams, cb) {
try {
var approvalCb = this._unconfMsgCbs[msgId] || noop
const msgId = msgParams.metamaskId
delete msgParams.metamaskId
const approvalCb = this._unconfMsgCbs[msgId] || noop
const address = normalize(msgParams.from)
return this.getKeyringForAccount(address)
.then((keyring) => {

View File

@ -63,17 +63,17 @@ module.exports = class MetamaskController {
setGasMultiplier: this.setGasMultiplier.bind(this),
// forward directly to keyringController
placeSeedWords: nodeify(keyringController.placeSeedWords).bind(keyringController),
createNewVaultAndKeychain: nodeify(keyringController.createNewVaultAndKeychain).bind(keyringController),
createNewVaultAndRestore: nodeify(keyringController.createNewVaultAndRestore).bind(keyringController),
placeSeedWords: nodeify(keyringController.placeSeedWords).bind(keyringController),
clearSeedWordCache: nodeify(keyringController.clearSeedWordCache).bind(keyringController),
setLocked: nodeify(keyringController.setLocked).bind(keyringController),
submitPassword: nodeify(keyringController.submitPassword).bind(keyringController),
addNewKeyring: nodeify(keyringController.addNewKeyring).bind(keyringController),
addNewAccount: nodeify(keyringController.addNewAccount).bind(keyringController),
submitPassword: nodeify(keyringController.submitPassword).bind(keyringController),
setSelectedAccount: nodeify(keyringController.setSelectedAccount).bind(keyringController),
exportAccount: nodeify(keyringController.exportAccount).bind(keyringController),
saveAccountLabel: nodeify(keyringController.saveAccountLabel).bind(keyringController),
setLocked: nodeify(keyringController.setLocked).bind(keyringController),
exportAccount: nodeify(keyringController.exportAccount).bind(keyringController),
// signing methods
approveTransaction: keyringController.approveTransaction.bind(keyringController),