From 0b5f29131c8051fb8ce0cb4ec142466840c2c101 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 27 Feb 2023 10:55:36 +0100 Subject: [PATCH] disable "deploy" if no account is selected --- .../remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx | 1 + libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx | 3 ++- libs/remix-ui/run-tab/src/lib/run-tab.tsx | 1 + libs/remix-ui/run-tab/src/lib/types/index.ts | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx index 6828170172..ef9d7fb720 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx @@ -319,6 +319,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) { isValidProxyAddress={props.isValidProxyAddress} isValidProxyUpgrade={isValidProxyUpgrade} modal={props.modal} + disabled={props.selectedAccount === ''} />
{buttonOptions.content} diff --git a/libs/remix-ui/run-tab/src/lib/run-tab.tsx b/libs/remix-ui/run-tab/src/lib/run-tab.tsx index d01c86d6c4..ae5474e492 100644 --- a/libs/remix-ui/run-tab/src/lib/run-tab.tsx +++ b/libs/remix-ui/run-tab/src/lib/run-tab.tsx @@ -223,6 +223,7 @@ export function RunTabUI (props: RunTabProps) { passphrase={runTab.passphrase} /> JSX.Element export interface ContractDropdownProps { + selectedAccount: string, exEnvironment: string, contracts: { contractList: ContractList,