Skip to content

Commit

Permalink
fix: fallback from edge to chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
avimak committed Aug 2, 2022
1 parent 3699697 commit d27bfc7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/modal/Modal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@
...installed,
// discovery 2nd, and remove wallets with no support
// for the current browser
...discovery.filter(dw => !!dw.downloads[browser]),
...discovery.filter(
dw =>
!!dw.downloads[browser] ||
(browser === "edge" && !!dw.downloads["chrome"])
),
]
: installed;
Expand Down Expand Up @@ -140,7 +144,11 @@
callback(wallet);
active = false;
} else {
window.open(wallet.downloads[browser], "_blank");
const link =
wallet.downloads[browser] ||
(browser === "edge" && wallet.downloads["chrome"]);
if (!link) return;
window.open(link, "_blank");
// noinspection JSValidateTypes
newWallet = unifiedWallets[idx];
}
Expand Down

0 comments on commit d27bfc7

Please sign in to comment.