|
|
|
@ -28,6 +28,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) { |
|
|
|
|
const [constructorInterface, setConstructorInterface] = useState<FuncABI>(null) |
|
|
|
|
const [constructorInputs, setConstructorInputs] = useState(null) |
|
|
|
|
const contractsRef = useRef<HTMLSelectElement>(null) |
|
|
|
|
const atAddressValue = useRef<HTMLInputElement>(null) |
|
|
|
|
const { contractList, loadType, currentFile, currentContract, compilationCount, deployOptions, proxyKey } = props.contracts |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
@ -52,7 +53,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) { |
|
|
|
|
}, [loadedAddress]) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
if (/.(.abi)$/.exec(currentFile)) { |
|
|
|
|
if (/.(.abi)$/.exec(currentFile) && "" !== atAddressValue.current.value) { |
|
|
|
|
setAbiLabel({ |
|
|
|
|
display: 'block', |
|
|
|
|
content: currentFile |
|
|
|
@ -175,7 +176,6 @@ export function ContractDropdownUI (props: ContractDropdownProps) { |
|
|
|
|
|
|
|
|
|
const atAddressChanged = (event) => { |
|
|
|
|
const value = event.target.value |
|
|
|
|
|
|
|
|
|
if (!value) { |
|
|
|
|
enableAtAddress(false) |
|
|
|
|
} else { |
|
|
|
@ -282,6 +282,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) { |
|
|
|
|
<div className="udapp_button udapp_atAddressSect"> |
|
|
|
|
<button className="udapp_atAddress btn btn-sm btn-info" id="runAndDeployAtAdressButton" disabled={atAddressOptions.disabled} title={atAddressOptions.title} onClick={loadFromAddress}>At Address</button> |
|
|
|
|
<input |
|
|
|
|
ref={atAddressValue} |
|
|
|
|
className="udapp_input udapp_ataddressinput ataddressinput form-control" |
|
|
|
|
placeholder="Load contract from Address" |
|
|
|
|
title="address of contract" |
|
|
|
|