From d8b40bfd46a8e1b28fbda0fb0ccf351f0f3f0860 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Mon, 12 Apr 2021 18:50:26 +0300 Subject: [PATCH] fetch all data from graph (#501) Signed-off-by: mihaisc --- src/providers/Asset.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/providers/Asset.tsx b/src/providers/Asset.tsx index 1740a5446..60612fc8b 100644 --- a/src/providers/Asset.tsx +++ b/src/providers/Asset.tsx @@ -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])