ocean-subgraph
ocean-subgraph copied to clipboard
Change type of `lastPriceToken` from string to Token
On Order , lastPriceToken
should be Token
I changed it back to string as it was causing problems: https://github.com/oceanprotocol/ocean-subgraph/pull/477
Will do another PR for this with more testing.
we need to make sure the Token exists, so when assigning a value to lastPriceToken
we need to do a getToken
. This function automatically created the token if not existing.
so when assigning a value to lastPriceToken we need to do a getToken
From what I can see we already call getToken()
before updating the lastPriceToken
in handleOrderStarted
. https://github.com/oceanprotocol/ocean-subgraph/blob/5da91c228211544fc76f26e3cb7df1884a274b21/src/mappings/erc20Templates.ts#L39
Are you referring to a different function?
That should be it. Then we need to debug what is not working.
On Order ,
lastPriceToken
should beToken
Why only on Order? lastPriceToken
in Token is string, I'm not sure why they would be different?
They shouldn't , we just missed it