Skip to content

Commit

Permalink
fixes traits
Browse files Browse the repository at this point in the history
  • Loading branch information
justraman committed Oct 12, 2023
1 parent 01d4870 commit aeb4cf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mappings/multiTokens/events/reserved.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { TokenAccount, TokenNamedReserve } from '../../../model'
import { MultiTokensReservedEvent } from '../../../types/generated/events'
import { Event } from '../../../types/generated/support'
import { CommonContext } from '../../types/contexts'
import { syncCollectionStats } from '../../../jobs/collection-stats'

function getEventData(ctx: CommonContext, eventItem: Event) {
const event = new MultiTokensReservedEvent(ctx, eventItem)
Expand Down Expand Up @@ -49,5 +50,7 @@ export async function reserved(
ctx.store.save(tokenAccount)
}

syncCollectionStats(data.collectionId.toString())

return undefined
}
3 changes: 3 additions & 0 deletions src/mappings/multiTokens/events/transferred.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
import { CommonContext } from '../../types/contexts'
import { Event } from '../../../types/generated/support'
import { getOrCreateAccount } from '../../util/entities'
import { syncCollectionStats } from '../../../jobs/collection-stats'

function getEventData(ctx: CommonContext, event: Event) {
const data = new MultiTokensTransferredEvent(ctx, event)
Expand Down Expand Up @@ -106,5 +107,7 @@ export async function transferred(
ctx.store.save(account)
}

syncCollectionStats(data.collectionId.toString())

return getEvent(item, data)
}

0 comments on commit aeb4cf6

Please sign in to comment.