Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 4118697

Browse files
fix: resolve comments
1 parent 457fd0d commit 4118697

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/ui/common/services/bsnService.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import logger from "@/infrastructure/logger";
12
import { getNetworkConfigBBN } from "@/ui/common/config/network/bbn";
23

34
import { getBsnAPI } from "../api/getBsn";
@@ -62,7 +63,19 @@ export const getBsnConfig = (bsn?: Bsn): BsnConfig => {
6263
}
6364

6465
// Use type-based config
65-
return BSN_CONFIGS[bsn.type] || BSN_CONFIGS[BBN_CHAIN_ID];
66+
const config = BSN_CONFIGS[bsn.type];
67+
if (!config) {
68+
logger.error(new Error(`BSN config not found for type: ${bsn.type}`), {
69+
tags: { service: "bsnService", function: "getBsnConfig" },
70+
data: {
71+
bsnType: bsn.type,
72+
bsnId: bsn.id,
73+
fallback: "Babylon Genesis config",
74+
},
75+
});
76+
return BSN_CONFIGS[BBN_CHAIN_ID];
77+
}
78+
return config;
6679
};
6780

6881
/**

0 commit comments

Comments
 (0)