Fix/ledger 3rdparty ux OK-53907 OK-53916 OK-53969 OK-53970 OK-53973 OK-53977 OK-53981 OK-54115 OK-54131 OK-54130 OK-54148 OK-54169 OK-54171 #11512
Conversation
…cy skip, BTC 100+ gate, SDK-driven searching) - portfolio "create address": surface every per-network failure verbatim. Was silently swallowed for HW wallets (only QR throw path handled). - legacy xfp data update banner: skip for third-party HW. Ledger identifies via chain fingerprint + BLE hex id and never has a valid xfp by design, so the prompt can't be satisfied. - BTC App returns 6a82 for account index ≥ 100 unless display=true. SDK now gates via REQUEST_BTC_HIGH_INDEX_CONFIRM ui-request: prompt the user once per adapter session, then auto-promote checkOnDevice for the rest of that session (the device itself still requires per-call physical confirmation). - "searching" UI state is now SDK-driven via EConnectorInteraction.Searching emitted at every _doConnect loop iteration. Removed the monorepo-side primers in ServiceHardwareUI and kit-bg LedgerAdapter so the toast reappears after the device-not-found dialog instead of staying silent for ~7s. - thirdPartyHardwareUiResponse is now a pure passthrough — caller passes the SDK-shaped IAdapterUiResponse, service no longer interprets the action and chooses the response type.
- Move toast cancel from <Toast.Close> wrapper to explicit close-button onPress so only user intent rejects in-flight SDK _uiRegistry.wait; programmatic atom transitions no longer trip cancel. - handleToastUserClose wraps thirdPartyHardwareCancel in try/finally so the UI atom always clears even if the cancel RPC throws. - Subscribe ShowThirdPartyHardwarePermissionDialog and route BLE permission errors (bluetoothTurnedOff vs others) to the matching HardwareDialog component. - Reset the 8s close-button delay on action change so each new toast slice gets its own grace window.
- Switch Ledger onboarding orphan cleanup from setWalletTempStatus soft-hide to removeFailedOnboardingHwWallet hard-delete; eligibility list moves from local LEDGER_ORPHAN_HIDE_CODES to the SDK-exported ORPHAN_ELIGIBLE_ERROR_CODES so the set stays in lockstep with the SDK. - Fix ThirdPartyAppNotInstalled.code which was wrongly AppNotOpen; sync the AppNotInstalled mapping in convertThirdPartyDeviceError and the AppNotInstalled filter in addAccountsForAllNetwork. - Carry permissionDeniedReason through the error pipeline (params hop in deviceErrorUtils -> convertThirdPartyDeviceError -> ThirdPartyDevicePermissionDenied) so reason-aware copy lands in the UI and the BLE permission dialog can branch on it. - Add EThirdPartyDevicePermissionDeniedReason enum and pick the i18n default key by reason (bluetoothTurnedOff vs permissionDenied). - Add ThirdPartyBlePairingTimeout for the SDK BLE SMP 30s window so generic OperationTimeout does not swallow pairing failures. - Add ShowThirdPartyHardwarePermissionDialog appEventBus event and a checkBLEState helper for early state probing.
- @onekeyfe/hwk-adapter-core - @onekeyfe/hwk-ledger-adapter - @onekeyfe/hwk-ledger-connector-ble - @onekeyfe/hwk-ledger-connector-webhid
- Extract device->SearchDevice mapping into thirdPartyDeviceMapping.ts so ServiceHardware.searchDevices can hand off the BLE/USB/bridge branching to a single helper. The helper rejects BLE devices without a stable 4-hex connectId and applies the UUID-like fallback for USB labels in one place. - Surface BLE state vs permission separately in the adapter registry: checkBLEPermissions denied -> permissionDenied, BLE turned off -> bluetoothTurnedOff. Carry the reason in RECEIVE_DEVICE_PERMISSION payload and emit ShowThirdPartyHardwarePermissionDialog so the UI routes to the matching dialog. - Drop the third-party USB<->BLE compatibility branch in getDeviceConnectIdSwitched: third-party connectId already matches the active transport. - Trim verbose comments across LedgerAdapter / atoms / ServiceHardwareUI to keep the SDK-driven contracts terse; behaviour unchanged.
- Allow empty connectId for non-USB third-party transports in both LocalDbBase.createHwWallet and ServiceAccount.createHWWalletBase; Ledger BLE has a stable id, USB/bridge does not, so the guard now only applies to vendors with persistent USB connectId. - ServiceBatchCreateAccount: source third-party batch-abort error codes from the SDK-exported ORPHAN_ELIGIBLE_ERROR_CODES instead of an open-coded UserAborted/DeviceDisconnected/DeviceAppStuck list, so the set tracks the SDK. - vaults/factory: replace synchronous ThirdPartyChainNotSupported throws with a ThirdPartyUnsupportedKeyringStub that defers the error until a keyring method actually runs, letting vault-level lookups (e.g. network selector) survive on unsupported chains. - KeyringHardwareLedger: i18n the BIP-322 NotImplemented error. - ConnectionFlowLedger: drop the duplicate RequireBlePermissionDialog; the ShowThirdPartyHardwarePermissionDialog event from the registry now drives this dialog from a single place in ThirdPartyHardwareUiStateContainer.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
SDK ConnectionType union is 'usb' | 'ble' only — 'bridge' was never a runtime value (bridge transport is a runtime construct created via createBridgedConnector, not a ConnectionType). TS check on x flagged the unreachable case.
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
OneKeyHQ/hardware-js-sdk#781