aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/helpers/transactions.util.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-10-21 12:52:41 +0800
committerkumavis <aaron@kumavis.me>2018-10-21 12:52:41 +0800
commitfda101912bbb99f7f1adbac9856d34105390c408 (patch)
tree7bd60c5cdb13d51a4607b538d96e71ab9f9ff08d /ui/app/helpers/transactions.util.js
parent3b46478024f87bd237b507e5fb18068febf02de9 (diff)
downloadtangerine-wallet-browser-fda101912bbb99f7f1adbac9856d34105390c408.tar
tangerine-wallet-browser-fda101912bbb99f7f1adbac9856d34105390c408.tar.gz
tangerine-wallet-browser-fda101912bbb99f7f1adbac9856d34105390c408.tar.bz2
tangerine-wallet-browser-fda101912bbb99f7f1adbac9856d34105390c408.tar.lz
tangerine-wallet-browser-fda101912bbb99f7f1adbac9856d34105390c408.tar.xz
tangerine-wallet-browser-fda101912bbb99f7f1adbac9856d34105390c408.tar.zst
tangerine-wallet-browser-fda101912bbb99f7f1adbac9856d34105390c408.zip
ui - use variable to clarify result of emptiness check
Diffstat (limited to 'ui/app/helpers/transactions.util.js')
-rw-r--r--ui/app/helpers/transactions.util.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/app/helpers/transactions.util.js b/ui/app/helpers/transactions.util.js
index 9be77e14f..cfe2c4229 100644
--- a/ui/app/helpers/transactions.util.js
+++ b/ui/app/helpers/transactions.util.js
@@ -114,7 +114,9 @@ export function getLatestSubmittedTxWithNonce (transactions = [], nonce = '0x0')
export async function isSmartContractAddress (address) {
const code = await global.eth.getCode(address)
- return code && code !== '0x' && code !== '0x0' // Infura will return '0x', and ganache-core v2.2.1 will return '0x0'
+ // Geth will return '0x', and ganache-core v2.2.1 will return '0x0'
+ const codeIsEmpty = !code || code === '0x' || code === '0x0'
+ return !codeIsEmpty
}
export function sumHexes (...args) {