aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers
diff options
context:
space:
mode:
authorThomas Huang <thomas.b.huang@gmail.com>2017-06-20 08:50:06 +0800
committerThomas Huang <thomas.b.huang@gmail.com>2017-06-20 08:50:06 +0800
commit235cb1f2d790a7bda349ab0d33ad1009751a8536 (patch)
tree978ccf610f3cffd43af65cb8e83ea835faa01469 /app/scripts/controllers
parentfcf14b7aa7b4a7e9d336eea784e395de29cd84fb (diff)
downloadtangerine-wallet-browser-235cb1f2d790a7bda349ab0d33ad1009751a8536.tar
tangerine-wallet-browser-235cb1f2d790a7bda349ab0d33ad1009751a8536.tar.gz
tangerine-wallet-browser-235cb1f2d790a7bda349ab0d33ad1009751a8536.tar.bz2
tangerine-wallet-browser-235cb1f2d790a7bda349ab0d33ad1009751a8536.tar.lz
tangerine-wallet-browser-235cb1f2d790a7bda349ab0d33ad1009751a8536.tar.xz
tangerine-wallet-browser-235cb1f2d790a7bda349ab0d33ad1009751a8536.tar.zst
tangerine-wallet-browser-235cb1f2d790a7bda349ab0d33ad1009751a8536.zip
Keeps dapp gas price if set
Diffstat (limited to 'app/scripts/controllers')
-rw-r--r--app/scripts/controllers/transactions.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index d9d9849b1..e3c2d74d3 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -152,13 +152,15 @@ module.exports = class TransactionController extends EventEmitter {
const txParams = txMeta.txParams
// ensure value
txParams.value = txParams.value || '0x0'
- this.query.gasPrice((err, gasPrice) => {
- if (err) return cb(err)
- // set gasPrice
- txParams.gasPrice = gasPrice
- // set gasLimit
- this.txProviderUtils.analyzeGasUsage(txMeta, cb)
- })
+ if (!txParams.gasPrice) {
+ this.query.gasPrice((err, gasPrice) => {
+ if (err) return cb(err)
+ // set gasPrice
+ txParams.gasPrice = gasPrice
+ })
+ }
+ // set gasLimit
+ this.txProviderUtils.analyzeGasUsage(txMeta, cb)
}
getUnapprovedTxList () {