feat: route every internal signing flow through XState pipeline [PERA-3966]#397
Draft
feat: route every internal signing flow through XState pipeline [PERA-3966]#397
Conversation
… opt-in cancel coverage [PERA-3966]
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
Funnels every internally-initiated transaction (asset opt-in, asset opt-out, payments, asset transfers, ARC-59 send / claim / reject) through the existing XState signing pipeline. Before this branch the opt-in / opt-out / send-flow hooks called
useTransactionSigner+algokit.send.*directly — for Ledger accounts that path silently invoked the BLE signer with no UI overlay (the bug). After, every flow uses a new shared helperuseSignAndSubmitGroupthat pushes pre-built unsigned transactions through the pipeline as aheadless: true,transport: 'callback'request.headless: trueskips the review sheet and post-completion notification — same brief spinner UX as today.LedgerSigningOverlayautomatically. The pipeline's hardware actor binds phase callbacks unconditionally, so opt-in / opt-out / every send mode now shows connecting → awaiting-approval → progress → typed errors (LedgerConnectionError,LedgerTimeoutError,LedgerUserRejectedError,LedgerAddressMismatchError,LedgerAppNotOpenError,LedgerDisconnectedError).Architecture highlights:
useSignAndSubmitGroupinpackages/signing— single entry point. Resolves{ txIds }afterapprove+submitSignedTransactionGroup; rejects with typedUserRejectedSigningErroron cancel.useArc59SendTransaction,useArc59ClaimTransaction) refactored to return unsigned-tx builders (no signer arg). Send-flow consumes those and submits via the helper.useTransactionSigner— once nothing outside the pipeline reaches it. The XStatehardwareSignerActorcallssignTransactionsOnHardwareWalletdirectly and is unaffected.AddAssetScreen,AccountAssetList,RemoveAssetsScreen,CollectibleDetailScreen,TransactionProcessingScreen,ClaimProcessingScreen) checkinstanceof UserRejectedSigningErrorand suppress the generic error toast on cancel — silent dismiss / silentgoBack().executeSend's switch now has adefault: { params.sendMode satisfies never; throw }exhaustiveness guard.Related Issues
Checklist