Skip to content

Commit bb34d62

Browse files
authored
Prevent error when chain is not defined in built-in config (#3232)
1 parent 6ab1fff commit bb34d62

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

wormhole-connect/src/config/utils.ts

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ export const mergeCustomWrappedTokens = (
5353

5454
for (const chain in custom) {
5555
for (const addr in custom[chain]) {
56+
// Prevent error when chain is not defined in built-in config
57+
if (!builtin[chain]) builtin[chain] = {};
5658
builtin[chain][addr] = {
5759
...custom[chain][addr],
5860
// Prevent overwriting built-in wrapped token addresses

0 commit comments

Comments
 (0)