Skip to content

Commit

Permalink
refactor: respect Coinbase wallet optons when preloading (#3364)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquim-verges committed Jun 17, 2024
1 parent 49cfdb3 commit 7304c5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/giant-phones-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Respect coinbase wallet create settings when preloading the provider
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useQueries } from "@tanstack/react-query";
import type { ThirdwebClient } from "../../../client/client.js";
import { COINBASE } from "../../../wallets/constants.js";
import type { Wallet } from "../../../wallets/interfaces/wallet.js";
import type { CreateWalletArgs } from "../../../wallets/wallet-types.js";

export function usePreloadWalletProviders({
client,
Expand All @@ -18,7 +19,9 @@ export function usePreloadWalletProviders({
const { getCoinbaseWebProvider } = await import(
"../../../wallets/coinbase/coinbaseWebSDK.js"
);
await getCoinbaseWebProvider();
await getCoinbaseWebProvider(
w.getConfig() as CreateWalletArgs<typeof COINBASE>[1],
);
// return _something_
return true;
}
Expand Down

0 comments on commit 7304c5b

Please sign in to comment.