Skip to content

Commit

Permalink
fix: battery_level decode
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteZhang1024 committed Jul 31, 2024
1 parent 7d24def commit 51dd86f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 38 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"@headlessui/react": "^1.7.2",
"@heroicons/react": "^2.0.11",
"@noble/hashes": "^1.1.3",
"@onekeyfe/hd-core": "0.3.41",
"@onekeyfe/hd-shared": "0.3.41",
"@onekeyfe/hd-web-sdk": "0.3.41",
"@onekeyfe/hd-core": "1.0.7",
"@onekeyfe/hd-shared": "1.0.7",
"@onekeyfe/hd-web-sdk": "1.0.7",
"@onekeyfe/ui-components": "^1.0.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
"@reduxjs/toolkit": "^1.8.5",
Expand Down
5 changes: 5 additions & 0 deletions src/components/Firmware/Firmware.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,12 @@ export default function Firmware() {
case 'pro':
typeFlag = 'OneKey Pro';
break;
case 'unknown':
typeFlag = 'Unknown';
break;
default:
// eslint-disable-next-line no-case-declarations, no-unused-vars, @typescript-eslint/no-unused-vars
const checkType: never = originType;
break;
}
setDeviceType(typeFlag);
Expand Down
1 change: 1 addition & 0 deletions src/hardware/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ class ServiceHardware {
mini: data.mini,
touch: data.touch,
pro: data.pro,
unknown: data.unknown,
};
store.dispatch(setReleaseMap(deviceMap));

Expand Down
2 changes: 1 addition & 1 deletion src/hardware/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const getHardwareSDKInstance = memoizee(
}
const settings: Partial<ConnectSettings> = {
debug: true,
connectSrc: 'https://jssdk.onekey.so/0.3.41/',
connectSrc: 'https://jssdk.onekey.so/1.0.7/',
preRelease: false,
fetchConfig: true,
};
Expand Down
68 changes: 34 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2156,61 +2156,61 @@
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.41", "@onekeyfe/hd-core@^0.3.41":
version "0.3.41"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-core/-/hd-core-0.3.41.tgz#71dbd4db8ae3616e09ec78cf0b023ca49cb3d21d"
integrity sha512-g6txoAazxP84zBUHr8ig7LTrJ4gU2ZTLvn+Cms4ZVH97iH4lY06kfY8eJWZ09hrH+7ke4uXS5vLmi4UeLrtn/A==
"@onekeyfe/hd-core@1.0.7", "@onekeyfe/hd-core@^1.0.7":
version "1.0.7"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-core/-/hd-core-1.0.7.tgz#a3b290d6caea3e8b8b1aa6039ff383fb74263115"
integrity sha512-NZHUk98sbKmsZjFRPRnbKf3B0nZe4OQxDh0jaO8yQGQqqC53Y0+P2ZoJtqKQ4nRDuGKOeo2p2sDP0DwaTK1gdQ==
dependencies:
"@onekeyfe/hd-shared" "^0.3.41"
"@onekeyfe/hd-transport" "^0.3.41"
"@onekeyfe/hd-shared" "^1.0.7"
"@onekeyfe/hd-transport" "^1.0.7"
axios "^0.27.2"
bignumber.js "^9.0.2"
bytebuffer "^5.0.1"
jszip "^3.10.1"
parse-uri "^1.0.7"
semver "^7.3.7"

"@onekeyfe/hd-shared@0.3.41", "@onekeyfe/hd-shared@^0.3.41":
version "0.3.41"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-shared/-/hd-shared-0.3.41.tgz#17524e7657c9aebad93c103b963aa3fd1619da66"
integrity sha512-PwlVCqCYArbzijhKUpik9lxfeSgQBZZoB4HD5JuihOQ3KSkSFvNMbswqD+Xv629lUSBHIfHiAyHmX7vLwQa2Aw==
"@onekeyfe/hd-shared@1.0.7", "@onekeyfe/hd-shared@^1.0.7":
version "1.0.7"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-shared/-/hd-shared-1.0.7.tgz#2c8b2dcbdffe6d69180bc38ed61726d5c47c082b"
integrity sha512-yIpvGoMH4NNxjSOMeOx+ktA1OxMJVfkYku07Etd0D2wekZPcoCCGEvloc59kmMbV0u0/fzrauZUNZgp+6KTgPA==

"@onekeyfe/hd-transport-http@^0.3.41":
version "0.3.41"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport-http/-/hd-transport-http-0.3.41.tgz#12ba68a4ee8725d91dc57f3ad99cc62e6cd2de59"
integrity sha512-+0Q0OGZ+nrN4z0wq11OJhr9JMZ5UsgNUM0p4+BL0lSr0jpcO6ukiRA9b/4Se9K711TZyLjXc6AwUsg7u4RE6RQ==
"@onekeyfe/hd-transport-http@^1.0.7":
version "1.0.7"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport-http/-/hd-transport-http-1.0.7.tgz#132f14a806009f918604daf0d5ba676243682d72"
integrity sha512-AJYfMyub4Ejwc2S+AfPAr4NuLdAcPBa2H+15McpIwKk19R8EMaF1HjHaPLxtvpGPAMm4y7oLKqW9Obyl+zqTog==
dependencies:
"@onekeyfe/hd-shared" "^0.3.41"
"@onekeyfe/hd-transport" "^0.3.41"
"@onekeyfe/hd-shared" "^1.0.7"
"@onekeyfe/hd-transport" "^1.0.7"
axios "^0.27.2"

"@onekeyfe/hd-transport-webusb@^0.3.41":
version "0.3.41"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport-webusb/-/hd-transport-webusb-0.3.41.tgz#98a6a36a4f804200f2e7b5c59d3ff8b895d3ce21"
integrity sha512-OJRR9eYzowABC1zNa/edEIYp8B299mRxNLKutyYecQhbDarBTX3LqQERppdnRy4Ptmrgm/Lz/mqKXdegoeUkXg==
"@onekeyfe/hd-transport-webusb@^1.0.7":
version "1.0.7"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport-webusb/-/hd-transport-webusb-1.0.7.tgz#15b6554f6bd6bba2223c54965f7059ce1a3c2977"
integrity sha512-j/fh7nD7kGOuyvR/GdI8qSFwbivQkXFy7i/3+Onkhzo6xYwyIeq7pfTVXNgKaFPH+BdhEkMf44Qg07jZHFLt/Q==
dependencies:
"@onekeyfe/hd-shared" "^0.3.41"
"@onekeyfe/hd-transport" "^0.3.41"
"@onekeyfe/hd-shared" "^1.0.7"
"@onekeyfe/hd-transport" "^1.0.7"

"@onekeyfe/hd-transport@^0.3.41":
version "0.3.41"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport/-/hd-transport-0.3.41.tgz#fb869085dfc1d7926533181762d04ccac40bfd87"
integrity sha512-vXctzTv4mLEuALjgo98ROpQL/Y1hjAheixe9IDVAPOGsxtfA5ioCGjt2jjdOLRw30a92bcHRWmuYDV0tG5irkg==
"@onekeyfe/hd-transport@^1.0.7":
version "1.0.7"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-transport/-/hd-transport-1.0.7.tgz#216ab6e86567695b1f3e5b9b935886ddb6257420"
integrity sha512-FlfZNCH2C4mOy61Whn9l3AueDSDSa+5bTTFLH267/XanOt11CAbPS1zB8awO/mwDENA2/Ci+ObfybTRXzoBc7w==
dependencies:
bytebuffer "^5.0.1"
long "^4.0.0"
protobufjs "^6.11.2"

"@onekeyfe/hd-web-sdk@0.3.41":
version "0.3.41"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-web-sdk/-/hd-web-sdk-0.3.41.tgz#f9ad7404fa9d5b2f5a957f0a83408b41cd6c139a"
integrity sha512-6AMu1c3seSX+LF5HecKbXSlDZp8ATrQQtEToiqS+ViMIwftyZDKYVR9wdWYlC5Ubm/TF3MCcn+7BIHHywXfQkw==
"@onekeyfe/hd-web-sdk@1.0.7":
version "1.0.7"
resolved "https://registry.yarnpkg.com/@onekeyfe/hd-web-sdk/-/hd-web-sdk-1.0.7.tgz#e6a6f254375250181144b466e1957bb03087670f"
integrity sha512-odEH3dAAwH+iJF3b9B7AF484yyzQ1vhmjnzu5vEsF4T/cDEXPFZz+6KcDsOC1aVBkXwLToKhEf8WBa34H8ORmw==
dependencies:
"@onekeyfe/cross-inpage-provider-core" "^0.0.17"
"@onekeyfe/hd-core" "^0.3.41"
"@onekeyfe/hd-shared" "^0.3.41"
"@onekeyfe/hd-transport-http" "^0.3.41"
"@onekeyfe/hd-transport-webusb" "^0.3.41"
"@onekeyfe/hd-core" "^1.0.7"
"@onekeyfe/hd-shared" "^1.0.7"
"@onekeyfe/hd-transport-http" "^1.0.7"
"@onekeyfe/hd-transport-webusb" "^1.0.7"

"@onekeyfe/ui-components@^1.0.0":
version "1.0.0"
Expand Down

0 comments on commit 51dd86f

Please sign in to comment.