-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix transaction sign with Ledger #62
Conversation
WalkthroughRecent updates to the Electrum Dash wallet introduce a new "Coins" tab to the GUI for better visibility of UTXOs and enhance the Ledger plugin by incorporating handling for Changes
Sequence DiagramsequenceDiagram
participant User
participant MainWindow
participant LedgerPlugin
participant Dongle
User ->>+ MainWindow: Launch Wallet
MainWindow ->>+ User: Display GUI with "Coins" Tab
User ->>+ LedgerPlugin: Initiate Transaction
LedgerPlugin ->> Dongle: Send Transaction Data (including extra_data)
Dongle -->> LedgerPlugin: Confirm Data Receipt
LedgerPlugin -->> User: Transaction Processed
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Outside diff range, codebase verification and nitpick comments (2)
electrum_dash/plugins/ledger/ledger.py (2)
154-156
: Remove redundant offset adjustment.The offset adjustment is redundant since it will be set to the length of
transaction.extra_data
in the next step.if offset > len(transaction.extra_data): offset = len(transaction.extra_data)
157-158
: Avoid redundant check fortransaction.extra_data
.The check for
transaction.extra_data
is redundant since it is already checked before.if transaction.extra_data: apdu.extend(transaction.extra_data[0: offset])
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- electrum_dash/gui/qt/main_window.py (1 hunks)
- electrum_dash/plugins/ledger/ledger.py (1 hunks)
Files skipped from review due to trivial changes (1)
- electrum_dash/gui/qt/main_window.py
Summary by CodeRabbit
New Features
Enhancements
transaction.extra_data
, enhancing compatibility and data integrity during transactions.