From dfd3da74734f626cae8521dfddd8f1df6e0874e4 Mon Sep 17 00:00:00 2001 From: tokodev Date: Wed, 7 Feb 2024 13:43:30 +0100 Subject: [PATCH 1/9] Fix zero inputs send button positioning --- .../scaffold-eth/Contract/WriteOnlyFunctionForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/components/scaffold-eth/Contract/WriteOnlyFunctionForm.tsx b/packages/nextjs/components/scaffold-eth/Contract/WriteOnlyFunctionForm.tsx index 809dbdec..33686f34 100644 --- a/packages/nextjs/components/scaffold-eth/Contract/WriteOnlyFunctionForm.tsx +++ b/packages/nextjs/components/scaffold-eth/Contract/WriteOnlyFunctionForm.tsx @@ -94,7 +94,7 @@ export const WriteOnlyFunctionForm = ({ return (
-
+

{abiFunction.name} @@ -116,7 +116,7 @@ export const WriteOnlyFunctionForm = ({ />

) : null} -
+
{!zeroInputs && (
{displayedTxResult ? : null} From 97ab42a2ccbb242a4faf7b044b0b12d905695801 Mon Sep 17 00:00:00 2001 From: tokodev Date: Wed, 7 Feb 2024 14:17:01 +0100 Subject: [PATCH 2/9] Fix read button positioning and result gap --- .../components/scaffold-eth/Contract/ReadOnlyFunctionForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/components/scaffold-eth/Contract/ReadOnlyFunctionForm.tsx b/packages/nextjs/components/scaffold-eth/Contract/ReadOnlyFunctionForm.tsx index c4b9d434..1f42956c 100644 --- a/packages/nextjs/components/scaffold-eth/Contract/ReadOnlyFunctionForm.tsx +++ b/packages/nextjs/components/scaffold-eth/Contract/ReadOnlyFunctionForm.tsx @@ -67,7 +67,7 @@ export const ReadOnlyFunctionForm = ({

{inputElements} -
+
{result !== null && result !== undefined && (
From d855995f0e7ed0883ea888b617afc5fd83c7117d Mon Sep 17 00:00:00 2001 From: tokodev Date: Wed, 7 Feb 2024 14:17:43 +0100 Subject: [PATCH 3/9] Reduce result rounded border --- .../components/scaffold-eth/Contract/ReadOnlyFunctionForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/components/scaffold-eth/Contract/ReadOnlyFunctionForm.tsx b/packages/nextjs/components/scaffold-eth/Contract/ReadOnlyFunctionForm.tsx index 1f42956c..29b6d12b 100644 --- a/packages/nextjs/components/scaffold-eth/Contract/ReadOnlyFunctionForm.tsx +++ b/packages/nextjs/components/scaffold-eth/Contract/ReadOnlyFunctionForm.tsx @@ -70,7 +70,7 @@ export const ReadOnlyFunctionForm = ({
{result !== null && result !== undefined && ( -
+

Result:

{displayTxResult(result)}
From 3fd2b89ee57bd7b4329e94c19774669c6b150354 Mon Sep 17 00:00:00 2001 From: tokodev Date: Wed, 7 Feb 2024 14:20:30 +0100 Subject: [PATCH 4/9] Adjust methods and close icons positioning --- .../scaffold-eth/Contract/ContractReadMethods.tsx | 15 +++++++++++---- .../scaffold-eth/Contract/ContractUI.tsx | 4 ++-- .../Contract/ContractWriteMethods.tsx | 10 +++++++--- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/packages/nextjs/components/scaffold-eth/Contract/ContractReadMethods.tsx b/packages/nextjs/components/scaffold-eth/Contract/ContractReadMethods.tsx index f640c95e..116fc2bf 100644 --- a/packages/nextjs/components/scaffold-eth/Contract/ContractReadMethods.tsx +++ b/packages/nextjs/components/scaffold-eth/Contract/ContractReadMethods.tsx @@ -31,21 +31,28 @@ export const ContractReadMethods = ({ .sort((a, b) => (b.inheritedFrom ? b.inheritedFrom.localeCompare(a.inheritedFrom) : 1)); if (!functionsToDisplay.length) { - return Please select read methods from the sidebar.; + return ( +
+ Please select read methods from the sidebar. +
+ ); } return ( <> {functionsToDisplay.map(({ fn, inheritedFrom }) => ( -
+
-
))} diff --git a/packages/nextjs/components/scaffold-eth/Contract/ContractUI.tsx b/packages/nextjs/components/scaffold-eth/Contract/ContractUI.tsx index 0b2b2ba3..739e5fcc 100644 --- a/packages/nextjs/components/scaffold-eth/Contract/ContractUI.tsx +++ b/packages/nextjs/components/scaffold-eth/Contract/ContractUI.tsx @@ -148,7 +148,7 @@ export const ContractUI = ({ className = "", initialContractData }: ContractUIPr

Read

-
+
Write

-
+
(b.inheritedFrom ? b.inheritedFrom.localeCompare(a.inheritedFrom) : 1)); if (!functionsToDisplay.length) { - return Please select write methods from the sidebar.; + return ( +
+ Please select write methods from the sidebar. +
+ ); } return ( <> {functionsToDisplay.map(({ fn, inheritedFrom }, idx) => ( -
+
diff --git a/packages/nextjs/components/scaffold-eth/Contract/ContractWriteMethods.tsx b/packages/nextjs/components/scaffold-eth/Contract/ContractWriteMethods.tsx index 5b70264b..e76dca75 100644 --- a/packages/nextjs/components/scaffold-eth/Contract/ContractWriteMethods.tsx +++ b/packages/nextjs/components/scaffold-eth/Contract/ContractWriteMethods.tsx @@ -52,7 +52,7 @@ export const ContractWriteMethods = ({ />