Skip to content

Commit

Permalink
fix: adds db to the nft component (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo committed Oct 2, 2023
1 parent 0df60a2 commit 6b10bdf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ async function initComponents(): Promise<AppComponents> {
await config.requireString('RENTALS_SUBGRAPH_URL')
)

// dbs
const satsumaDatabase = await createPgComponent({ config, logs, metrics })

// orders
const marketplaceOrders = createOrdersComponent({
subgraph: marketplaceSubgraph,
Expand Down Expand Up @@ -358,6 +361,7 @@ async function initComponents(): Promise<AppComponents> {
// nfts
const marketplaceNFTs = createNFTComponent({
subgraph: marketplaceSubgraph,
db: satsumaDatabase,
listsServer: await config.requireString('DCL_LISTS_SERVER'),
fragmentName: 'marketplaceFragment',
getFragment: getMarketplaceFragment,
Expand Down Expand Up @@ -472,7 +476,6 @@ async function initComponents(): Promise<AppComponents> {
maxCount: 1000,
})

const satsumaDatabase = await createPgComponent({ config, logs, metrics })
// owners
const owners = createOwnersComponent({
database: satsumaDatabase,
Expand Down

0 comments on commit 6b10bdf

Please sign in to comment.