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

Update mobile adapter #882

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/long-apples-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@solana/wallet-adapter-create-react-app-starter': patch
'@solana/wallet-adapter-material-ui-starter': patch
'@solana/wallet-adapter-react-ui-starter': patch
'@solana/wallet-adapter-nextjs-starter': patch
'@solana/wallet-adapter-example': patch
'@solana/wallet-adapter-material-ui': patch
'@solana/wallet-adapter-ant-design': patch
'@solana/wallet-adapter-react-ui': patch
'@solana/wallet-adapter-react': patch
'@solana/wallet-adapter-base-ui': patch
---

Update wallet-adapter-mobile to version 2.1.0 which includes support for Mobile Wallet Adapter 2.0 and Sign in With Solana
2 changes: 1 addition & 1 deletion packages/core/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@solana/web3.js": "^1.77.3"
},
"dependencies": {
"@solana/wallet-standard-features": "^1.1.0",
"@solana/wallet-standard-features": "^1.2.0",
"@wallet-standard/base": "^1.0.1",
"@wallet-standard/features": "^1.0.3",
"eventemitter3": "^4.0.7"
Expand Down
4 changes: 2 additions & 2 deletions packages/core/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
"react": "*"
},
"dependencies": {
"@solana-mobile/wallet-adapter-mobile": "^2.0.0",
"@solana-mobile/wallet-adapter-mobile": "^2.1.2",
"@solana/wallet-adapter-base": "workspace:^",
"@solana/wallet-standard-wallet-adapter-react": "^1.1.0"
"@solana/wallet-standard-wallet-adapter-react": "^1.1.2"
},
"devDependencies": {
"@solana/web3.js": "^1.77.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/react/src/WalletProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function WalletProvider({
uri: getUriForAppIdentity(),
},
authorizationResultCache: createDefaultAuthorizationResultCache(),
cluster: getInferredClusterFromEndpoint(connection?.rpcEndpoint),
chain: getInferredClusterFromEndpoint(connection?.rpcEndpoint),
onWalletNotFound: createDefaultWalletNotFoundHandler(),
});
}, [adaptersWithStandardAdapters, connection?.rpcEndpoint]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ describe('WalletProvider when the environment is `MOBILE_WEB`', () => {
it('creates a new mobile wallet adapter with the appropriate cluster for the given endpoint', () => {
renderTest({});
expect(jest.mocked(SolanaMobileWalletAdapter).mock.instances).toHaveLength(1);
expect(jest.mocked(SolanaMobileWalletAdapter).mock.calls[0][0].cluster).toBe('fake-cluster-for-test');
expect(jest.mocked(SolanaMobileWalletAdapter).mock.calls[0][0].chain).toBe('fake-cluster-for-test');
});
});

Expand All @@ -213,7 +213,7 @@ describe('WalletProvider when the environment is `MOBILE_WEB`', () => {
addressSelector: jest.fn() as unknown as AddressSelector,
appIdentity: CUSTOM_APP_IDENTITY,
authorizationResultCache: jest.fn() as unknown as AuthorizationResultCache,
cluster: CUSTOM_CLUSTER,
chain: CUSTOM_CLUSTER,
onWalletNotFound: jest.fn(),
});
adapters.push(customAdapter);
Expand Down
4 changes: 2 additions & 2 deletions packages/starter/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"@solana/wallet-adapter-react": "workspace:^",
"@solana/wallet-adapter-react-ui": "workspace:^",
"@solana/wallet-adapter-wallets": "workspace:^",
"@solana/wallet-standard-features": "^1.1.0",
"@solana/wallet-standard-util": "^1.1.0",
"@solana/wallet-standard-features": "^1.2.0",
"@solana/wallet-standard-util": "^1.1.1",
"@solana/web3.js": "^1.77.3",
"antd": "^4.24.10",
"bs58": "^4.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/wallets/unsafe-burner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"dependencies": {
"@noble/curves": "^1.1.0",
"@solana/wallet-adapter-base": "workspace:^",
"@solana/wallet-standard-features": "^1.1.0",
"@solana/wallet-standard-util": "^1.1.0"
"@solana/wallet-standard-features": "^1.2.0",
"@solana/wallet-standard-util": "^1.1.1"
},
"devDependencies": {
"@solana/web3.js": "^1.77.3",
Expand Down
157 changes: 112 additions & 45 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Loading