aboutsummaryrefslogtreecommitdiffstats
path: root/old-ui
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 /old-ui
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 'old-ui')
-rw-r--r--old-ui/app/components/pending-tx.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/old-ui/app/components/pending-tx.js b/old-ui/app/components/pending-tx.js
index d8d2334a4..b02476f46 100644
--- a/old-ui/app/components/pending-tx.js
+++ b/old-ui/app/components/pending-tx.js
@@ -488,8 +488,10 @@ PendingTx.prototype.verifyGasParams = function () {
)
}
-PendingTx.prototype._notZeroOrEmptyString = function (obj) {
- return obj !== '' && obj !== '0x0' && obj !== '0x' // '0x' means null
+PendingTx.prototype._notZeroOrEmptyString = function (value) {
+ // Geth will return '0x', and ganache-core v2.2.1 will return '0x0'
+ const valueIsEmpty = !value || value === '0x' || value === '0x0'
+ return !valueIsEmpty
}
PendingTx.prototype.bnMultiplyByFraction = function (targetBN, numerator, denominator) {