Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support network based api keys #456

Merged
merged 1 commit into from
Dec 3, 2024
Merged

Support network based api keys #456

merged 1 commit into from
Dec 3, 2024

Conversation

0xmaayan
Copy link
Collaborator

@0xmaayan 0xmaayan commented Dec 2, 2024

We recently added API Key support to the adapter, but an API key is a network based, so supporting only 1 api key doesnt make sense when the user connects their wallet to different networks.

This PR adds support for a network based API Key so the adapter uses the correct API Key based on the network the wallet is connected to

@0xmaayan 0xmaayan force-pushed the multiple_api_keys branch 2 times, most recently from 5b74880 to 44810f4 Compare December 2, 2024 23:36
@@ -108,6 +116,17 @@ export const isAptosNetwork = (
return NetworkToNodeAPI[networkInfo.name] !== undefined;
};

export const isAptosLiveNetwork = (networkInfo: Network): boolean => {
if (!networkInfo) {
Copy link
Contributor

Choose a reason for hiding this comment

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

did you encounter this case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops, copy-past, removed

@0xmaayan 0xmaayan enabled auto-merge (squash) December 3, 2024 15:43
@0xmaayan 0xmaayan merged commit 80a3c8a into main Dec 3, 2024
3 of 6 checks passed
@0xmaayan 0xmaayan deleted the multiple_api_keys branch December 3, 2024 15:47
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.

3 participants