diff --git a/layer/store/param.ts b/layer/store/param.ts index 3c509f25..f99b5863 100644 --- a/layer/store/param.ts +++ b/layer/store/param.ts @@ -3,13 +3,13 @@ import { Pool, MinModuleParams as MintModuleParams } from '@injectivelabs/sdk-ts' -import { HttpClient, BigNumberInBase } from '@injectivelabs/utils' +import { BigNumberInBase } from '@injectivelabs/utils' import { injToken } from './../data/token' import { mintApi, bankApi, stakingApi } from './../Service' import { sharedToBalanceInToken } from './../utils/formatter' -const ACTUAL_BLCOk_TIME = 0.625194000005722 -const ACTUAL_BLOCKS_PER_YEAR = 50441942.82048672 +const ACTUAL_BLOCK_TIME = 0.75 +const ACTUAL_BLOCKS_PER_YEAR = 42_048_000 type ParamStoreState = { injSupply: string @@ -100,31 +100,10 @@ export const useSharedParamStore = defineStore('sharedParam', { async fetchChainParams() { const paramStore = useSharedParamStore() - const httpClient = new HttpClient('https://chains.cosmos.directory/') - - try { - const { data } = (await httpClient.get('injective')) as { - data: { - chain: { - params: { - actual_block_time: number - actual_blocks_per_year: number - } - } - } - } - - paramStore.$patch({ - actualBlockTime: data.chain.params.actual_block_time, - actualBlocksPerYear: data.chain.params.actual_blocks_per_year - }) - } catch (error: any) { - // silently throw - paramStore.$patch({ - actualBlockTime: ACTUAL_BLCOk_TIME, - actualBlocksPerYear: ACTUAL_BLOCKS_PER_YEAR - }) - } + paramStore.$patch({ + actualBlockTime: ACTUAL_BLOCK_TIME, + actualBlocksPerYear: ACTUAL_BLOCKS_PER_YEAR + }) } } })