aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/helpers/transactions.util.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-09-01 03:36:07 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-09-13 10:48:52 +0800
commitfd51ab12298e93286eeaf03c60e0b4e8d5d1bad3 (patch)
tree69e43bf265b933a158a9ab6e5251df2109f31ea7 /ui/app/helpers/transactions.util.js
parent084158f1a2af9d117c054420e895f4ae76a94df0 (diff)
downloadtangerine-wallet-browser-fd51ab12298e93286eeaf03c60e0b4e8d5d1bad3.tar
tangerine-wallet-browser-fd51ab12298e93286eeaf03c60e0b4e8d5d1bad3.tar.gz
tangerine-wallet-browser-fd51ab12298e93286eeaf03c60e0b4e8d5d1bad3.tar.bz2
tangerine-wallet-browser-fd51ab12298e93286eeaf03c60e0b4e8d5d1bad3.tar.lz
tangerine-wallet-browser-fd51ab12298e93286eeaf03c60e0b4e8d5d1bad3.tar.xz
tangerine-wallet-browser-fd51ab12298e93286eeaf03c60e0b4e8d5d1bad3.tar.zst
tangerine-wallet-browser-fd51ab12298e93286eeaf03c60e0b4e8d5d1bad3.zip
Add TransactionBreakdown component
Diffstat (limited to 'ui/app/helpers/transactions.util.js')
-rw-r--r--ui/app/helpers/transactions.util.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/app/helpers/transactions.util.js b/ui/app/helpers/transactions.util.js
index 54df54aa8..b88b00ac6 100644
--- a/ui/app/helpers/transactions.util.js
+++ b/ui/app/helpers/transactions.util.js
@@ -16,6 +16,8 @@ import {
UNKNOWN_FUNCTION_KEY,
} from '../constants/transactions'
+import { addCurrencies } from '../conversion-util'
+
abiDecoder.addABI(abi)
export function getTokenData (data = {}) {
@@ -103,3 +105,13 @@ export async function isSmartContractAddress (address) {
const code = await global.eth.getCode(address)
return code && code !== '0x'
}
+
+export function addHex (...args) {
+ const total = args.reduce((acc, base) => {
+ return addCurrencies(acc, base, {
+ toNumericBase: 'hex',
+ })
+ })
+
+ return ethUtil.addHexPrefix(total)
+}