@onekeyfe/hd-core 1.0.36 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -29122,10 +29122,10 @@ class FirmwareUpdateBaseMethod extends BaseMethod {
|
|
|
29122
29122
|
let progress;
|
|
29123
29123
|
if (totalSize !== undefined && processedSize !== undefined) {
|
|
29124
29124
|
currentFileProcessed = processedSize + chunkEnd;
|
|
29125
|
-
progress = Math.min(Math.
|
|
29125
|
+
progress = Math.min(Math.ceil((currentFileProcessed / totalSize) * 100), 99);
|
|
29126
29126
|
}
|
|
29127
29127
|
else {
|
|
29128
|
-
progress = Math.min(Math.
|
|
29128
|
+
progress = Math.min(Math.ceil(((i + 1) / totalChunks) * 100), 99);
|
|
29129
29129
|
}
|
|
29130
29130
|
const writeRes = yield this.emmcFileWriteWithRetry(filePath, chunkLength, offset, chunk, overwrite, progress);
|
|
29131
29131
|
offset += writeRes.message.processed_byte;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@onekeyfe/hd-shared": "^1.0.
|
|
29
|
-
"@onekeyfe/hd-transport": "^1.0.
|
|
28
|
+
"@onekeyfe/hd-shared": "^1.0.37",
|
|
29
|
+
"@onekeyfe/hd-transport": "^1.0.37",
|
|
30
30
|
"axios": "^0.27.2",
|
|
31
31
|
"bignumber.js": "^9.0.2",
|
|
32
32
|
"bytebuffer": "^5.0.1",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"@types/web-bluetooth": "^0.0.21",
|
|
47
47
|
"ripple-keypairs": "^1.1.4"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "da0c9ea1fafecff38f87b243cb072c175ad5c5f2"
|
|
50
50
|
}
|
|
@@ -306,9 +306,9 @@ export class FirmwareUpdateBaseMethod<Params> extends BaseMethod<Params> {
|
|
|
306
306
|
let progress: number;
|
|
307
307
|
if (totalSize !== undefined && processedSize !== undefined) {
|
|
308
308
|
currentFileProcessed = processedSize + chunkEnd;
|
|
309
|
-
progress = Math.min(Math.
|
|
309
|
+
progress = Math.min(Math.ceil((currentFileProcessed / totalSize) * 100), 99);
|
|
310
310
|
} else {
|
|
311
|
-
progress = Math.min(Math.
|
|
311
|
+
progress = Math.min(Math.ceil(((i + 1) / totalChunks) * 100), 99);
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
const writeRes = await this.emmcFileWriteWithRetry(
|