Skip to content

Commit b01b712

Browse files
authored
Merge branch 'main' into VRF-415-31732-vrf-automatic-bhs-backwards-mode
2 parents 55a9fe7 + b9690eb commit b01b712

File tree

7 files changed

+33
-0
lines changed

7 files changed

+33
-0
lines changed

.changeset/mean-wasps-cover.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@smartcontractkit/operator-ui': patch
3+
---
4+
5+
Add OCR2 plugins selection for FMS

src/components/Form/ChainConfigurationForm.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ describe('ChainConfigurationForm', () => {
2626
ocr2Multiaddr: '',
2727
ocr2P2PPeerID: '',
2828
ocr2KeyBundleID: '',
29+
ocr2MedianPluginEnabled: false,
2930
}
3031

3132
render(
@@ -72,6 +73,7 @@ describe('ChainConfigurationForm', () => {
7273
ocr2Multiaddr: '',
7374
ocr2P2PPeerID: '',
7475
ocr2KeyBundleID: '',
76+
ocr2MedianPluginEnabled: false,
7577
}
7678

7779
render(
@@ -126,6 +128,7 @@ describe('ChainConfigurationForm', () => {
126128
ocr2Multiaddr: '',
127129
ocr2P2PPeerID: '',
128130
ocr2KeyBundleID: '',
131+
ocr2MedianPluginEnabled: false,
129132
}
130133

131134
render(

src/components/Form/ChainConfigurationForm.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export type FormValues = {
3838
ocr2Multiaddr?: string | null
3939
ocr2P2PPeerID?: string | null
4040
ocr2KeyBundleID?: string | null
41+
ocr2MedianPluginEnabled: boolean
4142
}
4243

4344
const ValidationSchema = Yup.object().shape({
@@ -81,6 +82,7 @@ const ValidationSchema = Yup.object().shape({
8182
then: Yup.string().required('Required').nullable(),
8283
})
8384
.nullable(),
85+
ocr2MedianPluginEnabled: Yup.boolean().required('Required'),
8486
})
8587

8688
const styles = (theme: Theme) => {
@@ -429,7 +431,23 @@ export const ChainConfigurationForm = withStyles(styles)(
429431
))}
430432
</Field>
431433
</Grid>
434+
435+
<Grid item xs={12}>
436+
<Typography>Supported Plugins</Typography>
437+
</Grid>
438+
439+
<Grid item xs={12}>
440+
<Field
441+
component={CheckboxWithLabel}
442+
name="ocr2MedianPluginEnabled"
443+
type="checkbox"
444+
Label={{
445+
label: 'Median',
446+
}}
447+
/>
448+
</Grid>
432449
</>
450+
433451
)}
434452
</>
435453
</Grid>

src/hooks/queries/useFeedsManagersWithProposalsQuery.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const FEEDS_MANAGER__CHAIN_CONFIG_FIELDS = gql`
2323
multiaddr
2424
p2pPeerID
2525
keyBundleID
26+
plugins {
27+
median
28+
}
2629
}
2730
}
2831
`

src/screens/FeedsManager/EditSupportedChainDialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const EditSupportedChainDialog = ({
7171
ocr2Multiaddr: cfg.ocr2JobConfig.multiaddr,
7272
ocr2P2PPeerID: cfg.ocr2JobConfig.p2pPeerID,
7373
ocr2KeyBundleID: cfg.ocr2JobConfig.keyBundleID,
74+
ocr2MedianPluginEnabled: cfg.ocr2JobConfig.plugins.median,
7475
}
7576

7677
const chainIDs: string[] = chainData

src/screens/FeedsManager/NewSupportedChainDialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const NewSupportedChainDialog = ({ onClose, open, onSubmit }: Props) => {
6161
ocr2Multiaddr: '',
6262
ocr2P2PPeerID: '',
6363
ocr2KeyBundleID: '',
64+
ocr2MedianPluginEnabled: false,
6465
}
6566

6667
const chainIDs: string[] = chainData

src/screens/FeedsManager/SupportedChainsCard.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ export const SupportedChainsCard = withStyles(styles)(
221221
values.ocr2P2PPeerID !== '' ? values.ocr2P2PPeerID : null,
222222
ocr2KeyBundleID:
223223
values.ocr2KeyBundleID != '' ? values.ocr2KeyBundleID : null,
224+
ocr2Plugins: `{"median":${values.ocr2MedianPluginEnabled}}`
224225
},
225226
},
226227
})
@@ -292,6 +293,7 @@ export const SupportedChainsCard = withStyles(styles)(
292293
values.ocr2P2PPeerID !== '' ? values.ocr2P2PPeerID : null,
293294
ocr2KeyBundleID:
294295
values.ocr2KeyBundleID != '' ? values.ocr2KeyBundleID : null,
296+
ocr2Plugins: `{"median":${values.ocr2MedianPluginEnabled}}`
295297
},
296298
},
297299
})

0 commit comments

Comments
 (0)