diff options
author | Dan <danjm.com@gmail.com> | 2018-06-19 00:37:01 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-06-19 00:37:01 +0800 |
commit | ac7c0277b503c7660d6894a9039d35c8713f52ab (patch) | |
tree | 8b7f3c762288d2b0aa3c9e4df117c4e30c106247 /ui/app/components/send_/send.utils.js | |
parent | 70abe54c94d8c08aa1b73fd63f34b65bc3dff117 (diff) | |
download | tangerine-wallet-browser-ac7c0277b503c7660d6894a9039d35c8713f52ab.tar.gz tangerine-wallet-browser-ac7c0277b503c7660d6894a9039d35c8713f52ab.tar.zst tangerine-wallet-browser-ac7c0277b503c7660d6894a9039d35c8713f52ab.zip |
On send screen amount change, updateGas call now includes current to address.
Diffstat (limited to 'ui/app/components/send_/send.utils.js')
-rw-r--r-- | ui/app/components/send_/send.utils.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/app/components/send_/send.utils.js b/ui/app/components/send_/send.utils.js index 9b26b4e32..dfd459731 100644 --- a/ui/app/components/send_/send.utils.js +++ b/ui/app/components/send_/send.utils.js @@ -29,6 +29,7 @@ module.exports = { estimateGasPriceFromRecentBlocks, generateTokenTransferData, getAmountErrorObject, + getToAddressForGasUpdate, isBalanceSufficient, isTokenBalanceSufficient, } @@ -268,3 +269,7 @@ function estimateGasPriceFromRecentBlocks (recentBlocks) { return lowestPrices[Math.floor(lowestPrices.length / 2)] } + +function getToAddressForGasUpdate (...addresses) { + return [...addresses, ''].find(str => str !== undefined && str !== null).toLowerCase() +} |