Skip to content

Commit f51ecdc

Browse files
authored
chore(clerk-js): Bump Coinbase sdk version (clerk#4945)
1 parent 796b1ce commit f51ecdc

File tree

7 files changed

+34
-45
lines changed

7 files changed

+34
-45
lines changed

.changeset/green-panthers-act.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': minor
3+
---
4+
5+
Update `@coinbase/wallet-sdk` depedency to `4.2.4`.

packages/clerk-js/bundlewatch.config.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"files": [
3-
{ "path": "./dist/clerk.js", "maxSize": "707kB" },
3+
{ "path": "./dist/clerk.js", "maxSize": "560kB" },
44
{ "path": "./dist/clerk.browser.js", "maxSize": "75kB" },
55
{ "path": "./dist/clerk.headless.js", "maxSize": "48kB" },
66
{ "path": "./dist/ui-common*.js", "maxSize": "89KB" },
7-
{ "path": "./dist/vendors*.js", "maxSize": "70KB" },
8-
{ "path": "./dist/coinbase*.js", "maxSize": "58KB" },
7+
{ "path": "./dist/vendors*.js", "maxSize": "25KB" },
8+
{ "path": "./dist/coinbase*.js", "maxSize": "35.1KB" },
99
{ "path": "./dist/createorganization*.js", "maxSize": "5KB" },
1010
{ "path": "./dist/impersonationfab*.js", "maxSize": "5KB" },
1111
{ "path": "./dist/organizationprofile*.js", "maxSize": "12KB" },

packages/clerk-js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@clerk/localizations": "workspace:^",
5858
"@clerk/shared": "workspace:^",
5959
"@clerk/types": "workspace:^",
60-
"@coinbase/wallet-sdk": "4.0.4",
60+
"@coinbase/wallet-sdk": "4.2.4",
6161
"@emotion/cache": "11.11.0",
6262
"@emotion/react": "11.11.1",
6363
"@floating-ui/react": "0.25.4",

packages/clerk-js/rspack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const common = ({ mode, disableRHC = false }) => {
8181
chunks: 'all',
8282
},
8383
coinbaseWalletSDKVendor: {
84-
test: /[\\/]node_modules[\\/](@coinbase\/wallet-sdk|ieee754|preact|keccak|buffer|string_decoder|sha\.js|base64-js|safe-buffer|util-deprecate|inherits)[\\/]/,
84+
test: /[\\/]node_modules[\\/](@coinbase\/wallet-sdk|preact|eventemitter3|@noble\/hashes)[\\/]/,
8585
name: 'coinbase-wallet-sdk',
8686
chunks: 'all',
8787
},

packages/clerk-js/src/utils/web3.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,13 @@ export async function generateSignatureWithOKXWallet(params: GenerateSignaturePa
7575

7676
async function getEthereumProvider(provider: Web3Provider) {
7777
if (provider === 'coinbase_wallet') {
78-
const CoinbaseWalletSDK = await import('@coinbase/wallet-sdk').then(mod => mod.CoinbaseWalletSDK);
79-
const sdk = new CoinbaseWalletSDK({});
80-
return sdk.makeWeb3Provider({ options: 'all' });
78+
const createCoinbaseWalletSDK = await import('@coinbase/wallet-sdk').then(mod => mod.createCoinbaseWalletSDK);
79+
const sdk = createCoinbaseWalletSDK({
80+
preference: {
81+
options: 'all',
82+
},
83+
});
84+
return sdk.getProvider();
8185
}
8286

8387
const injectedWeb3Providers = getInjectedWeb3Providers();

playground/app-router/src/app/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ export default function Home() {
9797
</div>
9898
</main>
9999
);
100-
}
100+
}

pnpm-lock.yaml

+16-36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)