diff --git a/.changeset/grumpy-jeans-carry.md b/.changeset/grumpy-jeans-carry.md new file mode 100644 index 0000000000..d1bd36686e --- /dev/null +++ b/.changeset/grumpy-jeans-carry.md @@ -0,0 +1,23 @@ +--- +'@reown/appkit-adapter-solana': patch +'@apps/builder': patch +'@reown/appkit-adapter-ethers': patch +'@reown/appkit-adapter-ethers5': patch +'@reown/appkit-adapter-wagmi': patch +'@reown/appkit': patch +'@reown/appkit-utils': patch +'@reown/appkit-cdn': patch +'@reown/appkit-cli': patch +'@reown/appkit-common': patch +'@reown/appkit-core': patch +'@reown/appkit-experimental': patch +'@reown/appkit-polyfills': patch +'@reown/appkit-scaffold-ui': patch +'@reown/appkit-siwe': patch +'@reown/appkit-siwx': patch +'@reown/appkit-ui': patch +'@reown/appkit-wallet': patch +'@reown/appkit-wallet-button': patch +--- + +Fixes phantom and coinbase deeplink url parameters to be encoded diff --git a/packages/adapters/solana/src/utils/handleMobileWalletRedirection.ts b/packages/adapters/solana/src/utils/handleMobileWalletRedirection.ts index fc982c7bc5..a839c8917a 100644 --- a/packages/adapters/solana/src/utils/handleMobileWalletRedirection.ts +++ b/packages/adapters/solana/src/utils/handleMobileWalletRedirection.ts @@ -3,7 +3,7 @@ export function handleMobileWalletRedirection(properties: { platform: string }): void { if (properties?.name === 'Phantom' && !('phantom' in window)) { - const href = window.location.href + const href = encodeURIComponent(window.location.href) const protocol = href.startsWith('https') ? 'https' : 'http' const host = href.split('/')[2] const ref = `${protocol}://${host}` @@ -11,7 +11,7 @@ export function handleMobileWalletRedirection(properties: { } if (properties?.name === 'Coinbase Wallet' && !('coinbaseSolana' in window)) { - const href = window.location.href + const href = encodeURIComponent(window.location.href) window.location.href = `https://go.cb-w.com/dapp?cb_url=${href}` } }