From b0a636f22fd855969539f59de603b89f830f24de Mon Sep 17 00:00:00 2001 From: Graham Goh Date: Mon, 21 Oct 2024 15:36:17 +0900 Subject: [PATCH] fix(chainconfig): make adminAddr optional Making admin address field on the chain config popup optional instead of required, now that we introduced APTOS support on the popup, APTOS does not require admin address. JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1160 --- .changeset/real-zoos-jump.md | 5 +++++ src/components/Form/ChainConfigurationForm.test.tsx | 3 --- src/components/Form/ChainConfigurationForm.tsx | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .changeset/real-zoos-jump.md diff --git a/.changeset/real-zoos-jump.md b/.changeset/real-zoos-jump.md new file mode 100644 index 0000000..2164ed2 --- /dev/null +++ b/.changeset/real-zoos-jump.md @@ -0,0 +1,5 @@ +--- +'@smartcontractkit/operator-ui': minor +--- + +chainconfg: make admin address optional diff --git a/src/components/Form/ChainConfigurationForm.test.tsx b/src/components/Form/ChainConfigurationForm.test.tsx index 225189e..6c4c582 100644 --- a/src/components/Form/ChainConfigurationForm.test.tsx +++ b/src/components/Form/ChainConfigurationForm.test.tsx @@ -35,9 +35,6 @@ describe('ChainConfigurationForm', () => { expect(await findByTestId('accountAddr-helper-text')).toHaveTextContent( 'Required', ) - expect(await findByTestId('adminAddr-helper-text')).toHaveTextContent( - 'Required', - ) }) it('validates OCR input', async () => { diff --git a/src/components/Form/ChainConfigurationForm.tsx b/src/components/Form/ChainConfigurationForm.tsx index 39b1410..03030d8 100644 --- a/src/components/Form/ChainConfigurationForm.tsx +++ b/src/components/Form/ChainConfigurationForm.tsx @@ -57,7 +57,7 @@ const ValidationSchema = Yup.object().shape({ chainType: Yup.string().required('Required'), accountAddr: Yup.string().required('Required'), accountAddrPubKey: Yup.string().nullable(), - adminAddr: Yup.string().required('Required'), + adminAddr: Yup.string(), ocr1Multiaddr: Yup.string() .when(['ocr1Enabled', 'ocr1IsBootstrap'], { is: (enabled: boolean, isBootstrap: boolean) => enabled && isBootstrap, @@ -327,7 +327,6 @@ export const ChainConfigurationForm = withStyles(styles)( id="adminAddr" name="adminAddr" label="Admin Address" - required fullWidth helperText="The address used for LINK payments" FormHelperTextProps={{