Changing lastPriceToken in Token from string to Token

This commit is contained in:
Jamie Hewitt 2022-07-15 14:20:34 +01:00
parent 0e19edb1e3
commit 81422ffd65
2 changed files with 3 additions and 2 deletions

View File

@ -59,7 +59,7 @@ type Token @entity {
"block number when it was created" "block number when it was created"
block: Int! block: Int!
lastPriceToken: String! lastPriceToken: Token
lastPriceValue: BigDecimal! lastPriceValue: BigDecimal!
} }
@ -278,7 +278,7 @@ type Order @entity {
tx: String! tx: String!
block: Int! block: Int!
lastPriceToken: Token! lastPriceToken: Token
lastPriceValue: BigDecimal! lastPriceValue: BigDecimal!
estimatedUSDValue: BigDecimal! estimatedUSDValue: BigDecimal!
} }

View File

@ -69,6 +69,7 @@ export function handleOrderStarted(event: OrderStarted): void {
order.createdTimestamp order.createdTimestamp
) )
order.save() order.save()
log.info('\n\n3 A. order.lastPriceToken: {}\n\n', [order.lastPriceToken])
token.save() token.save()
addOrder() addOrder()
if (token.nft) { if (token.nft) {