Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion packages/clerk-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@clerk/localizations": "workspace:^",
"@clerk/shared": "workspace:^",
"@clerk/types": "workspace:^",
"@coinbase/wallet-sdk": "4.0.4",
"@coinbase/wallet-sdk": "4.2.4",
"@emotion/cache": "11.11.0",
"@emotion/react": "11.11.1",
"@floating-ui/react": "0.25.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const common = ({ mode, disableRHC = false }) => {
chunks: 'all',
},
coinbaseWalletSDKVendor: {
test: /[\\/]node_modules[\\/](@coinbase\/wallet-sdk|ieee754|preact|keccak|buffer|string_decoder|sha\.js|base64-js|safe-buffer|util-deprecate|inherits)[\\/]/,
test: /[\\/]node_modules[\\/](@coinbase\/wallet-sdk|preact|eventemitter3|@noble\/hashes)[\\/]/,
name: 'coinbase-wallet-sdk',
chunks: 'all',
},
Expand Down
10 changes: 7 additions & 3 deletions packages/clerk-js/src/utils/web3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ export async function generateSignatureWithOKXWallet(params: GenerateSignaturePa

async function getEthereumProvider(provider: Web3Provider) {
if (provider === 'coinbase_wallet') {
const CoinbaseWalletSDK = await import('@coinbase/wallet-sdk').then(mod => mod.CoinbaseWalletSDK);
const sdk = new CoinbaseWalletSDK({});
return sdk.makeWeb3Provider({ options: 'all' });
const createCoinbaseWalletSDK = await import('@coinbase/wallet-sdk').then(mod => mod.createCoinbaseWalletSDK);
const sdk = createCoinbaseWalletSDK({
preference: {
options: 'all',
},
});
return sdk.getProvider();
}

const injectedWeb3Providers = getInjectedWeb3Providers();
Expand Down
52 changes: 16 additions & 36 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.