Skip to content
Merged
Show file tree
Hide file tree
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] add listener for coinbase wallet
- [RN] only exports wallet creator functions
- [RN] remove coinbase wallet as a default wallet
- [React] only export wallet creator functions
- [React] Move WC projectId into react and out of react-core
  • Loading branch information
ikethirdweb committed Mar 29, 2023
commit 53d624780ef19a79fa9eedb60c5468cc72d2033c
1 change: 0 additions & 1 deletion packages/react-core/src/evm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export type { ThirdwebProviderCoreProps } from "../core/providers/thirdweb-provi

// constants
export { __DEV__ } from "../core/constants/runtime";
export { TW_WC_PROJECT_ID } from "../core/constants/wc";

// wallet hooks
export {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { TWModal } from "../base/modal/TWModal";
import { ChooseWallet } from "./ChooseWallet/ChooseWallet";
import { ConnectingWallet } from "./ConnectingWallet/ConnectingWallet";
import { Wallet, useConnect, useWallets } from "@thirdweb-dev/react-core";
import { useState } from "react";
import { StyleSheet } from "react-native";
import { useEffect, useState } from "react";
import { Linking, StyleSheet } from "react-native";
import { handleResponse } from "@coinbase/wallet-mobile-sdk";

export const ConnectWalletFlow = () => {
const [modalVisible, setModalVisible] = useState(false);
Expand All @@ -14,6 +15,17 @@ export const ConnectWalletFlow = () => {
const connect = useConnect();
const supportedWallets = useWallets();

useEffect(() => {
if (activeWallet && activeWallet.meta.name.toLowerCase().includes("coinbase")) {
const sub = Linking.addEventListener("url", ({ url }) => {
if (url) {
handleResponse(new URL(url));
}
});
return () => sub?.remove();
}
}, [activeWallet]);

const onConnectPress = () => {
setModalVisible(true);
};
Expand Down
8 changes: 4 additions & 4 deletions packages/react-native/src/evm/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export { CoinbaseWallet, coinbaseWallet } from "./wallets/wallets/coinbase-wallet";
export { MetaMaskWallet, metamaskWallet } from "./wallets/wallets/metamask-wallet";
export { RainbowWallet, rainbowWallet } from "./wallets/wallets/rainbow-wallet";
export { TrustWallet, trustWallet } from "./wallets/wallets/trust-wallet";
export { coinbaseWallet } from "./wallets/wallets/coinbase-wallet";
export { metamaskWallet } from "./wallets/wallets/metamask-wallet";
export { rainbowWallet } from "./wallets/wallets/rainbow-wallet";
export { trustWallet } from "./wallets/wallets/trust-wallet";

export { ConnectWallet } from "./components/ConnectWallet";
export { Web3Button } from "./components/Web3Button";
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/src/evm/providers/thirdweb-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createAsyncLocalStorage } from "../../core/AsyncStorage";
import { DEFAULT_API_KEY } from "../constants/rpc";
import { coinbaseWallet } from "../wallets/wallets/coinbase-wallet";
import {
ThirdwebProviderCore,
ThirdwebProviderCoreProps,
Expand All @@ -9,8 +8,9 @@ import {
import { PropsWithChildren } from "react";
import type { Chain, defaultChains } from "@thirdweb-dev/chains";
import { metamaskWallet } from "../wallets/wallets/metamask-wallet";
import { rainbowWallet } from "../wallets/wallets/rainbow-wallet";

const DEFAULT_WALLETS = [metamaskWallet(), coinbaseWallet()];
const DEFAULT_WALLETS = [metamaskWallet(), rainbowWallet()];

interface ThirdwebProviderProps<TChains extends Chain[]>
extends Omit<ThirdwebProviderCoreProps<TChains>, "supportedWallets"> {
Expand Down
8 changes: 0 additions & 8 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
export { coinbaseWallet } from "./wallet/wallets/coinbaseWallet";
export { deviceWallet, DeviceWallet } from "./wallet/wallets/deviceWallet";
export { metamaskWallet } from "./wallet/wallets/metamaskWallet";
export { paperWallet } from "./wallet/wallets/paperWallet";
export { safeWallet } from "./wallet/wallets/safeWallet";
export { walletConnect } from "./wallet/wallets/walletConnect";
export { walletConnectV1 } from "./wallet/wallets/walletConnectV1";

export { PaperWallet } from "@thirdweb-dev/wallets";
export { SafeWallet } from "@thirdweb-dev/wallets";
export { WalletConnect } from "@thirdweb-dev/wallets";
export { WalletConnectV1 } from "@thirdweb-dev/wallets";
export { CoinbaseWallet } from "@thirdweb-dev/wallets";
export { MetaMask as MetamaskWallet } from "@thirdweb-dev/wallets";

// at the moment we'll re-export everything from the evm package
export * from "./evm";
2 changes: 1 addition & 1 deletion packages/react/src/wallet/wallets/walletConnect.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TW_WC_PROJECT_ID } from "@thirdweb-dev/react-core";
import { WalletConnect } from "@thirdweb-dev/wallets";
import type { Wallet, WalletOptions } from "@thirdweb-dev/react-core";
import { TW_WC_PROJECT_ID } from "../constants/wc";

export const walletConnect = (config?: { projectId?: string }) => {
const projectId = config?.projectId || TW_WC_PROJECT_ID;
Expand Down