From 97e352c68db34b5a1e0463f664b67fc5ee255ac9 Mon Sep 17 00:00:00 2001 From: songwongtp <16089160+songwongtp@users.noreply.github.com> Date: Thu, 29 Dec 2022 15:00:40 +0700 Subject: [PATCH 1/2] fix: change offchain argument --- src/lib/components/OffChainForm.tsx | 9 ++------- .../modal/contract/ContractDetailsTemplate.tsx | 2 -- src/lib/components/modal/contract/SaveNewContract.tsx | 2 -- .../instantiate/component/InstantiateOffchainForm.tsx | 2 -- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/lib/components/OffChainForm.tsx b/src/lib/components/OffChainForm.tsx index 5b5b50e52..a36572579 100644 --- a/src/lib/components/OffChainForm.tsx +++ b/src/lib/components/OffChainForm.tsx @@ -23,9 +23,6 @@ export interface OffchainDetail { } interface OffChainFormProps { - // TODO: find a way to remove nameField and descriptionField - nameField: FieldPath; - descriptionField: FieldPath; state: OffchainDetail; control: Control; setTagsValue: (options: string[]) => void; @@ -35,8 +32,6 @@ interface OffChainFormProps { } export const OffChainForm = ({ - nameField, - descriptionField, state, control, setTagsValue, @@ -47,7 +42,7 @@ export const OffChainForm = ({ return ( } control={control} label="Name" helperText="Set name for your contract" @@ -59,7 +54,7 @@ export const OffChainForm = ({ labelBgColor={labelBgColor} /> } control={control} label="Description" helperText="Help understanding what this contract do and how it works" diff --git a/src/lib/components/modal/contract/ContractDetailsTemplate.tsx b/src/lib/components/modal/contract/ContractDetailsTemplate.tsx index 5389b1db6..7cb620812 100644 --- a/src/lib/components/modal/contract/ContractDetailsTemplate.tsx +++ b/src/lib/components/modal/contract/ContractDetailsTemplate.tsx @@ -87,8 +87,6 @@ export const ContractDetailsTemplate = ({ otherAction={resetForm} > - nameField="name" - descriptionField="description" state={offchainState} control={control} setTagsValue={setTagsValue} diff --git a/src/lib/components/modal/contract/SaveNewContract.tsx b/src/lib/components/modal/contract/SaveNewContract.tsx index dcf254f0c..861f2d638 100644 --- a/src/lib/components/modal/contract/SaveNewContract.tsx +++ b/src/lib/components/modal/contract/SaveNewContract.tsx @@ -193,8 +193,6 @@ export function SaveNewContract({ list, buttonProps }: SaveNewContractProps) { /> - nameField="name" - descriptionField="description" state={offchainState} control={control} setTagsValue={setTagsValue} diff --git a/src/lib/pages/instantiate/component/InstantiateOffchainForm.tsx b/src/lib/pages/instantiate/component/InstantiateOffchainForm.tsx index bafe3ffe5..97885d665 100644 --- a/src/lib/pages/instantiate/component/InstantiateOffchainForm.tsx +++ b/src/lib/pages/instantiate/component/InstantiateOffchainForm.tsx @@ -90,8 +90,6 @@ export const InstantiateOffChainForm = observer( )} - nameField="name" - descriptionField="description" state={offchainState} control={control} setTagsValue={setTagsValue} From fd9d9664df3cd2ebfaa8c1267908208e8187ce43 Mon Sep 17 00:00:00 2001 From: songwongtp <16089160+songwongtp@users.noreply.github.com> Date: Thu, 29 Dec 2022 15:02:20 +0700 Subject: [PATCH 2/2] fix: add change log --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84290f875..c32f565be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased ### Features + - [#44](https://github.com/alleslabs/celatone-frontend/pull/44) Render query cmds shortcut in contract detail page - [#38](https://github.com/alleslabs/celatone-frontend/pull/38) Show execute msg cmds when wallet is not connected - [#49](https://github.com/alleslabs/celatone-frontend/pull/49) Add `develop` branch to `main.yml` @@ -49,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Improvements +- [#56](https://github.com/alleslabs/celatone-frontend/pull/56) Refactor offchain form component by not receiving nameField and descriptionField - [#50](https://github.com/alleslabs/celatone-frontend/pull/50) Refactor offchain component to use react-form and remove redundant offchain components, and refactor edit contract details modal ### Bug fixes