Skip to content

Commit

Permalink
fix: deeplinks for desktop apps (#392)
Browse files Browse the repository at this point in the history
Co-authored-by: Lochie Axon <lochieaxon@gmail.com>
  • Loading branch information
aschenkel and lochie committed Jun 17, 2024
1 parent 3e5c9bf commit 5375628
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ const ConnectorItem = ({
*/

let deeplink =
!wallet.isInstalled && isMobile
(!wallet.isInstalled && isMobile) ||
(wallet.shouldDeeplinkDesktop && !isMobile)
? wallet.getWalletConnectDeeplink?.(uri ?? '')
: undefined;

Expand Down
2 changes: 2 additions & 0 deletions packages/connectkit/src/wallets/walletConfigs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export type WalletConfigProps = {
};
// Create URI for QR code, where uri is encoded data from WalletConnect
getWalletConnectDeeplink?: (uri: string) => string;
shouldDeeplinkDesktop?: boolean;
};

// Organised in alphabetical order by key
Expand Down Expand Up @@ -353,6 +354,7 @@ export const walletConfigs: {
? uri
: `ledgerlive://wc?uri=${encodeURIComponent(uri)}`;
},
shouldDeeplinkDesktop: true,
},
zerion: {
name: 'Zerion',
Expand Down

0 comments on commit 5375628

Please sign in to comment.