From 7f5cefbd82769a9d9ca85d78c25195875b647007 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 11 Jan 2022 12:28:42 +0530 Subject: [PATCH] handle empty arguments --- libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx index 0175f272f9..c8dc13be19 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx @@ -58,6 +58,11 @@ export function ContractGUI (props: ContractGUIProps) { const onCTCMouseDown = () => { const multiString = getMultiValsString() + // copy-to-clipboard icon is only visible for method requiring input params + if (!multiString) { + setClipboardContent('cannot encode empty arguments') + return + } const multiJSON = JSON.parse('[' + multiString + ']') let encodeObj