diff options
author | TrejGun <trejgun@gmail.com> | 2018-07-05 11:34:13 +0800 |
---|---|---|
committer | TrejGun <trejgun@gmail.com> | 2018-07-05 11:34:13 +0800 |
commit | 94d1d846fb57932fd1e959f53dbf6444f0789e91 (patch) | |
tree | 369276cd66bdcae85cac77b2c9b2458de5b08dd7 /ui/app/components/send_/send.utils.js | |
parent | c94f639de55a867ebe8d3599d337a1f7341b1979 (diff) | |
parent | fd218142acb6dab0b2f921b9729f17ff90cffc2d (diff) | |
download | tangerine-wallet-browser-94d1d846fb57932fd1e959f53dbf6444f0789e91.tar.gz tangerine-wallet-browser-94d1d846fb57932fd1e959f53dbf6444f0789e91.tar.zst tangerine-wallet-browser-94d1d846fb57932fd1e959f53dbf6444f0789e91.zip |
Merge branch 'develop' into contextTypes
# Conflicts:
# ui/app/components/send_/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js
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 872df1d2f..34275248f 100644 --- a/ui/app/components/send_/send.utils.js +++ b/ui/app/components/send_/send.utils.js @@ -33,6 +33,7 @@ module.exports = { getToAddressForGasUpdate, isBalanceSufficient, isTokenBalanceSufficient, + removeLeadingZeroes, } function calcGasTotal (gasLimit, gasPrice) { @@ -276,3 +277,7 @@ function estimateGasPriceFromRecentBlocks (recentBlocks) { function getToAddressForGasUpdate (...addresses) { return [...addresses, ''].find(str => str !== undefined && str !== null).toLowerCase() } + +function removeLeadingZeroes (str) { + return str.replace(/^0*(?=\d)/, '') +} |