Skip to content

Commit

Permalink
syntax cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gmbronco committed Sep 27, 2024
1 parent 3797b7e commit 6139a97
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions modules/actions/pool/sync-changed-pools-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,15 @@ export const syncChangedPoolsV2 = async (
}));

// Update status for all the pools
const allPools = await prisma.prismaPool.findMany({
where: { chain },
});

await poolOnChainDataService.updateOnChainStatus(
allPools.map((pool) => pool.id),
chain,
);
await prisma.prismaPool
.findMany({
where: { chain },
select: { id: true },
})
.then((pools) => pools.map((pool) => pool.id))
.then((poolIds) => poolOnChainDataService.updateOnChainStatus(poolIds, chain));

// Get the pools that have changed
// Update other data only for the pools that have changed
const tokenPrices = await prisma.prismaTokenCurrentPrice.findMany({
where: {
chain,
Expand Down

0 comments on commit 6139a97

Please sign in to comment.