Skip to content

Commit 0a17960

Browse files
committed
feat(connect): all backupDevice and recoveryDevice even for devices withh required firmware update
1 parent 93e4710 commit 0a17960

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/connect/src/core/AbstractMethod.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ function validateStaticSessionId(input: unknown): StaticSessionId {
6464
'DeviceState: invalid staticSessionId: ' + input,
6565
);
6666
}
67+
6768
// validate expected state from method parameter.
6869
// it could be undefined
6970
function validateDeviceState(input: unknown): DeviceState | undefined {
@@ -306,8 +307,10 @@ export abstract class AbstractMethod<Name extends CallMethodPayload['method'], P
306307
if (!version) return;
307308

308309
if (
309-
device.firmwareStatus === 'required' ||
310-
!versionUtils.isNewerOrEqual(version, range.min)
310+
this.name !== 'backupDevice' &&
311+
this.name !== 'recoveryDevice' &&
312+
(device.firmwareStatus === 'required' ||
313+
!versionUtils.isNewerOrEqual(version, range.min))
311314
) {
312315
return UI.FIRMWARE_OLD;
313316
}

0 commit comments

Comments
 (0)