From 5bc6506cecc4374d242ea2fcbd524e8c718dd1b6 Mon Sep 17 00:00:00 2001
From: port <108868128+portdeveloper@users.noreply.github.com>
Date: Wed, 13 Mar 2024 19:05:47 +0300
Subject: [PATCH] Use uid's when adding/removing methods (#70)
---
.../Contract/ContractReadMethods.tsx | 9 +--
.../scaffold-eth/Contract/ContractUI.tsx | 64 +++++++++++--------
.../Contract/ContractWriteMethods.tsx | 7 +-
.../scaffold-eth/Contract/MethodSelector.tsx | 43 ++++++-------
4 files changed, 64 insertions(+), 59 deletions(-)
diff --git a/packages/nextjs/components/scaffold-eth/Contract/ContractReadMethods.tsx b/packages/nextjs/components/scaffold-eth/Contract/ContractReadMethods.tsx
index a5a87f84..95c43aff 100644
--- a/packages/nextjs/components/scaffold-eth/Contract/ContractReadMethods.tsx
+++ b/packages/nextjs/components/scaffold-eth/Contract/ContractReadMethods.tsx
@@ -1,5 +1,6 @@
+import { AugmentedAbiFunction } from "./ContractUI";
import { ReadOnlyFunctionForm } from "./ReadOnlyFunctionForm";
-import { Abi, AbiFunction } from "abitype";
+import { Abi } from "abitype";
import { XMarkIcon } from "@heroicons/react/24/outline";
import { Contract, ContractName, GenericContract, InheritedFunctions } from "~~/utils/scaffold-eth/contract";
@@ -15,7 +16,7 @@ export const ContractReadMethods = ({
}
const functionsToDisplay = (
- ((deployedContractData.abi || []) as Abi).filter(part => part.type === "function") as AbiFunction[]
+ ((deployedContractData.abi || []) as Abi).filter(part => part.type === "function") as AugmentedAbiFunction[]
)
.filter(fn => {
const isQueryableWithParams =
@@ -41,7 +42,7 @@ export const ContractReadMethods = ({
return (
<>
{functionsToDisplay.map(({ fn, inheritedFrom }) => (
-
+