diff options
author | Frankie <frankie.diamond@gmail.com> | 2016-12-24 04:34:12 +0800 |
---|---|---|
committer | Frankie <frankie.diamond@gmail.com> | 2016-12-24 04:43:42 +0800 |
commit | fde69ea0baf32b5d2a6932b73f4772e983aef552 (patch) | |
tree | d0cc11af3a427e7985ceb03fd9f10e6db4d137ac /app/scripts/metamask-controller.js | |
parent | 9e1c90eafcace4ac67100ae0a567faba13f9e618 (diff) | |
download | tangerine-wallet-browser-fde69ea0baf32b5d2a6932b73f4772e983aef552.tar tangerine-wallet-browser-fde69ea0baf32b5d2a6932b73f4772e983aef552.tar.gz tangerine-wallet-browser-fde69ea0baf32b5d2a6932b73f4772e983aef552.tar.bz2 tangerine-wallet-browser-fde69ea0baf32b5d2a6932b73f4772e983aef552.tar.lz tangerine-wallet-browser-fde69ea0baf32b5d2a6932b73f4772e983aef552.tar.xz tangerine-wallet-browser-fde69ea0baf32b5d2a6932b73f4772e983aef552.tar.zst tangerine-wallet-browser-fde69ea0baf32b5d2a6932b73f4772e983aef552.zip |
fix some minor spelling mistakes and clean up code
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r-- | app/scripts/metamask-controller.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 6aec825fe..4af5cd78d 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -21,7 +21,6 @@ module.exports = class MetamaskController { this.configManager = new ConfigManager(opts) this.keyringController = new KeyringController({ configManager: this.configManager, - txManager: this.txManager, getNetwork: this.getStateNetwork.bind(this), }) // notices @@ -40,6 +39,7 @@ module.exports = class MetamaskController { txList: this.configManager.getTxList(), txHistoryLimit: 40, setTxList: this.configManager.setTxList.bind(this.configManager), + getSelectedAccount: this.configManager.getSelectedAccount.bind(this.configManager), getGasMultiplier: this.configManager.getGasMultiplier.bind(this.configManager), getNetwork: this.getStateNetwork.bind(this), provider: this.provider, @@ -47,8 +47,6 @@ module.exports = class MetamaskController { }) this.publicConfigStore = this.initPublicConfigStore() - - var currentFiat = this.configManager.getCurrentFiat() || 'USD' this.configManager.setCurrentFiat(currentFiat) this.configManager.updateConversionRate() @@ -105,9 +103,6 @@ module.exports = class MetamaskController { signMessage: keyringController.signMessage.bind(keyringController), cancelMessage: keyringController.cancelMessage.bind(keyringController), - // forward directly to txManager - getUnapprovedTxList: txManager.getUnapprovedTxList.bind(txManager), - getFilteredTxList: txManager.getFilteredTxList.bind(txManager), // coinbase buyEth: this.buyEth.bind(this), // shapeshift @@ -251,11 +246,10 @@ module.exports = class MetamaskController { setupSigningListners (txParams) { var txId = txParams.metamaskId // apply event listeners for signing and formating events - this.txManager.once(`${txId}:formated`, this.keyringController.signTransaction.bind(this.keyringController)) + this.txManager.once(`${txId}:formatted`, this.keyringController.signTransaction.bind(this.keyringController)) this.keyringController.once(`${txId}:signed`, this.txManager.resolveSignedTransaction.bind(this.txManager)) } - enforceTxValidations (txParams) { if (('value' in txParams) && txParams.value.indexOf('-') === 0) { const msg = `Invalid transaction value of ${txParams.value} not a positive number.` |