Skip to content

Commit

Permalink
fix: make last action nullable until next re-sync (#1391)
Browse files Browse the repository at this point in the history
* Make last action nullable until next re-sync

* remove unused ref
  • Loading branch information
justraman authored Nov 4, 2024
1 parent e4001b2 commit 36549d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ type MarketplaceOfferCancelled {
listing: Listing!
}


type MultiTokensApproved {
collectionId: BigInt!
tokenId: BigInt
Expand Down Expand Up @@ -857,7 +856,7 @@ type CounterOffer @entity {
createdAt: DateTime!

# extra
lastAction: Account!
lastAction: Account #TODO: make me required
}

type Listing @entity {
Expand Down
4 changes: 2 additions & 2 deletions src/mappings/marketplace/events/counter_offer_answered.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'assert'
import { UnknownVersionError } from '../../../common/errors'
import { calls, events } from '../../../types/generated'
import { events } from '../../../types/generated'
import {
Account,
AccountTokenEvent,
Expand All @@ -17,7 +17,7 @@ import {
ListingType,
CounterOffer,
} from '../../../model'
import { CommonContext, BlockHeader, EventItem, CallItem } from '../../types/contexts'
import { CommonContext, BlockHeader, EventItem } from '../../types/contexts'
import { Sns } from '../../../common/sns'
import { getOrCreateAccount } from '../../util/entities'

Expand Down
2 changes: 1 addition & 1 deletion src/model/generated/counterOffer.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ export class CounterOffer {

@Index_()
@ManyToOne_(() => Account, {nullable: true})
lastAction!: Account
lastAction!: Account | undefined | null
}

0 comments on commit 36549d1

Please sign in to comment.