1
0
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:
mihaisc 2021-04-12 18:50:26 +03:00 committed by GitHub
parent 4e4bbc1120
commit d8b40bfd46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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])