Skip to content

Commit

Permalink
fix: registry index check
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjasiuk committed Sep 20, 2024
1 parent dcb53aa commit 73c6bbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/namadillo/src/registry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const nameMap: Map<string, number> = new Map();

export function chainConfigByMinDenom(minDenom: ChainMinDenom): ChainConfig {
const index = minimalDenomMap.get(minDenom);
if (!index) {
if (typeof index === "undefined") {
throw new Error("Chain config not found");
}

Expand All @@ -33,7 +33,7 @@ export function chainConfigByMinDenom(minDenom: ChainMinDenom): ChainConfig {

export function chainConfigByName(name: ChainName): ChainConfig {
const index = nameMap.get(name);
if (!index) {
if (typeof index === "undefined") {
throw new Error("Chain config not found");
}
return loadedConfigs[index];
Expand Down

0 comments on commit 73c6bbc

Please sign in to comment.