From 01877261d1146703224a465c4a6ccc7feb557103 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 16 Feb 2021 16:10:31 +0530 Subject: [PATCH] address checks updated --- apps/remix-ide/src/app/tabs/runTab/contractDropdown.js | 3 +-- apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js b/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js index 859c192a5a..20101d1174 100644 --- a/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js +++ b/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js @@ -98,8 +98,7 @@ class ContractDropdownUI { enableAtAddress (enable) { if (enable) { const address = this.atAddressButtonInput.value - if (!address || !ethJSUtil.isValidAddress(address) || - (/[a-f]/.test(address) && /[A-F]/.test(address) && !ethJSUtil.isValidChecksumAddress(address))) return + if (!address || !ethJSUtil.isValidChecksumAddress(address)) return this.atAddress.removeAttribute('disabled') this.atAddress.setAttribute('title', 'Interact with the given contract.') } else { diff --git a/apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js b/apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js index f958bbd1f4..28fcc76d8d 100644 --- a/apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js +++ b/apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js @@ -43,12 +43,6 @@ class DropdownLogic { } loadContractFromAddress (address, confirmCb, cb) { - if (!ethJSUtil.isValidAddress(address)) { - return cb('Invalid address.') - } - if (/[a-f]/.test(address) && /[A-F]/.test(address) && !ethJSUtil.isValidChecksumAddress(address)) { - return cb('Invalid checksum address.') - } if (/.(.abi)$/.exec(this.config.get('currentFile'))) { confirmCb(() => { var abi