Skip to content

Commit be6f3e8

Browse files
authored
fix: pass callbacks to synapse-sdk properly (#316)
1 parent e74f504 commit be6f3e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/upload/synapse.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This module provides a reusable upload pattern for CAR files to Filecoin
55
* via Synapse SDK, used by both the import command and pinning server.
66
*/
7-
import type { PieceCID } from '@filoz/synapse-sdk'
7+
import type { PieceCID, StorageManager } from '@filoz/synapse-sdk'
88
import { METADATA_KEYS, type ProviderInfo, type UploadCallbacks } from '@filoz/synapse-sdk'
99
import type { CID } from 'multiformats/cid'
1010
import type { Logger } from 'pino'
@@ -129,8 +129,8 @@ export async function uploadToSynapse(
129129
}
130130

131131
// Upload using Synapse with IPFS root CID metadata
132-
const uploadOptions: Parameters<typeof synapseService.synapse.storage.upload>[1] = {
133-
...uploadCallbacks,
132+
const uploadOptions: Parameters<StorageManager['upload']>[1] = {
133+
callbacks: uploadCallbacks,
134134
metadata: {
135135
...(options.pieceMetadata ?? {}),
136136
[METADATA_KEYS.IPFS_ROOT_CID]: rootCid.toString(), // Associate piece with IPFS root CID

0 commit comments

Comments
 (0)