Procházet zdrojové kódy

Keep bounties and contributions in QN

Theophile Sandoz před 3 roky
rodič
revize
a3dec3edfc
1 změnil soubory, kde provedl 1 přidání a 5 odebrání
  1. 1 5
      query-node/mappings/src/bounty.ts

+ 1 - 5
query-node/mappings/src/bounty.ts

@@ -339,7 +339,6 @@ export async function bounty_BountyFundingWithdrawal({ event, store }: EventCont
     throw new Error(`Bounty contribution not found by contributor: ${actorType}`)
   }
   contribution.updatedAt = eventTime
-  contribution.deletedAt = eventTime
   await store.save<BountyContribution>(contribution)
 
   // Record the event
@@ -366,10 +365,7 @@ export async function bounty_BountyRemoved({ event, store }: EventContext & Stor
   const bountyRemovedEvent = new BountyEvents.BountyRemovedEvent(event)
 
   // Terminate the bounty
-  const bounty = await updateBounty(store, event, bountyRemovedEvent.params[0], [], (bounty) => ({
-    deletedAt: bounty.updatedAt,
-    isTerminated: true,
-  }))
+  const bounty = await updateBounty(store, event, bountyRemovedEvent.params[0], [], () => ({ isTerminated: true }))
 
   // Record the event
   const removedInEvent = new BountyRemovedEvent({ ...genericEventFields(event), bounty })