1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

fix pool tab (#1121)

* query update

* fixes
This commit is contained in:
mihaisc 2022-02-17 18:00:08 +02:00 committed by GitHub
parent 1b9987ce89
commit 677563d7c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View File

@ -15,7 +15,7 @@
"type-check": "tsc --noEmit",
"deploy:s3": "bash scripts/deploy-s3.sh",
"postinstall": "husky install",
"codegen:apollo": "apollo client:codegen --endpoint=https://subgraphv4.rinkeby.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph --target typescript --tsFileExtension=d.ts --outputFlat src/@types/subgraph/"
"codegen:apollo": "apollo client:codegen --endpoint=https://v4.subgraph.rinkeby.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph --target typescript --tsFileExtension=d.ts --outputFlat src/@types/subgraph/"
},
"dependencies": {
"@coingecko/cryptoformat": "^0.4.4",

View File

@ -10,9 +10,9 @@ export const poolDataQuery = gql`
poolData: pool(id: $pool) {
id
totalShares
poolFee
opfFee
marketFee
liquidityProviderFee
opcFee
marketSwapFee
spotPrice
baseToken {
address

View File

@ -118,10 +118,10 @@ function PoolProvider({ children }: { children: ReactNode }): ReactElement {
useEffect(() => {
if (!poolData) return
// Fees
const poolFee = getFee(poolData.poolFee)
const marketFee = getFee(poolData.marketFee)
const opfFee = getFee(poolData.opfFee)
// Fees - this will be renamed again in subgraph
const poolFee = getFee(poolData.liquidityProviderFee)
const marketFee = getFee(poolData.marketSwapFee)
const opfFee = getFee(poolData.opcFee)
// Total Liquidity
const totalLiquidityInOcean = isValidNumber(poolData.spotPrice)

View File

@ -11,11 +11,11 @@ import useNetworkMetadata, {
} from '@hooks/useNetworkMetadata'
import { LoggerInstance } from '@oceanprotocol/lib'
import styles from './MarketStats.module.css'
import { FooterStatsValues_globalStats_totalLiquidity_token as LiquidityToken } from 'src/@types/subgraph/FooterStatsValues'
import { FooterStatsValues_globalStatistics_totalLiquidity as LiquidityToken } from 'src/@types/subgraph/FooterStatsValues'
const getGlobalStatsValues = gql`
query FooterStatsValues {
globalStats {
globalStatistics {
poolCount
nftCount
datatokenCount
@ -150,7 +150,7 @@ export default function MarketStats(): ReactElement {
await setTotalOceanLiquidity((prevState) => ({
...prevState,
[chainId]: totalLiquidity.filter(
(token: LiquidityToken) => token.symbol === 'OCEAN'
(token: LiquidityToken) => token.token.symbol === 'OCEAN'
)[0]
}))
await setPoolCount((prevState) => ({