File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @functionland/react-native-fula" ,
3- "version" : " 1.54.18 " ,
3+ "version" : " 1.54.19 " ,
44 "description" : " This package is a bridge to use the Fula libp2p protocols in the react-native which is using wnfs" ,
55 "main" : " lib/commonjs/index" ,
66 "module" : " lib/module/index" ,
Original file line number Diff line number Diff line change @@ -341,6 +341,7 @@ export const manifestNewBatch = async (
341341 ) {
342342 newCids . push ( cid ) ;
343343 } else {
344+ let addCid = true ;
344345 let formattedManifestInfo : BType . ManifestResponse = JSON . parse (
345346 JSON . stringify ( manifestInfo . toHuman ( ) )
346347 ) ;
@@ -349,7 +350,19 @@ export const manifestNewBatch = async (
349350 ( user ) => user . uploader === uploader
350351 )
351352 ) {
352- newCids . push ( formattedManifestInfo . manifestMetadata . job . uri ) ;
353+ addCid = false ;
354+ }
355+ if ( addCid && formattedManifestInfo ?. manifestMetadata ) {
356+ try {
357+ let manifestMetaData : BType . ManifestMetadata = JSON . parse (
358+ formattedManifestInfo ?. manifestMetadata
359+ ) ;
360+ if ( manifestMetaData ?. job ?. uri ) {
361+ newCids . push ( manifestMetaData . job . uri ) ;
362+ }
363+ } catch ( e ) {
364+ console . log ( 'error while parsing manifestMetadata' ) ;
365+ }
353366 }
354367 }
355368 }
Original file line number Diff line number Diff line change @@ -121,6 +121,6 @@ export interface UserData {
121121
122122export interface ManifestResponse {
123123 usersData : UserData [ ] ;
124- manifestMetadata : ManifestMetadata ;
124+ manifestMetadata : string ;
125125 size_ ?: number | null ; // The question mark indicates that this field is optional.
126126}
You can’t perform that action at this time.
0 commit comments