Skip to content

Conversation

jayantk
Copy link
Contributor

@jayantk jayantk commented Nov 10, 2021

Someone ran into an error with the client that was caused by them passing "mainnet" instead of "mainnet-beta" as a solana cluster name. Improve the error message so that I don't have to debug this problem for users in the future.

Sorry for the unrelated changes in here -- it looks like the linter fires when you run npm version and it made some changes on its own. I'll call out the only thing i changed in a comment.

}

/** Gets the public key of the Pyth program running on the given cluster. */
export function getPythProgramKeyForCluster(cluster: Cluster): PublicKey {
return new PublicKey(clusterToPythProgramKey[cluster]);
if (clusterToPythProgramKey[cluster] !== undefined) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this

@jayantk jayantk requested a review from cctdaniel November 10, 2021 16:18
Copy link
Contributor

@cctdaniel cctdaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@jayantk jayantk merged commit 417672b into main Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants