mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
parent
1b9987ce89
commit
677563d7c2
@ -15,7 +15,7 @@
|
|||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"deploy:s3": "bash scripts/deploy-s3.sh",
|
"deploy:s3": "bash scripts/deploy-s3.sh",
|
||||||
"postinstall": "husky install",
|
"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": {
|
"dependencies": {
|
||||||
"@coingecko/cryptoformat": "^0.4.4",
|
"@coingecko/cryptoformat": "^0.4.4",
|
||||||
|
@ -10,9 +10,9 @@ export const poolDataQuery = gql`
|
|||||||
poolData: pool(id: $pool) {
|
poolData: pool(id: $pool) {
|
||||||
id
|
id
|
||||||
totalShares
|
totalShares
|
||||||
poolFee
|
liquidityProviderFee
|
||||||
opfFee
|
opcFee
|
||||||
marketFee
|
marketSwapFee
|
||||||
spotPrice
|
spotPrice
|
||||||
baseToken {
|
baseToken {
|
||||||
address
|
address
|
||||||
|
@ -118,10 +118,10 @@ function PoolProvider({ children }: { children: ReactNode }): ReactElement {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!poolData) return
|
if (!poolData) return
|
||||||
|
|
||||||
// Fees
|
// Fees - this will be renamed again in subgraph
|
||||||
const poolFee = getFee(poolData.poolFee)
|
const poolFee = getFee(poolData.liquidityProviderFee)
|
||||||
const marketFee = getFee(poolData.marketFee)
|
const marketFee = getFee(poolData.marketSwapFee)
|
||||||
const opfFee = getFee(poolData.opfFee)
|
const opfFee = getFee(poolData.opcFee)
|
||||||
|
|
||||||
// Total Liquidity
|
// Total Liquidity
|
||||||
const totalLiquidityInOcean = isValidNumber(poolData.spotPrice)
|
const totalLiquidityInOcean = isValidNumber(poolData.spotPrice)
|
||||||
|
@ -11,11 +11,11 @@ import useNetworkMetadata, {
|
|||||||
} from '@hooks/useNetworkMetadata'
|
} from '@hooks/useNetworkMetadata'
|
||||||
import { LoggerInstance } from '@oceanprotocol/lib'
|
import { LoggerInstance } from '@oceanprotocol/lib'
|
||||||
import styles from './MarketStats.module.css'
|
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`
|
const getGlobalStatsValues = gql`
|
||||||
query FooterStatsValues {
|
query FooterStatsValues {
|
||||||
globalStats {
|
globalStatistics {
|
||||||
poolCount
|
poolCount
|
||||||
nftCount
|
nftCount
|
||||||
datatokenCount
|
datatokenCount
|
||||||
@ -150,7 +150,7 @@ export default function MarketStats(): ReactElement {
|
|||||||
await setTotalOceanLiquidity((prevState) => ({
|
await setTotalOceanLiquidity((prevState) => ({
|
||||||
...prevState,
|
...prevState,
|
||||||
[chainId]: totalLiquidity.filter(
|
[chainId]: totalLiquidity.filter(
|
||||||
(token: LiquidityToken) => token.symbol === 'OCEAN'
|
(token: LiquidityToken) => token.token.symbol === 'OCEAN'
|
||||||
)[0]
|
)[0]
|
||||||
}))
|
}))
|
||||||
await setPoolCount((prevState) => ({
|
await setPoolCount((prevState) => ({
|
||||||
|
Loading…
Reference in New Issue
Block a user