@@ -19,6 +19,7 @@ import {
1919 filterUpdatableProtocolParams ,
2020 filterOutNullParams ,
2121 getFullGovActionId ,
22+ mapArrayToObjectByKeys ,
2223} from "@utils" ;
2324import { MetadataValidationStatus , ProposalData } from "@models" ;
2425import { GovernanceActionType } from "@/types/governanceAction" ;
@@ -92,20 +93,34 @@ export const GovernanceActionDetailsCardData = ({
9293 const { screenWidth } = useScreenDimension ( ) ;
9394 const { isMobile } = useScreenDimension ( ) ;
9495
95- const updatableProtocolParams = useMemo (
96+ const mappedArraysToObjectsProtocolParams = useMemo (
9697 ( ) =>
97- filterUpdatableProtocolParams ( epochParams , protocolParams , [
98- "id " ,
99- "registered_tx_id " ,
100- "key " ,
98+ mapArrayToObjectByKeys ( protocolParams , [
99+ "PlutusV1 " ,
100+ "PlutusV2 " ,
101+ "PlutusV3 " ,
101102 ] ) ,
102- [ epochParams , protocolParams ] ,
103+ [ protocolParams ] ,
104+ ) ;
105+
106+ const updatableProtocolParams = useMemo (
107+ ( ) =>
108+ filterUpdatableProtocolParams (
109+ epochParams ,
110+ mappedArraysToObjectsProtocolParams ,
111+ [ "id" , "registered_tx_id" , "key" ] ,
112+ ) ,
113+ [ epochParams , mappedArraysToObjectsProtocolParams ] ,
103114 ) ;
104115
105116 const nonNullProtocolParams = useMemo (
106117 ( ) =>
107- filterOutNullParams ( protocolParams , [ "id" , "registered_tx_id" , "key" ] ) ,
108- [ updatableProtocolParams , protocolParams ] ,
118+ filterOutNullParams ( mappedArraysToObjectsProtocolParams , [
119+ "id" ,
120+ "registered_tx_id" ,
121+ "key" ,
122+ ] ) ,
123+ [ updatableProtocolParams , mappedArraysToObjectsProtocolParams ] ,
109124 ) ;
110125
111126 const isModifiedPadding =
0 commit comments