Skip to content

Commit

Permalink
fix: update utils in cosmostation
Browse files Browse the repository at this point in the history
  • Loading branch information
marslavish committed Mar 18, 2024
1 parent 0537055 commit facf128
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/cosmostation/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Asset, AssetList, Chain } from '@chain-registry/types';
import { getGasPriceStep } from '@chain-registry/utils';
import { getGasPriceRangesFromChain } from '@chain-registry/utils';
import { AddChainParams } from '@cosmostation/extension-client/types/message';

const getRest = (chain: Chain): string => chain.apis?.rest[0]?.address;
Expand Down Expand Up @@ -50,7 +50,7 @@ export const chainRegistryChainToCosmostation = (
currencies.find((currency) => stakingDenoms.includes(currency.baseDenom)) ??
currencies[0];

const gasPriceStep = getGasPriceStep(chain);
const gasPriceRanges = getGasPriceRangesFromChain(chain);

const chainInfo: AddChainParams = {
chainId: chain.chain_id,
Expand All @@ -64,8 +64,8 @@ export const chainRegistryChainToCosmostation = (
coinGeckoId: currencies[0].coinGeckoId,
gasRate: {
// optional (default: { average: '0.025', low: '0.0025', tiny: '0.00025' })
average: gasPriceStep.average.toString(),
low: gasPriceStep.low.toString(),
average: gasPriceRanges.average.toString(),
low: gasPriceRanges.low.toString(),
tiny: '0.00025'
}
// TODO implement type
Expand Down

0 comments on commit facf128

Please sign in to comment.