aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/util.js
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2017-09-14 10:57:33 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-09-14 10:57:33 +0800
commitd722c1045f70954cb1a97de52cae5084a6f14815 (patch)
tree45307f0cf792991d2e0284f9479c9aae49ed13e8 /ui/app/util.js
parent6bd71d69378c74de8748bdfb5476ec082077676c (diff)
downloadtangerine-wallet-browser-d722c1045f70954cb1a97de52cae5084a6f14815.tar
tangerine-wallet-browser-d722c1045f70954cb1a97de52cae5084a6f14815.tar.gz
tangerine-wallet-browser-d722c1045f70954cb1a97de52cae5084a6f14815.tar.bz2
tangerine-wallet-browser-d722c1045f70954cb1a97de52cae5084a6f14815.tar.lz
tangerine-wallet-browser-d722c1045f70954cb1a97de52cae5084a6f14815.tar.xz
tangerine-wallet-browser-d722c1045f70954cb1a97de52cae5084a6f14815.tar.zst
tangerine-wallet-browser-d722c1045f70954cb1a97de52cae5084a6f14815.zip
Update yarn.lock; Fix tx-list-item overflow; Fix gas exchange rate
Diffstat (limited to 'ui/app/util.js')
-rw-r--r--ui/app/util.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/app/util.js b/ui/app/util.js
index e058dc92b..6596ebafb 100644
--- a/ui/app/util.js
+++ b/ui/app/util.js
@@ -1,3 +1,4 @@
+const abi = require('human-standard-token-abi')
const ethUtil = require('ethereumjs-util')
const hexToBn = require('../../app/scripts/lib/hex-to-bn')
const vreme = new (require('vreme'))()
@@ -51,6 +52,7 @@ module.exports = {
bnMultiplyByFraction,
getTxFeeBn,
shortenBalance,
+ getContractAtAddress,
}
function valuesFor (obj) {
@@ -244,3 +246,7 @@ function getTxFeeBn (gas, gasPrice = MIN_GAS_PRICE_BN.toString(16), blockGasLimi
return txFeeBn.toString(16)
}
+
+function getContractAtAddress (tokenAddress) {
+ return global.eth.contract(abi).at(tokenAddress)
+}