aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/token-util.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@users.noreply.github.com>2018-11-20 08:06:34 +0800
committerGitHub <noreply@github.com>2018-11-20 08:06:34 +0800
commit4c87c05a02d5bf5634234a74910e5d3e559dd413 (patch)
tree638338429538e6bc62b5ad812c11e1f7925fe184 /ui/app/token-util.js
parent7fe37276a17cbbcb566a0650603eb5ed6115179b (diff)
downloadtangerine-wallet-browser-4c87c05a02d5bf5634234a74910e5d3e559dd413.tar.gz
tangerine-wallet-browser-4c87c05a02d5bf5634234a74910e5d3e559dd413.tar.zst
tangerine-wallet-browser-4c87c05a02d5bf5634234a74910e5d3e559dd413.zip
Fix rounding issue when sending max tokens (#5695)
* Fix rounding issue when sending max tokens * Ensure amount row shows exact amount of max tokens on send screen (#2) * Fix tests * Change stored redux value from BigNumber to hex string. Fix TokenInput default value
Diffstat (limited to 'ui/app/token-util.js')
-rw-r--r--ui/app/token-util.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/app/token-util.js b/ui/app/token-util.js
index 6e4992763..35a19a69f 100644
--- a/ui/app/token-util.js
+++ b/ui/app/token-util.js
@@ -109,7 +109,7 @@ export function tokenInfoGetter () {
export function calcTokenAmount (value, decimals) {
const multiplier = Math.pow(10, Number(decimals || 0))
- return new BigNumber(String(value)).div(multiplier).toNumber()
+ return new BigNumber(String(value)).div(multiplier)
}
export function getTokenValue (tokenParams = []) {