Fix Sign and Submit lifecycle and dispatch error handling#37
Closed
itsyogesh wants to merge 2 commits intofeat/contract-studiofrom
Closed
Fix Sign and Submit lifecycle and dispatch error handling#37itsyogesh wants to merge 2 commits intofeat/contract-studiofrom
itsyogesh wants to merge 2 commits intofeat/contract-studiofrom
Conversation
- Replace LunoKit's isPending with local isSubmitting state managed in try/finally, ensuring the button always resets even if the wallet interaction hangs or the extension crashes - Add spinner icon to submitting state for clearer feedback - Improve signing toast to prompt user to approve in wallet extension - Distinguish user rejection (cancelled/rejected) from actual errors with appropriate toast messages
- Check receipt.status === "failed" after block inclusion to surface on-chain dispatch errors (e.g., module errors from pallet-revive) instead of showing a false success toast - Add "Signing... approve in your wallet extension" log entry in Studio deploy section for intermediate feedback - Distinguish user wallet rejection from actual transaction errors in Studio deploy log (info vs error)
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
Changes already merged to master via PR #36 (feat/contract-studio). Closing as superseded. |
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
Fixes two issues with the builder's transaction submission flow:
isPendingwith localisSubmittingstate managed viatry/finally, so the button always resets even if the wallet extension hangs or the popup is dismissed without action.receipt.statusis now checked — failed dispatches (e.g. pallet errors frommapAccount) surface the actual error message instead of showing a false "Transaction included in block" toast.Changes
extrinsic-builder.tsx): LocalisSubmittingstate, spinner on button, improved signing toast, user rejection detection, dispatch error check onreceipt.statusdeploy-section.tsx): Same dispatch error check, signing feedback in transaction log, user rejection distinguished from errorsTest plan
mapAccountwhen already mapped) → error toast with dispatch error detailsyarn testpasses