aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/conversion-util.js
diff options
context:
space:
mode:
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