diff --git a/src/libs/client.ts b/src/libs/client.ts index cddac94e..777f5fcc 100644 --- a/src/libs/client.ts +++ b/src/libs/client.ts @@ -4,13 +4,12 @@ import { adapter, type Request, type RequestRegistry, - type Registry, type AbstractRegistry, findApiProfileByChain, registryChainProfile, withCustomRequest, } from './registry'; -import { PageRequest } from '@/types'; +import { PageRequest,type Coin } from '@/types'; import { CUSTOM } from './custom_api/evmos' export class BaseRestClient { @@ -69,7 +68,8 @@ export class CosmosRestClient extends BaseRestClient { try{ supply = await this.request(this.registry.bank_supply_by_denom, { denom }); } catch(err) { - supply = await this.request({url: "/cosmos/bank/v1beta1/supply/by_denom?denom={denom}", adapter }, { denom }); + // will move this to sdk version profile later + supply = await this.request({url: "/cosmos/bank/v1beta1/supply/by_denom?denom={denom}", adapter } as Request<{ amount: Coin }>, { denom }); } return supply } diff --git a/src/libs/custom_api/evmos.ts b/src/libs/custom_api/evmos.ts index ee333137..5da78cf5 100644 --- a/src/libs/custom_api/evmos.ts +++ b/src/libs/custom_api/evmos.ts @@ -1,4 +1,5 @@ -import { DEFAULT, type RequestRegistry } from '@/libs' +import type{ RequestRegistry } from '@/libs/registry' +import { DEFAULT } from '@/libs' export const CUSTOM: Partial = { - mint_inflation: { url: '/evmos/inflation/v1/inflation_rate', adapter: data => ({inflation: Number(data.inflation_rate || 0)/ 100}) }, + mint_inflation: { url: '/evmos/inflation/v1/inflation_rate', adapter: (data: any) => ({inflation: (Number(data.inflation_rate || 0)/ 100 ).toFixed(2)}) }, } diff --git a/src/modules/wallet/accounts.vue b/src/modules/wallet/accounts.vue index a375cee0..10e3e6ac 100644 --- a/src/modules/wallet/accounts.vue +++ b/src/modules/wallet/accounts.vue @@ -1,7 +1,7 @@