Skip to content

Commit

Permalink
fix: missing download url change
Browse files Browse the repository at this point in the history
  • Loading branch information
lochie committed Nov 30, 2023
1 parent d28fe95 commit c900f82
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,25 @@ const ConnectWithQRCode: React.FC<{
if (!wallet) return <>Wallet not found {context.connector.id}</>;

const downloads = wallet?.downloadUrls;
const extensions = {
chrome: downloads?.chrome,
firefox: downloads?.firefox,
brave: downloads?.brave,
edge: downloads?.edge,
safari: downloads?.safari,
};

const browser = detectBrowser();

const hasApps = downloads && Object.keys(downloads).length !== 0;

const suggestedExtension = downloads?.extensions
const suggestedExtension = extensions
? {
name: Object.keys(downloads?.extensions)[0],
name: Object.keys(extensions)[0],
label:
Object.keys(downloads?.extensions)[0]?.charAt(0).toUpperCase() +
Object.keys(downloads?.extensions)[0]?.slice(1), // Capitalise first letter, but this might be better suited as a lookup table
url: downloads?.extensions[Object.keys(downloads?.extensions)[0]],
Object.keys(extensions)[0]?.charAt(0).toUpperCase() +
Object.keys(extensions)[0]?.slice(1), // Capitalise first letter, but this might be better suited as a lookup table
url: extensions[Object.keys(extensions)[0]],
}
: undefined;

Expand Down

0 comments on commit c900f82

Please sign in to comment.