aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorHoward Braham <howrad@gmail.com>2018-09-29 02:01:34 +0800
committerHoward Braham <howrad@gmail.com>2018-10-10 06:31:25 +0800
commit4cc0b1ef01573e1541d18bdcd89650e1db32ae9a (patch)
treeb362504595ff4c7c233dc958de11a82d88ef8b79 /ui
parent222e62d7f10ffe22dd606aea9c15e1547986c4ab (diff)
downloadtangerine-wallet-browser-4cc0b1ef01573e1541d18bdcd89650e1db32ae9a.tar.gz
tangerine-wallet-browser-4cc0b1ef01573e1541d18bdcd89650e1db32ae9a.tar.zst
tangerine-wallet-browser-4cc0b1ef01573e1541d18bdcd89650e1db32ae9a.zip
ganache-core merged my PR, so I changed some comments to clarify that ganache-core v2.2.1 and below will return the non-standard '0x0'
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/send/send.utils.js2
-rw-r--r--ui/app/helpers/transactions.util.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/ui/app/components/send/send.utils.js b/ui/app/components/send/send.utils.js
index 05ba6b88f..af7b3823f 100644
--- a/ui/app/components/send/send.utils.js
+++ b/ui/app/components/send/send.utils.js
@@ -215,7 +215,7 @@ async function estimateGas ({
// if recipient has no code, gas is 21k max:
if (!selectedToken && !data) {
const code = Boolean(to) && await global.eth.getCode(to)
- if (!code || code === '0x' || code === '0x0') { // Infura will return '0x', and Ganache will return '0x0'
+ if (!code || code === '0x' || code === '0x0') { // Infura will return '0x', and ganache-core v2.2.1 will return '0x0'
return SIMPLE_GAS_COST
}
} else if (selectedToken && !to) {
diff --git a/ui/app/helpers/transactions.util.js b/ui/app/helpers/transactions.util.js
index 0eb7972d6..b2c617384 100644
--- a/ui/app/helpers/transactions.util.js
+++ b/ui/app/helpers/transactions.util.js
@@ -114,7 +114,7 @@ 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 will return '0x0'
+ return code && code !== '0x' && code !== '0x0' // Infura will return '0x', and ganache-core v2.2.1 will return '0x0'
}
export function sumHexes (...args) {