From fda101912bbb99f7f1adbac9856d34105390c408 Mon Sep 17 00:00:00 2001
From: kumavis <aaron@kumavis.me>
Date: Sun, 21 Oct 2018 00:52:41 -0400
Subject: ui - use variable to clarify result of emptiness check

---
 ui/app/components/send/send.utils.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'ui/app/components/send/send.utils.js')

diff --git a/ui/app/components/send/send.utils.js b/ui/app/components/send/send.utils.js
index af7b3823f..eb1667c63 100644
--- a/ui/app/components/send/send.utils.js
+++ b/ui/app/components/send/send.utils.js
@@ -215,7 +215,9 @@ 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-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'
+    if (codeIsEmpty) {
       return SIMPLE_GAS_COST
     }
   } else if (selectedToken && !to) {
-- 
cgit