aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-03-01 08:54:10 +0800
committerGitHub <noreply@github.com>2017-03-01 08:54:10 +0800
commitf162a11585392df5e593018a02549f8b03018d22 (patch)
treec91dae0c308fb41a461fe85ce4cbeca5b49211df /app/scripts/metamask-controller.js
parentab01fef1c0ffddf09a20f90a910e5e068cf8c71e (diff)
parenta600ccd4f863d7a473392fc283f4cec248225a27 (diff)
downloadtangerine-wallet-browser-f162a11585392df5e593018a02549f8b03018d22.tar
tangerine-wallet-browser-f162a11585392df5e593018a02549f8b03018d22.tar.gz
tangerine-wallet-browser-f162a11585392df5e593018a02549f8b03018d22.tar.bz2
tangerine-wallet-browser-f162a11585392df5e593018a02549f8b03018d22.tar.lz
tangerine-wallet-browser-f162a11585392df5e593018a02549f8b03018d22.tar.xz
tangerine-wallet-browser-f162a11585392df5e593018a02549f8b03018d22.tar.zst
tangerine-wallet-browser-f162a11585392df5e593018a02549f8b03018d22.zip
Merge pull request #1154 from MetaMask/i765-gaslimits
Add ability to customize gas and gasPrice on tx confirmation screen
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js23
1 files changed, 11 insertions, 12 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index f172c67a8..bd01a260d 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -248,7 +248,6 @@ module.exports = class MetamaskController extends EventEmitter {
setProviderType: this.setProviderType.bind(this),
useEtherscanProvider: this.useEtherscanProvider.bind(this),
setCurrentCurrency: this.setCurrentCurrency.bind(this),
- setGasMultiplier: this.setGasMultiplier.bind(this),
markAccountsFound: this.markAccountsFound.bind(this),
// coinbase
buyEth: this.buyEth.bind(this),
@@ -276,8 +275,9 @@ module.exports = class MetamaskController extends EventEmitter {
exportAccount: nodeify(keyringController.exportAccount).bind(keyringController),
// txManager
- approveTransaction: txManager.approveTransaction.bind(txManager),
- cancelTransaction: txManager.cancelTransaction.bind(txManager),
+ approveTransaction: txManager.approveTransaction.bind(txManager),
+ cancelTransaction: txManager.cancelTransaction.bind(txManager),
+ updateAndApproveTransaction: this.updateAndApproveTx.bind(this),
// messageManager
signMessage: nodeify(this.signMessage).bind(this),
@@ -407,6 +407,7 @@ module.exports = class MetamaskController extends EventEmitter {
//
newUnapprovedTransaction (txParams, cb) {
+ log.debug(`MetaMaskController newUnapprovedTransaction ${JSON.stringify(txParams)}`)
const self = this
self.txManager.addUnapprovedTransaction(txParams, (err, txMeta) => {
if (err) return cb(err)
@@ -462,6 +463,13 @@ module.exports = class MetamaskController extends EventEmitter {
})
}
+ updateAndApproveTx(txMeta, cb) {
+ log.debug(`MetaMaskController - updateAndApproveTx: ${JSON.stringify(txMeta)}`)
+ const txManager = this.txManager
+ txManager.updateTx(txMeta)
+ txManager.approveTransaction(txMeta.id, cb)
+ }
+
signMessage (msgParams, cb) {
log.info('MetaMaskController - signMessage')
const msgId = msgParams.metamaskId
@@ -644,15 +652,6 @@ module.exports = class MetamaskController extends EventEmitter {
this.shapeshiftController.createShapeShiftTx(depositAddress, depositType)
}
- setGasMultiplier (gasMultiplier, cb) {
- try {
- this.txManager.setGasMultiplier(gasMultiplier)
- cb()
- } catch (err) {
- cb(err)
- }
- }
-
//
// network
//