Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
24ebb79
allow wallet config, fix gnosis safe
MananTank Mar 27, 2023
d343958
remove console log
MananTank Mar 27, 2023
20a4bf9
Fix icon size issue with reset css
MananTank Mar 27, 2023
89a0743
export wallet classes
MananTank Mar 27, 2023
6d5138a
allow getting email from paper wallet
MananTank Mar 27, 2023
1f203c7
remove unnecessary try-catch
MananTank Mar 27, 2023
45a84be
remove unnecessary comments
MananTank Mar 27, 2023
9fe0630
Merge branch 'main' into allow-wallet-config
MananTank Mar 27, 2023
555d23f
Merge branch 'main' into allow-wallet-config
MananTank Mar 27, 2023
10bd90b
add changeset
MananTank Mar 27, 2023
8271dd3
merge
Mar 27, 2023
92d26a9
merge
Mar 27, 2023
c76fd4f
Merge branch 'main' into allow-wallet-config
iketw Mar 27, 2023
4653b96
Merge branch 'main' into allow-wallet-config
Mar 27, 2023
bd07a54
Merge branch 'allow-wallet-config' of github.com:thirdweb-dev/js into…
Mar 27, 2023
646dc4a
react-native fixes
Mar 27, 2023
2c05798
Merge branch 'main' into allow-wallet-config
Mar 27, 2023
89629b4
descriptive console.error
Mar 27, 2023
b245c50
fix bug in wcv2, optionalChains are not optional
Mar 28, 2023
b37c673
[RN] coinbase-wallet allow passing callbackURL
Mar 28, 2023
74f8928
Remove duplicate prop
MananTank Mar 28, 2023
063cd33
use react-query in usePaperWalletUserEmail()
MananTank Mar 28, 2023
337e678
Merge branch 'main' into allow-wallet-config
MananTank Mar 28, 2023
2f9750e
Update Paper SDK version
MananTank Mar 28, 2023
66bd21c
wallets: fix build error after updating paper sdk version
MananTank Mar 28, 2023
10366f5
auth: export PrivateKeyWallet
MananTank Mar 28, 2023
53d6247
- [RN] add listener for coinbase wallet
Mar 29, 2023
2f4e1e5
changeset
Mar 29, 2023
44b6282
Merge branch 'main' into allow-wallet-config
Mar 29, 2023
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
Prev Previous commit
Next Next commit
[RN] coinbase-wallet allow passing callbackURL
  • Loading branch information
ikethirdweb committed Mar 28, 2023
commit b37c6734ab1dd789566b92b26074a02a6ed4a931
11 changes: 4 additions & 7 deletions packages/react-native/src/evm/wallets/wallets/coinbase-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ import {
WalletOptions as WalletOptionsRC,
} from "@thirdweb-dev/react-core";

type CoinbaseWalletOptions = Omit<
WalletOptions<CoinbaseWalletConnectorOptions>,
"callbackURL" | "walletStorage"
>;
type CoinbaseWalletOptions = Omit<WalletOptions<CoinbaseWalletConnectorOptions>,"walletStorage">;

export class CoinbaseWallet extends AbstractBrowserWallet<CoinbaseWalletConnectorOptions> {
static meta = {
Expand All @@ -39,7 +36,6 @@ export class CoinbaseWallet extends AbstractBrowserWallet<CoinbaseWalletConnecto
constructor(options: CoinbaseWalletOptions) {
super(CoinbaseWallet.id, {
...options,
callbackURL: new URL("https://thirdweb.com"),
walletStorage: new noopStorage(),
walletId: "coinbase",
});
Expand Down Expand Up @@ -69,10 +65,11 @@ export class CoinbaseWallet extends AbstractBrowserWallet<CoinbaseWalletConnecto
}
}

export const coinbaseWallet = () => {
export const coinbaseWallet = (config?: {callbackURL?: URL}) => {
const callbackURLNonNull = config?.callbackURL || new URL("https://thirdweb.com/wsegue");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this fallback URL?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@iketw iketw Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jnsdls that URL is required by the Coinbase Wallet SDK as a UniversalLink to talk back to iOS apps: https://coinbase.github.io/wallet-mobile-sdk/docs/client-sdk/rn-setup/#configuration.

I'm voting for removing the Coinbase wallet as a default wallet and figure out tree-shaking. Adding UniversalLinks is another friction point to build a new app + breaking Expo Go support. I opened a ticket with them as well: https://github.com/coinbase/wallet-mobile-sdk/issues/213.

return {
id: CoinbaseWallet.id,
meta: CoinbaseWallet.meta,
create: (options: WalletOptionsRC) => new CoinbaseWallet(options),
create: (options: WalletOptionsRC) => new CoinbaseWallet({...options, callbackURL: callbackURLNonNull}),
} satisfies Wallet;
};