Skip to content

Commit

Permalink
fix: dealer offer store keys without space (#1066)
Browse files Browse the repository at this point in the history
Removes space making new names as
`2023-09-23T15:49:50.437Z_bafkzcibbdyuvfiycundi3xfjuzpuilhsijzf7ryp63tlsczf464zlwieujdqg.json`
  • Loading branch information
vasco-santos authored Nov 3, 2023
1 parent ef4ce7a commit 301f411
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/filecoin-api/src/dealer/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const handleAggregateInsert = async (context, record) => {
const updateRes = await context.offerStore.update(record.pieces.toString(), {
key: `${new Date(
record.insertedAt
).toISOString()} ${record.aggregate.toString()}.json`,
).toISOString()}_${record.aggregate.toString()}.json`,
})
if (updateRes.error) {
return { error: new StoreOperationFailed(updateRes.error.message) }
Expand Down
2 changes: 1 addition & 1 deletion packages/filecoin-api/test/events/dealer.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const test = {
const offerStoreGetAfterRename1 = await context.offerStore.get(
`${new Date(
aggregateRecord.insertedAt
).toISOString()} ${aggregateRecord.aggregate.toString()}.json`
).toISOString()}_${aggregateRecord.aggregate.toString()}.json`
)
assert.ok(offerStoreGetAfterRename1.ok)
},
Expand Down

0 comments on commit 301f411

Please sign in to comment.