Skip to content

Commit

Permalink
fix: list uploads fetch deals for correct cid (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Nov 17, 2021
1 parent 0b79329 commit df1be1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/db/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ export class DBClient {
}

// Get deals
const cids = uploads?.map((u) => u.content_cid)
const cids = uploads?.map((u) => u.content.cid)
const deals = await this.getDealsForCids(cids)

return uploads?.map((u) => ({
...normalizeUpload(u),
deals: deals[u.content_cid] || []
deals: deals[u.content.cid] || []
}))
}

Expand Down

0 comments on commit df1be1f

Please sign in to comment.