Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/core/src/store/dealer-aggregate-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
return {
aggregate: parseLink(encodedRecord.aggregate),
pieces: parseLink(encodedRecord.pieces),
...(encodedRecord.group && { group: encodedRecord.group }),

Check failure on line 107 in packages/core/src/store/dealer-aggregate-store.js

View workflow job for this annotation

GitHub Actions / Test

Property 'group' does not exist on type 'DealerAggregateStoreRecord'.

Check failure on line 107 in packages/core/src/store/dealer-aggregate-store.js

View workflow job for this annotation

GitHub Actions / Test

Property 'group' does not exist on type 'DealerAggregateStoreRecord'.
status: decodeStatus(encodedRecord.stat),
insertedAt: encodedRecord.insertedAt,
updatedAt: encodedRecord.updatedAt
Expand Down
6 changes: 4 additions & 2 deletions packages/core/src/store/dealer-offer-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
/** @type {DealerOfferStoreRecordValue} */ ({
aggregate: record.value.aggregate.toString(),
pieces: record.value.pieces.map((p) => p.toString()),
collection: record.value.issuer,
issuer: record.value.issuer,
collection: record.value.group || record.value.issuer,

Check failure on line 33 in packages/core/src/store/dealer-offer-store.js

View workflow job for this annotation

GitHub Actions / Test

Property 'group' does not exist on type 'OfferValue'.
orderID: Date.now()
})
)
Expand Down Expand Up @@ -70,7 +71,8 @@
value: {
aggregate: parseLink(record.aggregate),
pieces: record.pieces.map((p) => parseLink(p)),
issuer: /** @type {`did:${string}:${string}`} */ (record.collection)
issuer: /** @type {`did:${string}:${string}`} */ (record.issuer),
group: record.collection,

Check failure on line 75 in packages/core/src/store/dealer-offer-store.js

View workflow job for this annotation

GitHub Actions / Test

Object literal may only specify known properties, and 'group' does not exist in type 'OfferValue'.
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/store/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ export interface DealerOfferStoreRecordValue {
// PieceCid of sorted pieces used to generate aggregate
pieces: string[]
// Issuer of the collection of aggregates
issuer: string
// Collection/group the aggregate belongs to
collection: string
// Order that broker will rely on to prioritize deals.
orderID: number
Expand Down
Loading