aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/send.utils.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-06-29 07:33:09 +0800
committerDan <danjm.com@gmail.com>2018-06-29 07:33:09 +0800
commit696d6261338e96a3a7786e08940ab51cad98cb22 (patch)
tree839dbce5ab038b898232e065597e091bc3296ea6 /ui/app/components/send_/send.utils.js
parent9f5ee94b6937c741684de5e70ac0f9fea5f50226 (diff)
downloadtangerine-wallet-browser-696d6261338e96a3a7786e08940ab51cad98cb22.tar.gz
tangerine-wallet-browser-696d6261338e96a3a7786e08940ab51cad98cb22.tar.zst
tangerine-wallet-browser-696d6261338e96a3a7786e08940ab51cad98cb22.zip
Set based estimate for token sends to be updated once recipient address specified.
Diffstat (limited to 'ui/app/components/send_/send.utils.js')
-rw-r--r--ui/app/components/send_/send.utils.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/app/components/send_/send.utils.js b/ui/app/components/send_/send.utils.js
index dfd459731..872df1d2f 100644
--- a/ui/app/components/send_/send.utils.js
+++ b/ui/app/components/send_/send.utils.js
@@ -10,6 +10,7 @@ const {
calcTokenAmount,
} = require('../../token-util')
const {
+ BASE_TOKEN_GAS_COST,
INSUFFICIENT_FUNDS_ERROR,
INSUFFICIENT_TOKENS_ERROR,
NEGATIVE_ETH_ERROR,
@@ -183,6 +184,8 @@ async function estimateGas ({ selectedAddress, selectedToken, blockGasLimit, to,
if (!code || code === '0x') {
return SIMPLE_GAS_COST
}
+ } else if (selectedToken && !to) {
+ return BASE_TOKEN_GAS_COST
}
paramsForGasEstimate.to = selectedToken ? selectedToken.address : to