File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -108,16 +108,20 @@ export const bulkRequestSchema = () =>
108108 dataset : addressSchema ( ) . oneOf ( [ NULL_ADDRESS ] ) . required ( ) ,
109109 datasetmaxprice : positiveIntegerStringSchema ( ) . oneOf ( [ '0' ] ) . required ( ) ,
110110 params : stringSchema ( )
111- . test ( ( value ) => {
112- try {
113- // eslint-disable-next-line @typescript-eslint/naming-convention
114- const { bulk_cid } = JSON . parse ( value ) ;
115- if ( typeof bulk_cid === 'string' ) {
116- return true ;
117- }
118- } catch { }
119- return false ;
120- } )
111+ . test (
112+ 'is-valid-bulk-params' ,
113+ '${path} should be a valid JSON string with bulk_cid field' ,
114+ ( value ) => {
115+ try {
116+ // eslint-disable-next-line @typescript-eslint/naming-convention
117+ const { bulk_cid } = JSON . parse ( value ) ;
118+ if ( typeof bulk_cid === 'string' ) {
119+ return true ;
120+ }
121+ } catch { }
122+ return false ;
123+ }
124+ )
121125 . required ( ) ,
122126 requester : addressSchema ( ) . required ( ) ,
123127 beneficiary : addressSchema ( ) . required ( ) ,
You can’t perform that action at this time.
0 commit comments