fix: improve Sign action flow and error reporting - #2609
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2609 +/- ##
=======================================
Coverage 99.95% 99.95%
=======================================
Files 184 184
Lines 7446 7446
Branches 1489 1479 -10
=======================================
Hits 7443 7443
Misses 3 3 🚀 New features to boost your workflow:
|
ericleponner
force-pushed
the
2552_improve_signing_flow
branch
from
April 7, 2026 18:18
66352d7 to
707d68c
Compare
ericleponner
force-pushed
the
2552_improve_signing_flow
branch
from
April 8, 2026 14:29
f72f924 to
be5905d
Compare
ericleponner
marked this pull request as ready for review
April 8, 2026 14:37
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the single-transaction signing flow to align with the existing “Sign All” pattern by producing more structured user-facing reports and by splitting signing into required-key collection, missing-key detection, and item signing.
Changes:
- Update
SignTransactionControllerto usecollectRequiredKeys(),collectMissingKeys(), andsignItems()and returnActionReport-based feedback. - Simplify
SignSingleButton’s emitted payload (remove unusedsignedflag) and adjust transaction detail fetching behavior. - Remove/rework
signTransactions()usage and replace its unit tests with coverage for the newer helper functions.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| front-end/src/renderer/pages/TransactionDetails/SignTransactionController.vue | Refactors signing flow to use ActionReport + helper functions and changes callback signature. |
| front-end/src/renderer/pages/Transactions/components/SignSingleButton.vue | Updates transactionSigned event payload and removes unused signed propagation. |
| front-end/src/renderer/pages/TransactionDetails/TransactionDetails.vue | Stops navigating back on fetch errors (now rethrows). |
| front-end/src/renderer/utils/index.ts | Adds early return for empty sign set, and removes/obsoletes signTransactions() (currently left as commented code). |
| front-end/src/tests/renderer/utils/index.spec.ts | Replaces signTransactions() tests with tests for collectRequiredKeys(), collectMissingKeys(), and signItems(). |
Comments suppressed due to low confidence (2)
front-end/src/renderer/utils/index.ts:288
- index.ts still contains the full old signTransactions() implementation commented out. Keeping large blocks of commented code makes maintenance harder and risks divergence from the real implementation. Since this function is now obsolete, it should be removed entirely (use git history for retrieval if needed).
export const splitMultipleAccounts = (input: string, client: Client): string[] => {
input = input.trim();
const result: string[] = [];
if (!input) {
return result;
}
front-end/src/tests/renderer/utils/index.spec.ts:16
- These tests still set up and mock vue-toast-notification (toastErrorSpy/useToast), but the updated test suite no longer asserts on toast behavior and doesn't use the toast mock. Removing unused mocks/fixtures will reduce noise and make failures easier to diagnose.
export const toastErrorSpy = vi.fn();
const toastMock = { error: toastErrorSpy };
vi.mock('vue-toast-notification', () => ({
useToast: () => toastMock,
}));
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ericleponner
force-pushed
the
2552_improve_signing_flow
branch
from
April 8, 2026 16:49
571dd9a to
ca6c4ac
Compare
…tModal. Signed-off-by: Eric Le Ponner <eric.leponner@icloud.com>
… empty input. Signed-off-by: Eric Le Ponner <eric.leponner@icloud.com>
…signItems(). Removed signTransactions() and matching unit tests. Signed-off-by: Eric Le Ponner <eric.leponner@icloud.com>
Signed-off-by: Eric Le Ponner <eric.leponner@icloud.com>
Signed-off-by: Eric Le Ponner <eric.leponner@icloud.com>
ericleponner
force-pushed
the
2552_improve_signing_flow
branch
from
April 8, 2026 17:22
ca6c4ac to
2b33bbb
Compare
Kolpic
pushed a commit
that referenced
this pull request
Apr 15, 2026
* Improved Sign action user feedback using ActionReport and ActionReportModal. Signed-off-by: Eric Le Ponner <eric.leponner@icloud.com> * SignTransactionController now handles (buggy) case where it is passed empty input. Signed-off-by: Eric Le Ponner <eric.leponner@icloud.com> * Added unit tests for collectRequiredKeys(), collectMissingKeys() and signItems(). Removed signTransactions() and matching unit tests. Signed-off-by: Eric Le Ponner <eric.leponner@icloud.com> * Removed commented signTransactions() Signed-off-by: Eric Le Ponner <eric.leponner@icloud.com> * Removed unneeded check from SignTransactionController. Signed-off-by: Eric Le Ponner <eric.leponner@icloud.com> --------- Signed-off-by: Eric Le Ponner <eric.leponner@icloud.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.
Description:
Changes below update
SignTransactionControllerto improve error reporting.They apply the same pattern as in
SignAllController:collectRequiredKeys(),collectMissingKeys()andsignItems()and building anActionReportsignTransactions()function which is now obsoleteRelated issue(s):
Contributes to #2552
Notes for reviewer:
Checklist