Add timeout and retry to transaction confirmation#59
Open
Jim8y wants to merge 4 commits into
Open
Conversation
added 2 commits
June 21, 2026 18:28
SendingPage reported success as soon as the transaction got a blocktime, i.e. on block inclusion. A transaction can be included in a block yet revert (VMState.FAULT), so a failed transaction was shown as 'TransactionSucceeded'. After block inclusion, query getapplicationlog and require executions[0].vmstate == HALT before reporting success; render an explicit failed state otherwise. Reuses VMState already in the repo; no new dependency.
When the transaction never appeared in a block within the ~2.5 min polling window, SendingPage left the spinner running forever with no way out. Add an explicit timed-out state that stops the spinner and offers a Retry button, so the user is never stuck on an indefinite 'confirming' screen.
There was a problem hiding this comment.
Pull request overview
This PR improves the SendingPage transaction confirmation UX by extending confirmation from “block included” to “execution succeeded/failed” and by adding a timeout state with a user-driven retry, preventing the page from getting stuck indefinitely on “Confirming…”.
Changes:
- Add
Succeeded/TimedOutstate and update theSendingPageUI to show Confirming / Succeeded / Failed / Pending (timed out) with a Retry button. - After block inclusion, call
getapplicationlogand requireVMState.HALTto report success; otherwise report failure. - Add new localized strings (
Failed,TransactionFailed,Pending,Retry,TransactionStillPending) in EN / zh-Hans / zh-Hant.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| OneGateApp/Properties/Strings.resx | Adds new EN strings for failed/pending/retry confirmation states. |
| OneGateApp/Properties/Strings.zh-Hans.resx | Adds Simplified Chinese strings for failed/pending/retry confirmation states. |
| OneGateApp/Properties/Strings.zh-Hant.resx | Adds Traditional Chinese strings for failed/pending/retry confirmation states. |
| OneGateApp/Properties/Strings.Designer.cs | Exposes the new string resource accessors. |
| OneGateApp/Pages/SendingPage.xaml | Updates UI bindings to new state properties and adds Failed/Pending UI + Retry button. |
| OneGateApp/Pages/SendingPage.xaml.cs | Implements timeout + retry behavior and execution-result validation via getapplicationlog. |
Files not reviewed (1)
- OneGateApp/Properties/Strings.Designer.cs: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Handled the open #59 review threads. Changes:
Validation:
Screenshots: |
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.
Problem
SendingPagepolls for confirmation every 15s up to 10 times (~2.5 min). If the transaction never appears in a block within that window (or RPC keeps erroring), the loop just ends and the page stays on an indefinite spinner / 'Confirming…' with no timeout, error, or way out.Fix
Add an explicit timed-out state: when the polling window exhausts without a result, stop the spinner and show a 'Still waiting for confirmation' message + a Retry button (re-runs the poll). Adds
TransactionStillPending/Pending/Retrystrings in all three locales.Note
This stacks on #58 (it builds on that PR's confirmation state machine), so this PR's diff currently includes #58. Review/merge after #58; it then rebases down to just the timeout change. No new dependency.
Verified by static review (no MAUI workload locally); please confirm in CI.