Skip to content

Commit

Permalink
fix: autoconnect to WC v2 on mobile (#2238)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacook authored Jul 10, 2023
1 parent fdaf1a2 commit 61b5ac8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/wallets/useOnboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const connectWallet = async (
// On mobile, automatically choose WalletConnect if there is no injected wallet
if (!options && isMobile() && !hasInjectedWallet()) {
options = {
autoSelect: WalletNames.WALLET_CONNECT,
autoSelect: WalletNames.WALLET_CONNECT_V2,
}
}

Expand Down
1 change: 1 addition & 0 deletions src/utils/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const isWalletRejection = (err: EthersError | Error): boolean => {
export const WalletNames = {
METAMASK: ProviderLabel.MetaMask,
WALLET_CONNECT: WALLET_CONNECT_V1_MODULE_NAME,
WALLET_CONNECT_V2: 'WalletConnect',
SAFE_MOBILE_PAIRING: PAIRING_MODULE_LABEL,
}

Expand Down

0 comments on commit 61b5ac8

Please sign in to comment.