Skip to content

Commit

Permalink
Ensure that coinGeckoId is not an empty string (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
codingki authored Dec 11, 2024
2 parents f6ff768 + 9f018e2 commit 6fe388b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/graz/src/cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ const makeRecord = async (client, { filter = "" } = {}) => {
coinMinimalDenom:
chain.assets?.find((asset) => asset.denom === token.denom)?.denom_units[0]?.denom || token.denom,
coinDecimals: Number(chain.assets?.find((asset) => asset.denom === token.denom)?.decimals),
coinGeckoId: chain.assets?.find((asset) => asset.denom === token.denom)?.coingecko_id || "",
coinGeckoId: chain.assets?.find((asset) => asset.denom === token.denom)?.coingecko_id || undefined,
gasPriceStep: {
low: Number(token.low_gas_price),
average: Number(token.average_gas_price),
Expand All @@ -252,7 +252,7 @@ const makeRecord = async (client, { filter = "" } = {}) => {
coinMinimalDenom:
chain.assets?.find((asset) => asset.denom === token.denom)?.denom_units[0]?.denom || token.denom,
coinDecimals: Number(chain.assets?.find((asset) => asset.denom === token.denom)?.decimals),
coinGeckoId: chain.assets?.find((asset) => asset.denom === token.denom)?.coingecko_id || "",
coinGeckoId: chain.assets?.find((asset) => asset.denom === token.denom)?.coingecko_id || undefined,
};
});

Expand Down

0 comments on commit 6fe388b

Please sign in to comment.