diff options
author | Dan J Miller <danjm.com@gmail.com> | 2018-06-07 11:20:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-07 11:20:16 +0800 |
commit | 988283778a2be52640b27a359ef3fb1130e95711 (patch) | |
tree | f62576fb7e1a9088cef9bb1137745192bd571539 /app/scripts | |
parent | c86213bf118c0d9d0356a36e6ca0e9e884a82d73 (diff) | |
parent | a09d609360f5f916e75e98254fb82ce8f3f42d35 (diff) | |
download | tangerine-wallet-browser-988283778a2be52640b27a359ef3fb1130e95711.tar.gz tangerine-wallet-browser-988283778a2be52640b27a359ef3fb1130e95711.tar.zst tangerine-wallet-browser-988283778a2be52640b27a359ef3fb1130e95711.zip |
Merge pull request #4090 from MetaMask/i3725-refactor-send-component-
I3725 Refactor Send Component
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/metamask-controller.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 1bb0af5ee..532cfbd61 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -394,6 +394,8 @@ module.exports = class MetamaskController extends EventEmitter { updateAndApproveTransaction: nodeify(txController.updateAndApproveTransaction, txController), retryTransaction: nodeify(this.retryTransaction, this), getFilteredTxList: nodeify(txController.getFilteredTxList, txController), + isNonceTaken: nodeify(txController.isNonceTaken, txController), + estimateGas: nodeify(this.estimateGas, this), // messageManager signMessage: nodeify(this.signMessage, this), @@ -958,6 +960,18 @@ module.exports = class MetamaskController extends EventEmitter { return state } + estimateGas (estimateGasParams) { + return new Promise((resolve, reject) => { + return this.txController.txGasUtil.query.estimateGas(estimateGasParams, (err, res) => { + if (err) { + return reject(err) + } + + return resolve(res) + }) + }) + } + //============================================================================= // PASSWORD MANAGEMENT //============================================================================= |