diff --git a/package.json b/package.json
index a03ce9a..66fc336 100644
--- a/package.json
+++ b/package.json
@@ -9,9 +9,9 @@
"@headlessui/react": "^1.7.2",
"@heroicons/react": "^2.0.11",
"@noble/hashes": "^1.1.3",
- "@onekeyfe/hd-core": "0.3.30",
- "@onekeyfe/hd-shared": "0.3.30",
- "@onekeyfe/hd-web-sdk": "0.3.30",
+ "@onekeyfe/hd-core": "0.3.40",
+ "@onekeyfe/hd-shared": "0.3.40",
+ "@onekeyfe/hd-web-sdk": "0.3.40",
"@onekeyfe/ui-components": "^1.0.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
"@reduxjs/toolkit": "^1.8.5",
diff --git a/src/components/Firmware/Firmware.tsx b/src/components/Firmware/Firmware.tsx
index e368027..c001593 100644
--- a/src/components/Firmware/Firmware.tsx
+++ b/src/components/Firmware/Firmware.tsx
@@ -235,6 +235,9 @@ export default function Firmware() {
case 'classic':
typeFlag = 'OneKey Classic';
break;
+ case 'classic1s':
+ typeFlag = 'OneKey Classic 1S';
+ break;
case 'mini':
typeFlag = 'OneKey Mini';
break;
@@ -327,13 +330,16 @@ export default function Firmware() {
{!isBootLoader && isGreaterThan340 ? : null}
)}
- {['touch'].includes(getDeviceType(device?.features)) && (
+ {['touch', 'pro'].includes(getDeviceType(device?.features)) && (
= {
debug: true,
- connectSrc: 'https://jssdk.onekey.so/0.3.30/',
+ connectSrc: 'https://jssdk.onekey.so/0.3.40/',
preRelease: false,
fetchConfig: true,
};
diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json
index 1f43d8f..8f9d2dc 100644
--- a/src/locales/zh-CN.json
+++ b/src/locales/zh-CN.json
@@ -1,6 +1,6 @@
{
"TR_CLOSE": "关闭",
- "TR_RES_REPAIR": "OneKey Touch 设备,如果出现图片、图标显示不完全等问题,可以点击后方按钮进行资源修复后恢复",
+ "TR_RES_REPAIR": "{0} 设备,如果出现图片、图标显示不完全等问题,可以点击后方按钮进行资源修复后恢复",
"TR_CLICK_TO_REPAIR": "点击修复",
"TR_FIRMWARE_UPDATE_1": "请首先将您的 OneKey Touch 固件升级到 {version} 或以上",
"TR_FIRMWARE_UPDATE_2": "当前版本",
diff --git a/src/types.ts b/src/types.ts
index 29eaafe..15fb1bb 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -30,14 +30,14 @@ export type IBLEFirmwareReleaseInfo = {
};
};
-export type IFirmwareField = 'firmware' | 'ble' | 'firmware-v2' | 'firmware-v4';
+export type IFirmwareField = 'firmware' | 'ble' | 'firmware-v2' | 'firmware-v5';
export type DeviceTypeMap = {
[k in IDeviceType]: {
firmware: IFirmwareReleaseInfo[];
ble: IBLEFirmwareReleaseInfo[];
'firmware-v2'?: IFirmwareReleaseInfo[];
- 'firmware-v4'?: IFirmwareReleaseInfo[];
+ 'firmware-v5'?: IFirmwareReleaseInfo[];
};
};
diff --git a/src/utils/index.ts b/src/utils/index.ts
index ab34baf..53fe88a 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -46,8 +46,12 @@ export const getFirmwareUpdateField = (
return 'ble';
}
- if (deviceType === 'classic' || deviceType === 'mini') {
- return 'firmware-v4';
+ if (
+ deviceType === 'classic' ||
+ deviceType === 'classic1s' ||
+ deviceType === 'mini'
+ ) {
+ return 'firmware-v5';
}
if (deviceType === 'touch') {
@@ -59,29 +63,38 @@ export const getFirmwareUpdateField = (
export const getFirmwareUpdateFieldArray = (
features: Features,
updateType: 'firmware' | 'ble'
-): ('firmware' | 'ble' | 'firmware-v2' | 'firmware-v4')[] => {
+): ('firmware' | 'ble' | 'firmware-v2' | 'firmware-v5')[] => {
const deviceType = getDeviceType(features);
if (updateType === 'ble') {
return ['ble'];
}
- if (deviceType === 'classic' || deviceType === 'mini') {
- return ['firmware-v4'];
+ if (
+ deviceType === 'classic' ||
+ deviceType === 'classic1s' ||
+ deviceType === 'mini'
+ ) {
+ return ['firmware-v5'];
}
if (deviceType === 'touch') {
const currentVersion = getDeviceFirmwareVersion(features).join('.');
if (semver.gt(currentVersion, '4.0.0')) {
- return ['firmware-v4', 'firmware'];
+ return ['firmware-v5', 'firmware'];
}
if (semver.gte(currentVersion, '4.0.0')) {
return ['firmware-v2', 'firmware'];
}
if (!currentVersion || semver.lt(currentVersion, '3.0.0')) {
- return ['firmware-v4', 'firmware-v2', 'firmware'];
+ return ['firmware-v5', 'firmware-v2', 'firmware'];
}
return ['firmware'];
}
+
+ if (deviceType === 'pro') {
+ return ['firmware-v5'];
+ }
+
return ['firmware'];
};
diff --git a/yarn.lock b/yarn.lock
index 72c886d..9923165 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2156,13 +2156,13 @@
resolved "https://registry.yarnpkg.com/@onekeyfe/cross-inpage-provider-types/-/cross-inpage-provider-types-0.0.17.tgz#0c88c1a2febac44ec1600e0e59da732579cbd045"
integrity sha512-QqjIPXQHb3UG9w79ujjL5L5Qd6oCrymQ/x2J2rYICtr56G6shHTmUvRZxAvne0ZsLv8UBGqZWbepVdnPipehYQ==
-"@onekeyfe/hd-core@0.3.30", "@onekeyfe/hd-core@^0.3.30":
- version "0.3.30"
- resolved "https://registry.yarnpkg.com/@onekeyfe/hd-core/-/hd-core-0.3.30.tgz#6451bac8b1a078d5a18e5b83b0697bf24ebb5dab"
- integrity sha512-/XMdqBLEicW+0sL1IL+frly7DorBU5o+N2k9cv7DLZlg7YBj3L99BmZx+g9znXLQwUhXb4k8cydOHvihUxQlqQ==
+"@onekeyfe/hd-core@0.3.40", "@onekeyfe/hd-core@^0.3.40":
+ version "0.3.40"
+ resolved "https://registry.yarnpkg.com/@onekeyfe/hd-core/-/hd-core-0.3.40.tgz#869f0f370228c0f971aed088ae6517bed336251f"
+ integrity sha512-c9ML8S8OMP/eIG7geKFm5O6XiGCsEMKZfKvwJV4TPARtBgkfW0TsTksRlQJpEGxm9hJKhQsQdCQIkXELXYlN7w==
dependencies:
- "@onekeyfe/hd-shared" "^0.3.30"
- "@onekeyfe/hd-transport" "^0.3.30"
+ "@onekeyfe/hd-shared" "^0.3.40"
+ "@onekeyfe/hd-transport" "^0.3.40"
axios "^0.27.2"
bignumber.js "^9.0.2"
bytebuffer "^5.0.1"
@@ -2170,47 +2170,47 @@
parse-uri "^1.0.7"
semver "^7.3.7"
-"@onekeyfe/hd-shared@0.3.30", "@onekeyfe/hd-shared@^0.3.30":
- version "0.3.30"
- resolved "https://registry.yarnpkg.com/@onekeyfe/hd-shared/-/hd-shared-0.3.30.tgz#86658b2f19cd1f5139947a0f162a01afc6b388a1"
- integrity sha512-3Sy8Umkc7ahYI9mIzJgkWcz3bKuwKVCq9t8/1XKY8IbQWqPL2VW14N2hVDX+uPZ/93GFJuDWaxR4u3bJIbWYPw==
+"@onekeyfe/hd-shared@0.3.40", "@onekeyfe/hd-shared@^0.3.40":
+ version "0.3.40"
+ resolved "https://registry.yarnpkg.com/@onekeyfe/hd-shared/-/hd-shared-0.3.40.tgz#cf655e6db8c46183313b79d24d69cfcd60dfbeab"
+ integrity sha512-AzhzTDtEyjYTmWj+ZFCCHLWmF70EyBNOZZh7aYpmkCUXdP7GQn1Wnf1bFkDrN3kU6pXJCR6roxC1PCGeE3n0dQ==
-"@onekeyfe/hd-transport-http@^0.3.30":
- version "0.3.30"
- resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport-http/-/hd-transport-http-0.3.30.tgz#dd688aa547f31e324860d5643cdf2cee6e15eb2a"
- integrity sha512-azUrW/7jVCqLiElFEej2/HHKH+YeMVxYZpdm/KafXh5KPkkS2WdyXEiy2dtTjv6Fs+WxzMVN3DL6IA++LdJ1Ig==
+"@onekeyfe/hd-transport-http@^0.3.40":
+ version "0.3.40"
+ resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport-http/-/hd-transport-http-0.3.40.tgz#0bc7ba04a0e619dd5744ac86f478ab83ba288c03"
+ integrity sha512-+iQowv+Z3fDDskByk0ZiKlDgv+WCz1lRqsGhTpoHzlYpYalGN/iKjaoFOWGD0w5mm8na36np0F8FO7tXC6YnXg==
dependencies:
- "@onekeyfe/hd-shared" "^0.3.30"
- "@onekeyfe/hd-transport" "^0.3.30"
+ "@onekeyfe/hd-shared" "^0.3.40"
+ "@onekeyfe/hd-transport" "^0.3.40"
axios "^0.27.2"
-"@onekeyfe/hd-transport-webusb@^0.3.30":
- version "0.3.30"
- resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport-webusb/-/hd-transport-webusb-0.3.30.tgz#7e63938c2b6186f839625d2813ac8bb11715e1d8"
- integrity sha512-VgG/v94jZ/qSQFA72ZJuFy9jXjcTvVg1OG7u32IU/E9DqcM1dHqju0qq3Bv+GH1Xog9n3ShcnhjEfR0cl3uIzQ==
+"@onekeyfe/hd-transport-webusb@^0.3.40":
+ version "0.3.40"
+ resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport-webusb/-/hd-transport-webusb-0.3.40.tgz#87215bab920f1ff56abe004f74e1fd1d3254f87d"
+ integrity sha512-ma9NTLMxznZlavxeFMd0b02T4/urGOCLFK7EuH187Hyeq1QGK6QlK7FQS20Qwc/4NMH5xyEJl8Xggrofw6FXQg==
dependencies:
- "@onekeyfe/hd-shared" "^0.3.30"
- "@onekeyfe/hd-transport" "^0.3.30"
+ "@onekeyfe/hd-shared" "^0.3.40"
+ "@onekeyfe/hd-transport" "^0.3.40"
-"@onekeyfe/hd-transport@^0.3.30":
- version "0.3.30"
- resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport/-/hd-transport-0.3.30.tgz#47b51416a04cef86cfed3c3301ffd7353ca343f2"
- integrity sha512-thGFuulpvcajGVYXgRsQJaGv0E7i9LMDoTOGy2TeBm7Tdvw6HQkHpVBrxHU8LDxc4BHm1EbmyjanSwk4c+ljOw==
+"@onekeyfe/hd-transport@^0.3.40":
+ version "0.3.40"
+ resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport/-/hd-transport-0.3.40.tgz#380566709289ac4085f6c25f312afa15669e0687"
+ integrity sha512-m0IuPrdd9pwvTxt8809MzlixCW1NHrrVBsYY95Fgn+7xSiKboBrGJV2Lih1oHvHOH4bKJoxgpKDMFOjMDBTyuA==
dependencies:
bytebuffer "^5.0.1"
long "^4.0.0"
protobufjs "^6.11.2"
-"@onekeyfe/hd-web-sdk@0.3.30":
- version "0.3.30"
- resolved "https://registry.yarnpkg.com/@onekeyfe/hd-web-sdk/-/hd-web-sdk-0.3.30.tgz#ddbaf4711a4ecec6deaed81e6fb372febe1bf11b"
- integrity sha512-TuZp54TCFiGsDejj2HxjtEjpE5kHaXCQznI3q4POyYGb0PZnH8MnGSTUCvT2UQwMICSv0GRG/PTsvElDXNx4hA==
+"@onekeyfe/hd-web-sdk@0.3.40":
+ version "0.3.40"
+ resolved "https://registry.yarnpkg.com/@onekeyfe/hd-web-sdk/-/hd-web-sdk-0.3.40.tgz#c79d57c073f16ddfdb9efb84e88515d0ee81e779"
+ integrity sha512-9n51ViweBEfdDGY8C/sVrUvl175pqbhq6+xrc6548NpgZe1Dd/BPP3g3SM3br1fPNbOa03Z1u3PRbLxQ/WvDoQ==
dependencies:
"@onekeyfe/cross-inpage-provider-core" "^0.0.17"
- "@onekeyfe/hd-core" "^0.3.30"
- "@onekeyfe/hd-shared" "^0.3.30"
- "@onekeyfe/hd-transport-http" "^0.3.30"
- "@onekeyfe/hd-transport-webusb" "^0.3.30"
+ "@onekeyfe/hd-core" "^0.3.40"
+ "@onekeyfe/hd-shared" "^0.3.40"
+ "@onekeyfe/hd-transport-http" "^0.3.40"
+ "@onekeyfe/hd-transport-webusb" "^0.3.40"
"@onekeyfe/ui-components@^1.0.0":
version "1.0.0"