Skip to content

Commit

Permalink
node: Fix missing tokens in generated token list due to outdated SDK (#…
Browse files Browse the repository at this point in the history
…4053)

- The script used to generate the updated token list was using an
  outdated version of the TS SDK. This caused newer chains to return a
  result of 'undefined' when they were converted to the custom ChainId
  type as they were not encluded in the enum of valid chain IDs
- Update the local SDK version used by the script via `npm update @certusone/wormhole-sdk`
- Adds additional logging to the script to help troubleshoot similar
  errors in the future
  • Loading branch information
johnsaigle authored Aug 2, 2024
1 parent f20a42e commit 6b72e57
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
46 changes: 25 additions & 21 deletions node/hack/governor/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions node/hack/governor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,15 @@ axios
}
if (wormholeAddr === undefined) {
console.log(
`Ignoring symbol '${data.Symbol}' on chain ${chainId} because the address '${data.Address}' is undefined`
`Ignoring symbol '${data.Symbol}' on chain ${chainId} because the address '${data.Address}' is undefined`,
data,
`Is the SDK up-to-date?`
);
continue;
} else if (wormholeAddr === "") {
console.log(
`Ignoring symbol '${data.Symbol}' on chain ${chainId} because the address '${data.Address}' is invalid`
`Ignoring symbol '${data.Symbol}' on chain ${chainId} because the address '${data.Address}' is invalid`,
data
);
continue;
}
Expand Down

0 comments on commit 6b72e57

Please sign in to comment.