diff options
Diffstat (limited to 'ui/app/selectors.js')
-rw-r--r-- | ui/app/selectors.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/app/selectors.js b/ui/app/selectors.js index 3a15cef4c..a5f9a75d8 100644 --- a/ui/app/selectors.js +++ b/ui/app/selectors.js @@ -1,4 +1,5 @@ const valuesFor = require('./util').valuesFor +const abi = require('human-standard-token-abi') const { multiplyCurrencies, @@ -22,6 +23,7 @@ const selectors = { getCurrentCurrency, getSendAmount, getSelectedTokenToFiatRate, + getSelectedTokenContract, } module.exports = selectors @@ -149,3 +151,10 @@ function getSelectedTokenToFiatRate (state) { return tokenToFiatRate } + +function getSelectedTokenContract (state) { + const selectedToken = getSelectedToken(state) + return selectedToken + ? global.eth.contract(abi).at(selectedToken.address) + : null +} |