aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/helpers/transactions.util.js
diff options
context:
space:
mode:
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 64ec82225..2f4b1d095 100644
--- a/ui/app/helpers/transactions.util.js
+++ b/ui/app/helpers/transactions.util.js
@@ -125,7 +125,9 @@ export function getLatestSubmittedTxWithNonce (transactions = [], nonce = '0x0')
export async function isSmartContractAddress (address) {
const code = await global.eth.getCode(address)
- return code && code !== '0x'
+ // 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) {