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