Skip to content

Commit

Permalink
fix(device-core/isEditDeviceNameSupported): Nano SP supported
Browse files Browse the repository at this point in the history
  • Loading branch information
ofreyssinet-ledger committed Apr 25, 2024
1 parent 8da02d1 commit bfca25b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .changeset/silly-geese-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"ledger-live-desktop": patch
"live-mobile": patch
"@ledgerhq/device-core": patch
"@ledgerhq/live-common": patch
---

Device renaming: add Nano S Plus compatibility
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { DeviceModelId } from "@ledgerhq/devices";
import { isEditDeviceNameSupported } from "./isEditDeviceNameSupported";

const supportedDevices = [DeviceModelId.stax, DeviceModelId.nanoX, DeviceModelId.europa];
const unsupportedDevices = [DeviceModelId.nanoS, DeviceModelId.blue, DeviceModelId.nanoSP];
const supportedDevices = [
DeviceModelId.stax,
DeviceModelId.nanoX,
DeviceModelId.europa,
DeviceModelId.nanoSP,
];
const unsupportedDevices = [DeviceModelId.nanoS, DeviceModelId.blue];

describe("isEditDeviceNameSupported", () => {
it("should return true for supported devices", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { DeviceModelId } from "@ledgerhq/devices";

export function isEditDeviceNameSupported(deviceModelId: DeviceModelId) {
return [DeviceModelId.stax, DeviceModelId.nanoX, DeviceModelId.europa].includes(deviceModelId);
return [
DeviceModelId.nanoX,
DeviceModelId.nanoSP,
DeviceModelId.stax,
DeviceModelId.europa,
].includes(deviceModelId);
}

0 comments on commit bfca25b

Please sign in to comment.