removing nftOwner from order

This commit is contained in:
Jamie Hewitt 2022-11-21 14:14:08 +03:00
parent 0e0bdff980
commit 6f9aae3c40
2 changed files with 0 additions and 7 deletions

View File

@ -149,7 +149,6 @@ type Order @entity {
payer: User! payer: User!
amount: BigDecimal! amount: BigDecimal!
serviceIndex: Int! serviceIndex: Int!
nftOwner: User!
# the fees will be updated from an event that will be created after (todo) # the fees will be updated from an event that will be created after (todo)

View File

@ -38,12 +38,6 @@ export function handleOrderStarted(event: OrderStarted): void {
const consumer = getUser(event.params.consumer.toHex()) const consumer = getUser(event.params.consumer.toHex())
order.consumer = consumer.id order.consumer = consumer.id
if (token.nft) {
const nft = Nft.load(token.nft as string) as Nft
const nftOwner = getUser(nft.owner)
order.nftOwner = nftOwner.id
}
const payer = getUser(event.params.payer.toHex()) const payer = getUser(event.params.payer.toHex())
payer.totalOrders = payer.totalOrders.plus(integer.ONE) payer.totalOrders = payer.totalOrders.plus(integer.ONE)
payer.save() payer.save()