|
|
|
@ -97,7 +97,10 @@ class ContractDropdownUI { |
|
|
|
|
enableAtAddress (enable) { |
|
|
|
|
if (enable) { |
|
|
|
|
const address = this.atAddressButtonInput.value |
|
|
|
|
if (!address || !ethJSUtil.isValidChecksumAddress(address)) return |
|
|
|
|
if (!address || !ethJSUtil.isValidAddress(address)) { |
|
|
|
|
this.enableAtAddress(false) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.atAddress.removeAttribute('disabled') |
|
|
|
|
this.atAddress.setAttribute('title', 'Interact with the given contract.') |
|
|
|
|
} else { |
|
|
|
@ -387,7 +390,10 @@ class ContractDropdownUI { |
|
|
|
|
loadFromAddress () { |
|
|
|
|
this.event.trigger('clearInstance') |
|
|
|
|
|
|
|
|
|
var address = this.atAddressButtonInput.value |
|
|
|
|
let address = this.atAddressButtonInput.value |
|
|
|
|
if (!ethJSUtil.isValidChecksumAddress(address)) { |
|
|
|
|
address = ethJSUtil.toChecksumAddress(address) |
|
|
|
|
} |
|
|
|
|
this.dropdownLogic.loadContractFromAddress(address, |
|
|
|
|
(cb) => { |
|
|
|
|
modalDialogCustom.confirm(null, 'Do you really want to interact with ' + address + ' using the current ABI definition?', cb) |
|
|
|
|