aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/transactions.js
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2018-01-09 03:21:41 +0800
committerGitHub <noreply@github.com>2018-01-09 03:21:41 +0800
commitd11ec81f49328d3f0fee484fba5191d4c29c42ad (patch)
tree1d888a0e26cb5cf224b8c5a0c1a9bd67e6ae3f1b /app/scripts/controllers/transactions.js
parent39b700bf87f213d2fb06dcde85f4e6173a6ce70c (diff)
parentf6f3f915707a2a4f5c9db43ae51741c7d30cbc69 (diff)
downloadtangerine-wallet-browser-d11ec81f49328d3f0fee484fba5191d4c29c42ad.tar
tangerine-wallet-browser-d11ec81f49328d3f0fee484fba5191d4c29c42ad.tar.gz
tangerine-wallet-browser-d11ec81f49328d3f0fee484fba5191d4c29c42ad.tar.bz2
tangerine-wallet-browser-d11ec81f49328d3f0fee484fba5191d4c29c42ad.tar.lz
tangerine-wallet-browser-d11ec81f49328d3f0fee484fba5191d4c29c42ad.tar.xz
tangerine-wallet-browser-d11ec81f49328d3f0fee484fba5191d4c29c42ad.tar.zst
tangerine-wallet-browser-d11ec81f49328d3f0fee484fba5191d4c29c42ad.zip
Merge branch 'master' into i2621-0xRecipientAddress
Diffstat (limited to 'app/scripts/controllers/transactions.js')
-rw-r--r--app/scripts/controllers/transactions.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index 7c7efb84d..469deb670 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -32,6 +32,7 @@ module.exports = class TransactionController extends EventEmitter {
this.provider = opts.provider
this.blockTracker = opts.blockTracker
this.signEthTx = opts.signTransaction
+ this.getGasPrice = opts.getGasPrice
this.memStore = new ObservableStore({})
this.query = new EthQuery(this.provider)
@@ -179,7 +180,8 @@ module.exports = class TransactionController extends EventEmitter {
// ensure value
txMeta.gasPriceSpecified = Boolean(txParams.gasPrice)
txMeta.nonceSpecified = Boolean(txParams.nonce)
- const gasPrice = txParams.gasPrice || await this.query.gasPrice()
+ const gasPrice = txParams.gasPrice || this.getGasPrice ? this.getGasPrice()
+ : await this.query.gasPrice()
txParams.gasPrice = ethUtil.addHexPrefix(gasPrice.toString(16))
txParams.value = txParams.value || '0x0'
// set gasLimit