|
|
@ -275,6 +275,12 @@ export function ContractGUI (props: ContractGUIProps) { |
|
|
|
className="udapp_contractActionsContainerSingle pt-2" |
|
|
|
className="udapp_contractActionsContainerSingle pt-2" |
|
|
|
style={{ display: toggleContainer ? "none" : "flex" }} |
|
|
|
style={{ display: toggleContainer ? "none" : "flex" }} |
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
<CustomTooltip |
|
|
|
|
|
|
|
placement={"right"} |
|
|
|
|
|
|
|
tooltipClasses="text-wrap" |
|
|
|
|
|
|
|
tooltipId="remixUdappInstanceButtonTooltip" |
|
|
|
|
|
|
|
tooltipText={toggleUpgradeImp && !proxyAddress ? 'Proxy address cannot be empty' : buttonOptions.title} |
|
|
|
|
|
|
|
> |
|
|
|
<button |
|
|
|
<button |
|
|
|
onClick={handleActionClick} |
|
|
|
onClick={handleActionClick} |
|
|
|
className={`udapp_instanceButton ${props.widthClass} btn btn-sm ${buttonOptions.classList}`} |
|
|
|
className={`udapp_instanceButton ${props.widthClass} btn btn-sm ${buttonOptions.classList}`} |
|
|
@ -282,47 +288,41 @@ export function ContractGUI (props: ContractGUIProps) { |
|
|
|
data-title={buttonOptions.title} |
|
|
|
data-title={buttonOptions.title} |
|
|
|
disabled={(toggleUpgradeImp && !proxyAddress) || props.disabled} |
|
|
|
disabled={(toggleUpgradeImp && !proxyAddress) || props.disabled} |
|
|
|
> |
|
|
|
> |
|
|
|
<CustomTooltip |
|
|
|
<div>{title}</div> |
|
|
|
placement={"right"} |
|
|
|
|
|
|
|
tooltipClasses="text-wrap" |
|
|
|
|
|
|
|
tooltipId="remixUdappInstanceButtonTooltip" |
|
|
|
|
|
|
|
tooltipText={toggleUpgradeImp && !proxyAddress ? 'Proxy address cannot be empty' : buttonOptions.title} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div>{title}</div> |
|
|
|
|
|
|
|
</CustomTooltip> |
|
|
|
|
|
|
|
</button> |
|
|
|
</button> |
|
|
|
<input |
|
|
|
</CustomTooltip> |
|
|
|
className="form-control" |
|
|
|
<input |
|
|
|
data-id={ |
|
|
|
className="form-control" |
|
|
|
|
|
|
|
data-id={ |
|
|
|
|
|
|
|
props.funcABI.type === "fallback" || |
|
|
|
|
|
|
|
props.funcABI.type === "receive" |
|
|
|
|
|
|
|
? `'(${props.funcABI.type}')` |
|
|
|
|
|
|
|
: "multiParamManagerBasicInputField" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
placeholder={props.inputs} |
|
|
|
|
|
|
|
onChange={handleBasicInput} |
|
|
|
|
|
|
|
ref={basicInputRef} |
|
|
|
|
|
|
|
style={{ |
|
|
|
|
|
|
|
visibility: !( |
|
|
|
|
|
|
|
(props.funcABI.inputs && props.funcABI.inputs.length > 0) || |
|
|
|
props.funcABI.type === "fallback" || |
|
|
|
props.funcABI.type === "fallback" || |
|
|
|
props.funcABI.type === "receive" |
|
|
|
props.funcABI.type === "receive" |
|
|
|
? `'(${props.funcABI.type}')` |
|
|
|
) |
|
|
|
: "multiParamManagerBasicInputField" |
|
|
|
? "hidden" |
|
|
|
} |
|
|
|
: "visible", |
|
|
|
placeholder={props.inputs} |
|
|
|
}} |
|
|
|
onChange={handleBasicInput} |
|
|
|
/> |
|
|
|
ref={basicInputRef} |
|
|
|
<i |
|
|
|
style={{ |
|
|
|
className="fas fa-angle-down udapp_methCaret" |
|
|
|
visibility: !( |
|
|
|
onClick={switchMethodViewOn} |
|
|
|
(props.funcABI.inputs && props.funcABI.inputs.length > 0) || |
|
|
|
style={{ |
|
|
|
props.funcABI.type === "fallback" || |
|
|
|
visibility: !( |
|
|
|
props.funcABI.type === "receive" |
|
|
|
props.funcABI.inputs && props.funcABI.inputs.length > 0 |
|
|
|
) |
|
|
|
) |
|
|
|
? "hidden" |
|
|
|
? "hidden" |
|
|
|
: "visible", |
|
|
|
: "visible", |
|
|
|
}} |
|
|
|
}} |
|
|
|
/> |
|
|
|
></i> |
|
|
|
<i |
|
|
|
|
|
|
|
className="fas fa-angle-down udapp_methCaret" |
|
|
|
|
|
|
|
onClick={switchMethodViewOn} |
|
|
|
|
|
|
|
style={{ |
|
|
|
|
|
|
|
visibility: !( |
|
|
|
|
|
|
|
props.funcABI.inputs && props.funcABI.inputs.length > 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
? "hidden" |
|
|
|
|
|
|
|
: "visible", |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
></i> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="udapp_contractActionsContainerMulti" |
|
|
|
className="udapp_contractActionsContainerMulti" |
|
|
@ -463,14 +463,14 @@ export function ContractGUI (props: ContractGUIProps) { |
|
|
|
{" "} |
|
|
|
{" "} |
|
|
|
{inp.name}:{" "} |
|
|
|
{inp.name}:{" "} |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
<input |
|
|
|
<input |
|
|
|
ref={(el) => { |
|
|
|
ref={(el) => { |
|
|
|
initializeFields.current[index] = el; |
|
|
|
initializeFields.current[index] = el; |
|
|
|
}} |
|
|
|
}} |
|
|
|
style={{ height: 32 }} |
|
|
|
style={{ height: 32 }} |
|
|
|
className="form-control udapp_input" |
|
|
|
className="form-control udapp_input" |
|
|
|
placeholder={inp.type} |
|
|
|
placeholder={inp.type} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
})} |
|
|
|
})} |
|
|
@ -526,26 +526,26 @@ export function ContractGUI (props: ContractGUIProps) { |
|
|
|
tooltipText={'Deployed ' + shortenDate(deployment.date)} |
|
|
|
tooltipText={'Deployed ' + shortenDate(deployment.date)} |
|
|
|
key={index} |
|
|
|
key={index} |
|
|
|
> |
|
|
|
> |
|
|
|
<Dropdown.Item |
|
|
|
<Dropdown.Item |
|
|
|
key={index} |
|
|
|
key={index} |
|
|
|
onClick={() => { |
|
|
|
onClick={() => { |
|
|
|
switchProxyAddress(deployment.address) |
|
|
|
switchProxyAddress(deployment.address) |
|
|
|
}} |
|
|
|
}} |
|
|
|
data-id={`proxyAddress${index}`} |
|
|
|
data-id={`proxyAddress${index}`} |
|
|
|
> |
|
|
|
> |
|
|
|
<span>{ proxyAddress === deployment.address ? <span>✓ { deployment.contractName + ' ' + shortenProxyAddress(deployment.address) } </span> : <span className="pl-3">{ deployment.contractName + ' ' + shortenProxyAddress(deployment.address) }</span> }</span> |
|
|
|
<span>{ proxyAddress === deployment.address ? <span>✓ { deployment.contractName + ' ' + shortenProxyAddress(deployment.address) } </span> : <span className="pl-3">{ deployment.contractName + ' ' + shortenProxyAddress(deployment.address) }</span> }</span> |
|
|
|
</Dropdown.Item> |
|
|
|
</Dropdown.Item> |
|
|
|
</CustomTooltip> |
|
|
|
</CustomTooltip> |
|
|
|
)) |
|
|
|
)) |
|
|
|
} |
|
|
|
} |
|
|
|
</Dropdown.Menu> |
|
|
|
</Dropdown.Menu> |
|
|
|
} |
|
|
|
} |
|
|
|
</Dropdown> |
|
|
|
</Dropdown> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className='d-flex'> |
|
|
|
<div className='d-flex'> |
|
|
|
<div className="mb-2"> |
|
|
|
<div className="mb-2"> |
|
|
|
{ proxyAddressError && <span className='text-lowercase text-danger' data-id="errorMsgProxyAddress" style={{ fontSize: '.8em' }}>{ proxyAddressError }</span> } |
|
|
|
{ proxyAddressError && <span className='text-lowercase text-danger' data-id="errorMsgProxyAddress" style={{ fontSize: '.8em' }}>{ proxyAddressError }</span> } |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</>
|
|
|
|
</>
|
|
|
|