diff options
author | Dan J Miller <danjm.com@gmail.com> | 2018-01-17 04:14:03 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@users.noreply.github.com> | 2018-01-17 04:14:03 +0800 |
commit | d7a1019a2cda83b263b21d35e0f776e8f76d8998 (patch) | |
tree | f835c5e5958e91202e89852ec532c2555c59fc40 /ui/app/util.js | |
parent | 77eb7b2db692cc40bf5f8e36c5e695e8f82c76ec (diff) | |
download | tangerine-wallet-browser-d7a1019a2cda83b263b21d35e0f776e8f76d8998.tar tangerine-wallet-browser-d7a1019a2cda83b263b21d35e0f776e8f76d8998.tar.gz tangerine-wallet-browser-d7a1019a2cda83b263b21d35e0f776e8f76d8998.tar.bz2 tangerine-wallet-browser-d7a1019a2cda83b263b21d35e0f776e8f76d8998.tar.lz tangerine-wallet-browser-d7a1019a2cda83b263b21d35e0f776e8f76d8998.tar.xz tangerine-wallet-browser-d7a1019a2cda83b263b21d35e0f776e8f76d8998.tar.zst tangerine-wallet-browser-d7a1019a2cda83b263b21d35e0f776e8f76d8998.zip |
Adding one or more tokens sets the selected token before returning the user to the main screen. (#2995)
Diffstat (limited to 'ui/app/util.js')
-rw-r--r-- | ui/app/util.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/app/util.js b/ui/app/util.js index 70c503550..800ccb218 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -56,6 +56,7 @@ module.exports = { exportAsFile: exportAsFile, isInvalidChecksumAddress, allNull, + getTokenAddressFromTokenObject, } function valuesFor (obj) { @@ -281,3 +282,7 @@ function exportAsFile (filename, data) { function allNull (obj) { return Object.entries(obj).every(([key, value]) => value === null) } + +function getTokenAddressFromTokenObject (token) { + return Object.values(token)[0].address.toLowerCase() +} |