Release v4.9.6#931
Open
gummy789j wants to merge 6 commits into
Open
Conversation
3 tasks
* fix: ledger app-not-open detection and quiet-flag leak
- Split LedgerAddressUtil.getTronAddress into getRawAddressResponse +
parseTronAddress so callers can inspect APDU status words before parsing
- Add LedgerPorts.AppNotOpenException for APDU 0x6511 (Tron app not open),
distinct from a null return (device not found / address mismatch)
- NonInteractiveLedgerSigner catches AppNotOpenException and returns
APP_NOT_OPEN outcome instead of NOT_CONNECTED
- ProductionLedgerPorts uses try-finally to unconditionally reset
standardCliQuiet after executeSignListen returns, fixing permanent stdout
suppression when device times out without a HID callback
- AliasResolutionException overrides fillInStackTrace as a no-op to avoid
unnecessary stack capture on control-flow exceptions
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: correctly detect app-not-open when Ledger HID open() fails
On some OS/firmware combinations, HidDevice.open() returns false when
the Tron app is not running, causing getLedgerHidDevice() to return null
and the signer to report NOT_CONNECTED instead of APP_NOT_OPEN.
- Add HidServicesWrapper.hasAnyLedgerAttached() to distinguish "no device"
from "device present but not openable"
- Throw AppNotOpenException in ProductionLedgerPorts when getHidDevice()
returns null but a Ledger is physically attached
- Also check the return value of the second device.open() call (B2 path)
which was previously ignored, causing the same misclassification
- Add test: returnsAppNotOpenWhenFinderThrowsAppNotOpenException
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: zero password buffers in StdinPasswordReader and rename misleading APDU constant
- StdinPasswordReader.readAll wraps the read/parse in try-finally and
Arrays.fill the chunk and bytes buffers before returning, matching the
defensive pattern already used in StandardCliRunner.authenticate. The
returned String still holds the password in its own char[], but the
intermediate byte arrays no longer linger on the heap until GC.
- Rename APDU_APP_IS_OPEN to APDU_APP_NOT_OPEN. The Javadoc and the error
message ("Open the Tron app on your Ledger device") already treat 0x6511
as the "not open" signal; the identifier now matches.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Will <>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR builds on standard CLI stdin credential input and adds:
v4.9.6Changes
Ledger support for standard CLI
MASTER_PASSWORD/--password-stdin.ledger_*errors:ledger_not_connectedledger_app_not_openledger_sign_by_hash_disabledledger_unsupported_contractledger_already_signingledger_user_rejectedledger_timeoutledger_sign_failedsigningstate does not block later standard CLI commands.Address book alias support
Wallet/aliases/<network>.json.alias-addalias-removealias-listalias-resolvemeta.resolved.Hardening fixes
0..18.timeoutstate.Docs and QA
Testing
Targeted tests passed: