aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-11-30 07:16:24 +0800
committerGitHub <noreply@github.com>2016-11-30 07:16:24 +0800
commitf8fbeb88ff6ae367b126dbe826e7613ea7c8a9ac (patch)
tree84db2e1733ccb7364c8309afea162f167b68b49b /app/scripts/metamask-controller.js
parentda5be09a94763f5de292f47c425919f3d4fac866 (diff)
parent5bf1018d7540e0d89aa866e8d7f709e577bb99e3 (diff)
downloadtangerine-wallet-browser-f8fbeb88ff6ae367b126dbe826e7613ea7c8a9ac.tar
tangerine-wallet-browser-f8fbeb88ff6ae367b126dbe826e7613ea7c8a9ac.tar.gz
tangerine-wallet-browser-f8fbeb88ff6ae367b126dbe826e7613ea7c8a9ac.tar.bz2
tangerine-wallet-browser-f8fbeb88ff6ae367b126dbe826e7613ea7c8a9ac.tar.lz
tangerine-wallet-browser-f8fbeb88ff6ae367b126dbe826e7613ea7c8a9ac.tar.xz
tangerine-wallet-browser-f8fbeb88ff6ae367b126dbe826e7613ea7c8a9ac.tar.zst
tangerine-wallet-browser-f8fbeb88ff6ae367b126dbe826e7613ea7c8a9ac.zip
Merge pull request #896 from MetaMask/i893-DenodeifyKeyringController
Denodeify most of KeyringController
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js26
1 files changed, 15 insertions, 11 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 701046e76..ae761c753 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -8,6 +8,7 @@ const Web3 = require('web3')
const ConfigManager = require('./lib/config-manager')
const extension = require('./lib/extension')
const autoFaucet = require('./lib/auto-faucet')
+const nodeify = require('./lib/nodeify')
module.exports = class MetamaskController {
@@ -62,21 +63,24 @@ module.exports = class MetamaskController {
setGasMultiplier: this.setGasMultiplier.bind(this),
// forward directly to keyringController
- placeSeedWords: keyringController.placeSeedWords.bind(keyringController),
- createNewVaultAndKeychain: keyringController.createNewVaultAndKeychain.bind(keyringController),
- createNewVaultAndRestore: keyringController.createNewVaultAndRestore.bind(keyringController),
- clearSeedWordCache: keyringController.clearSeedWordCache.bind(keyringController),
- addNewKeyring: keyringController.addNewKeyring.bind(keyringController),
- addNewAccount: keyringController.addNewAccount.bind(keyringController),
- submitPassword: keyringController.submitPassword.bind(keyringController),
- setSelectedAccount: keyringController.setSelectedAccount.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),
+ setSelectedAccount: nodeify(keyringController.setSelectedAccount).bind(keyringController),
+ saveAccountLabel: nodeify(keyringController.saveAccountLabel).bind(keyringController),
+ exportAccount: nodeify(keyringController.exportAccount).bind(keyringController),
+
+ // signing methods
approveTransaction: keyringController.approveTransaction.bind(keyringController),
cancelTransaction: keyringController.cancelTransaction.bind(keyringController),
signMessage: keyringController.signMessage.bind(keyringController),
cancelMessage: keyringController.cancelMessage.bind(keyringController),
- setLocked: keyringController.setLocked.bind(keyringController),
- exportAccount: keyringController.exportAccount.bind(keyringController),
- saveAccountLabel: keyringController.saveAccountLabel.bind(keyringController),
+
// coinbase
buyEth: this.buyEth.bind(this),
// shapeshift