@@ -109,7 +109,7 @@ function modifyParametersForPlayground(_parameters: BlueprintParameter[]) {
109
109
const parameters = [ ..._parameters ] ;
110
110
111
111
// make chain query param required - its not required in open api spec - because it either has to be set in subdomain or as a query param
112
- const chainIdParameter = parameters . find ( ( p ) => p . name === "chain " ) ;
112
+ const chainIdParameter = parameters . find ( ( p ) => p . name === "chain_id " ) ;
113
113
if ( chainIdParameter ) {
114
114
chainIdParameter . required = true ;
115
115
}
@@ -122,6 +122,12 @@ function modifyParametersForPlayground(_parameters: BlueprintParameter[]) {
122
122
parameters . splice ( clientIdParameterIndex , 1 ) ;
123
123
}
124
124
125
+ // remove the chain parameter if it is present
126
+ const chainParameterIndex = parameters . findIndex ( ( p ) => p . name === "chain" ) ;
127
+ if ( chainParameterIndex !== - 1 ) {
128
+ parameters . splice ( chainParameterIndex , 1 ) ;
129
+ }
130
+
125
131
return parameters ;
126
132
}
127
133
@@ -163,7 +169,7 @@ function BlueprintPlaygroundUI(props: {
163
169
values [ param . name ] = Math . floor (
164
170
( Date . now ( ) - 3 * 30 * 24 * 60 * 60 * 1000 ) / 1000 ,
165
171
) ;
166
- } else if ( param . name === "chain " ) {
172
+ } else if ( param . name === "chain_id " ) {
167
173
values [ param . name ] = [ ] ;
168
174
} else {
169
175
values [ param . name ] = "" ;
@@ -466,7 +472,7 @@ function ParameterSection(props: {
466
472
key = { param . name }
467
473
className = { cn (
468
474
"grid items-center" ,
469
- param . name === "chain "
475
+ param . name === "chain_id "
470
476
? "grid-cols-1 lg:grid-cols-2"
471
477
: "grid-cols-2" ,
472
478
) }
@@ -485,14 +491,15 @@ function ParameterSection(props: {
485
491
) }
486
492
</ div >
487
493
< div className = "relative" >
488
- { param . name === "chain " ? (
494
+ { param . name === "chain_id " ? (
489
495
< MultiNetworkSelector
490
496
selectedBadgeClassName = "bg-background"
491
497
selectedChainIds = {
492
- props . form . watch ( "chain " ) as number [ ]
498
+ props . form . watch ( "chain_id " ) as number [ ]
493
499
}
494
500
onChange = { ( chainIds ) => {
495
- props . form . setValue ( "chain" , chainIds , {
501
+ console . log ( "chainIds" , chainIds ) ;
502
+ props . form . setValue ( "chain_id" , chainIds , {
496
503
shouldValidate : true ,
497
504
shouldDirty : true ,
498
505
} ) ;
@@ -821,6 +828,9 @@ function openAPIV3ParamToZodFormSchema(
821
828
function createParametersFormSchema ( parameters : BlueprintParameter [ ] ) {
822
829
const shape : z . ZodRawShape = { } ;
823
830
for ( const param of parameters ) {
831
+ if ( param . deprecated ) {
832
+ continue ;
833
+ }
824
834
const paramSchema = openAPIV3ParamToZodFormSchema (
825
835
param . schema ,
826
836
! ! param . required ,
0 commit comments