mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
removing nftOwner from order
This commit is contained in:
parent
0e0bdff980
commit
6f9aae3c40
@ -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)
|
||||||
|
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user