Skip to content

Commit 7be335e

Browse files
Fix unzip call and blob
1 parent c26af86 commit 7be335e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kernel/src/services/FirmwareService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { FirmwareOption } from '../constants'
22
import { defaultFirmwareOptions } from '../constants'
33
import { DeviceService } from './DeviceService';
44
// const { Octokit } = require('@octokit/rest');
5-
import { unzipit } from 'unzipit';
5+
import { unzip } from 'unzipit';
66

77
export class FirmwareService {
88
private firmwareString: string | null = null;
9-
private firmwareBlob: Blob | null = null;
9+
// private firmwareBlob: Blob | null = null;
1010
private selectedFirmwareId: string = 'Auto';
1111
// Should make firmwareOptions a private variable and use getters to access it.
1212
// This way we can add logic to the getters if we need to in the future. Default to empty record.
@@ -39,7 +39,7 @@ export class FirmwareService {
3939
chunks.push(value);
4040
}
4141
const allChunks = new Uint8Array(chunks.flatMap(chunk => [...chunk]));
42-
const { entries } = await unzipit.unzip(allChunks);
42+
const { entries } = await unzip(allChunks);
4343

4444
const unzippedData: { [filename: string]: Uint8Array } = {};
4545
for (const entry of Object.values(entries) as { name: string; arrayBuffer: () => Promise<Uint8Array> }[]) {
@@ -135,7 +135,7 @@ export class FirmwareService {
135135
if (id in this.firmwareOptions) {
136136
this.selectedFirmwareId = id;
137137
this.firmwareString = null;
138-
this.firmwareBlob = null;
138+
// this.firmwareBlob = null;
139139
localStorage.removeItem('cachedFirmware');
140140
localStorage.setItem('selectedFirmwareId', id);
141141
}

0 commit comments

Comments
 (0)