disable "deploy" if no account is selected

pull/3437/head
yann300 2 years ago committed by Aniket
parent aad2dfbce8
commit 0b5f29131c
  1. 1
      libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx
  2. 3
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
  3. 1
      libs/remix-ui/run-tab/src/lib/run-tab.tsx
  4. 1
      libs/remix-ui/run-tab/src/lib/types/index.ts

@ -319,6 +319,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) {
isValidProxyAddress={props.isValidProxyAddress}
isValidProxyUpgrade={isValidProxyUpgrade}
modal={props.modal}
disabled={props.selectedAccount === ''}
/>
<div className="d-flex py-1 align-items-center custom-control custom-checkbox">
<input

@ -280,7 +280,7 @@ export function ContractGUI (props: ContractGUIProps) {
className={`udapp_instanceButton ${props.widthClass} btn btn-sm ${buttonOptions.classList}`}
data-id={buttonOptions.dataId}
data-title={buttonOptions.title}
disabled={toggleUpgradeImp && !proxyAddress}
disabled={(toggleUpgradeImp && !proxyAddress) || props.disabled}
>
<CustomTooltip
placement={"right-start"}
@ -415,6 +415,7 @@ export function ContractGUI (props: ContractGUIProps) {
onClick={handleExpandMultiClick}
data-id={buttonOptions.dataId}
className={`udapp_instanceButton ${buttonOptions.classList}`}
disabled={props.disabled}
>
{buttonOptions.content}
</button>

@ -223,6 +223,7 @@ export function RunTabUI (props: RunTabProps) {
passphrase={runTab.passphrase}
/>
<ContractDropdownUI
selectedAccount={runTab.accounts.selectedAccount}
syncContracts={syncContracts}
exEnvironment={runTab.selectExEnv}
contracts={runTab.contracts}

@ -224,6 +224,7 @@ export type MainnetPrompt = (
) => JSX.Element
export interface ContractDropdownProps {
selectedAccount: string,
exEnvironment: string,
contracts: {
contractList: ContractList,

Loading…
Cancel
Save