Skip to content

Commit

Permalink
Fix reliquary user sync (#1120)
Browse files Browse the repository at this point in the history
* still need to delete user balance if it was 0.0, cant quit early

* remove debug

* changeset
  • Loading branch information
franzns authored Oct 28, 2024
1 parent 1f4fbc1 commit 35886a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-hotels-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'backend': patch
---

fix relic sync
14 changes: 0 additions & 14 deletions modules/user/lib/user-sync-reliquary-farm-balance.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,6 @@ export class UserSyncReliquaryFarmBalanceService implements UserStakedBalanceSer
update.amount !== '0.0',
);

if (filteredAmountUpdates.length === 0) {
await prisma.prismaUserBalanceSyncStatus.update({
where: {
type_chain: {
type: 'RELIQUARY',
chain: networkContext.chain,
},
},
data: { blockNumber: endBlock },
});

return;
}

await prismaBulkExecuteOperations(
[
prisma.prismaUser.createMany({
Expand Down

0 comments on commit 35886a7

Please sign in to comment.