aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/conversion-util.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-09-20 21:56:20 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-09-22 07:43:29 +0800
commit39afbea7aaf17cfee5d7fc11299cb82e657edd7e (patch)
tree2050ca79891021802a4a13273dc24a7ce170e5ac /ui/app/conversion-util.js
parent4fa79ffc6eccce1c758f719062d2db6abb65489c (diff)
downloadtangerine-wallet-browser-39afbea7aaf17cfee5d7fc11299cb82e657edd7e.tar
tangerine-wallet-browser-39afbea7aaf17cfee5d7fc11299cb82e657edd7e.tar.gz
tangerine-wallet-browser-39afbea7aaf17cfee5d7fc11299cb82e657edd7e.tar.bz2
tangerine-wallet-browser-39afbea7aaf17cfee5d7fc11299cb82e657edd7e.tar.lz
tangerine-wallet-browser-39afbea7aaf17cfee5d7fc11299cb82e657edd7e.tar.xz
tangerine-wallet-browser-39afbea7aaf17cfee5d7fc11299cb82e657edd7e.tar.zst
tangerine-wallet-browser-39afbea7aaf17cfee5d7fc11299cb82e657edd7e.zip
Confirm screen shows amount plus gas in total field
Diffstat (limited to 'ui/app/conversion-util.js')
-rw-r--r--ui/app/conversion-util.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/app/conversion-util.js b/ui/app/conversion-util.js
index 29e5ce668..0ede77487 100644
--- a/ui/app/conversion-util.js
+++ b/ui/app/conversion-util.js
@@ -114,6 +114,16 @@ const conversionUtil = (value, {
value,
});
+const addCurrencies = (a, b, { toNumericBase, numberOfDecimals }) => {
+ const value = (new BigNumber(a)).add(b);
+ return converter({
+ value,
+ toNumericBase,
+ numberOfDecimals,
+ })
+}
+
module.exports = {
conversionUtil,
+ addCurrencies,
} \ No newline at end of file