diff --git a/packages/synapse-core/src/utils/metadata.ts b/packages/synapse-core/src/utils/metadata.ts index 86374dc0..fc1a77b4 100644 --- a/packages/synapse-core/src/utils/metadata.ts +++ b/packages/synapse-core/src/utils/metadata.ts @@ -35,7 +35,6 @@ export interface MetadataDataSetInternal { } export interface MetadataPieceInternal { - ipni?: boolean ipfsRootCID?: string } /** @@ -89,7 +88,6 @@ export function pieceMetadataObjectToEntry( ): MetadataEntry[] { const obj = { ...(metadataObject ?? {}), - ...(metadataInternal?.ipni ? { withIPNI: '' } : {}), ...(metadataInternal?.ipfsRootCID ? { ipfsRootCID: metadataInternal.ipfsRootCID } : {}), } const entries = Object.entries(obj) diff --git a/packages/synapse-core/test/metadata.test.ts b/packages/synapse-core/test/metadata.test.ts index a6853379..214a61e3 100644 --- a/packages/synapse-core/test/metadata.test.ts +++ b/packages/synapse-core/test/metadata.test.ts @@ -172,15 +172,6 @@ describe('Metadata Utils', () => { assert.deepEqual(result, []) }) - it('should add withIPNI when ipni internal flag is true', () => { - const result = pieceMetadataObjectToEntry({ key: 'value' }, { ipni: true }) - - assert.deepEqual(result, [ - { key: 'key', value: 'value' }, - { key: 'withIPNI', value: '' }, - ]) - }) - it('should add ipfsRootCID when provided', () => { const cid = 'bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi' const result = pieceMetadataObjectToEntry({ key: 'value' }, { ipfsRootCID: cid }) @@ -191,16 +182,6 @@ describe('Metadata Utils', () => { ]) }) - it('should add both ipni and ipfsRootCID when both provided', () => { - const cid = 'bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi' - const result = pieceMetadataObjectToEntry({}, { ipni: true, ipfsRootCID: cid }) - - assert.deepEqual(result, [ - { key: 'ipfsRootCID', value: cid }, - { key: 'withIPNI', value: '' }, - ]) - }) - it('should throw when exceeding max keys per piece', () => { const tooManyKeys: Record = {} for (let i = 0; i < METADATA_LIMITS.MAX_KEYS_PER_PIECE + 1; i++) {