Skip to content

Commit 7304c5b

Browse files
refactor: respect Coinbase wallet optons when preloading (#3364)
1 parent 49cfdb3 commit 7304c5b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/giant-phones-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Respect coinbase wallet create settings when preloading the provider

packages/thirdweb/src/react/web/utils/usePreloadWalletProviders.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useQueries } from "@tanstack/react-query";
22
import type { ThirdwebClient } from "../../../client/client.js";
33
import { COINBASE } from "../../../wallets/constants.js";
44
import type { Wallet } from "../../../wallets/interfaces/wallet.js";
5+
import type { CreateWalletArgs } from "../../../wallets/wallet-types.js";
56

67
export function usePreloadWalletProviders({
78
client,
@@ -18,7 +19,9 @@ export function usePreloadWalletProviders({
1819
const { getCoinbaseWebProvider } = await import(
1920
"../../../wallets/coinbase/coinbaseWebSDK.js"
2021
);
21-
await getCoinbaseWebProvider();
22+
await getCoinbaseWebProvider(
23+
w.getConfig() as CreateWalletArgs<typeof COINBASE>[1],
24+
);
2225
// return _something_
2326
return true;
2427
}

0 commit comments

Comments
 (0)