Skip to content

Set rpc cluster name as global window variable for walletAdapterLib#202

Merged
GabrielePicco merged 2 commits intomagicblock-labs:mainfrom
nicoeft:mobile-wallet-adapter-webgl
Feb 6, 2024
Merged

Set rpc cluster name as global window variable for walletAdapterLib#202
GabrielePicco merged 2 commits intomagicblock-labs:mainfrom
nicoeft:mobile-wallet-adapter-webgl

Conversation

@nicoeft
Copy link
Copy Markdown
Contributor

@nicoeft nicoeft commented Jan 24, 2024

Status Type ⚠️ Core Change Issue
Ready Feature No #200

Problem

Include Solana Mobile Wallet Adapter for WebGL builds when running in mobile.

Solution

Most of the code containing the solution is in the unity-js-wallet-adapter where SolanaMobileWallet adapter instance is created when running in mobile. For that, we needed to pass the RPC cluser selected to the JS runtime. We just do that here, by setting a global variable window.rpcCluster with the cluster name from Unity thorugh jslib.

Deploy Notes

It's important to note that this PR alone does not provide the solution, it has a strict dependency on the PR for unity-js-wallet-adapter

@GabrielePicco
Copy link
Copy Markdown
Collaborator

LGTM! Thanks @nicoeft

@GabrielePicco GabrielePicco merged commit cb4a0aa into magicblock-labs:main Feb 6, 2024
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