diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-08-18 05:34:14 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-08-23 05:19:07 +0800 |
commit | 865a0d8173e27c073f00d0d156b95e8d92208a94 (patch) | |
tree | 0bb56f82deb2ede6a0d10de4e3e1454b63b691e9 /ui/app/helpers/confirm-transaction/util.js | |
parent | f30b726df79f1ffe0ba088dba9f3ca730ee7d103 (diff) | |
download | tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar.gz tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar.bz2 tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar.lz tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar.xz tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.tar.zst tangerine-wallet-browser-865a0d8173e27c073f00d0d156b95e8d92208a94.zip |
Use eth_getCode to sort transaction action type
Diffstat (limited to 'ui/app/helpers/confirm-transaction/util.js')
-rw-r--r-- | ui/app/helpers/confirm-transaction/util.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/app/helpers/confirm-transaction/util.js b/ui/app/helpers/confirm-transaction/util.js index 76e80a8ac..3d0cb57e7 100644 --- a/ui/app/helpers/confirm-transaction/util.js +++ b/ui/app/helpers/confirm-transaction/util.js @@ -146,3 +146,8 @@ export function roundExponential (value) { // In JS, numbers with exponentials greater than 20 get displayed as an exponential. return bigNumberValue.e > 20 ? Number(bigNumberValue.toPrecision(PRECISION)) : value } + +export async function isSmartContractAddress (address) { + const code = await global.eth.getCode(address) + return code && code !== '0x' +} |