Skip to content

Commit

Permalink
fix: nova wallet detection
Browse files Browse the repository at this point in the history
  • Loading branch information
tien committed Feb 19, 2025
1 parent 58173d0 commit 234c178
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-trainers-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dot-connect": patch
---

Fixed Nova Wallet detection.
7 changes: 5 additions & 2 deletions packages/dot-connect/src/wallets/nova.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { urlFromSvg } from "../utils.js";
import { identifyBrowser, urlFromSvg } from "../utils.js";
import type { InjectedWalletInfo, WalletConfig } from "./types.js";
import type { Wallet } from "@reactive-dot/core/wallets.js";
import { html } from "lit";

export const nova: WalletConfig<InjectedWalletInfo> = {
selector: (_wallet: Wallet) => false,
selector: (wallet: Wallet) =>
wallet.id === "injected/polkadot-js" &&
// TODO: remove once Nova is fixed
["ios", "android"].includes(identifyBrowser()!),
name: "Nova Wallet",
platforms: ["ios", "android"],
logo: urlFromSvg(
Expand Down
7 changes: 5 additions & 2 deletions packages/dot-connect/src/wallets/polkadot-js.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { urlFromSvg } from "../utils.js";
import { identifyBrowser, urlFromSvg } from "../utils.js";
import type { InjectedWalletInfo, WalletConfig } from "./types.js";
import type { Wallet } from "@reactive-dot/core/wallets.js";
import { html } from "lit";

export const polkadotJs: WalletConfig<InjectedWalletInfo> = {
selector: (wallet: Wallet) => wallet.id === "injected/polkadot-js",
selector: (wallet: Wallet) =>
wallet.id === "injected/polkadot-js" &&
// TODO: remove once Nova is fixed
!["ios", "android"].includes(identifyBrowser()!),
name: "Polkadot{.js}",
platforms: ["chrome", "firefox"],
logo: urlFromSvg(
Expand Down

0 comments on commit 234c178

Please sign in to comment.