aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/send_/send.utils.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/app/components/send_/send.utils.js b/ui/app/components/send_/send.utils.js
index 855d12303..67699be77 100644
--- a/ui/app/components/send_/send.utils.js
+++ b/ui/app/components/send_/send.utils.js
@@ -176,10 +176,11 @@ async function estimateGas ({ selectedAddress, selectedToken, blockGasLimit, to,
// if recipient has no code, gas is 21k max:
const hasRecipient = Boolean(to)
- let code
- if (hasRecipient) code = await global.eth.getCode(to)
- if (hasRecipient && (!code || code === '0x') && !selectedToken) {
- return SIMPLE_GAS_COST
+ if (hasRecipient && !selectedToken) {
+ const code = await global.eth.getCode(to)
+ if (!code || code === '0x') {
+ return SIMPLE_GAS_COST
+ }
}
paramsForGasEstimate.to = selectedToken ? selectedToken.address : to