mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
fetch all data from graph (#501)
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
parent
4e4bbc1120
commit
d8b40bfd46
@ -36,6 +36,8 @@ const poolQuery = gql`
|
||||
query PoolPrice($datatoken: String) {
|
||||
pools(where: { datatokenAddress: $datatoken }) {
|
||||
spotPrice
|
||||
datatokenReserve
|
||||
oceanReserve
|
||||
}
|
||||
}
|
||||
`
|
||||
@ -121,7 +123,9 @@ function AssetProvider({
|
||||
return
|
||||
setPrice((prevState) => ({
|
||||
...prevState,
|
||||
value: poolPrice.pools[0].spotPrice
|
||||
value: poolPrice.pools[0].spotPrice,
|
||||
ocean: poolPrice.pools[0].oceanReserve,
|
||||
datatoken: poolPrice.pools[0].datatokenReserve
|
||||
}))
|
||||
}, [poolPrice])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user