Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardocustodio committed Feb 20, 2024
1 parent 13c77c0 commit 57b65fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/mappings/multiTokens/events/token_account_created.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export async function tokenAccountCreated(
})

if (tokenAccount !== null) {
tokenAccount!.createdAt = new Date(block.timestamp)
tokenAccount!.updatedAt = new Date(block.timestamp)
tokenAccount.createdAt = new Date(block.timestamp)
tokenAccount.updatedAt = new Date(block.timestamp)
ctx.store.save(tokenAccount)

return getEvent(item, data)
Expand All @@ -89,7 +89,7 @@ export async function tokenAccountCreated(
where: { id: `${data.collectionId}-${u8aToHex(data.accountId)}` },
})

if (collectionAccount != null) {
if (collectionAccount === null) {
const newCollectionAccount = new CollectionAccount({
id: `${data.collectionId}-${u8aToHex(data.accountId)}`,
isFrozen: false,
Expand Down
4 changes: 2 additions & 2 deletions src/mappings/multiTokens/events/token_created.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,12 +799,12 @@ export async function tokenCreated(
where: { id: eventData.collectionId.toString() },
})

if (collection != null) {
if (collection === null) {
Sentry.captureMessage(`[TokenCreated] We have not found collection ${eventData.collectionId.toString()}.`, 'fatal')
return getEvent(item, eventData)
}

if (!callData) {
if (callData === null) {
Sentry.captureMessage(
`[TokenCreated] We could not parse call data for ${eventData.collectionId}-${eventData.tokenId}.`,
'fatal'
Expand Down

0 comments on commit 57b65fc

Please sign in to comment.