Add timeout and retry to transaction confirmation#59
Conversation
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.
|
Handled the open #59 review threads. Changes:
Validation:
Screenshots: |
|
Conflicts |
…meout-ui # Conflicts: # OneGateApp/Properties/Strings.de.resx # OneGateApp/Properties/Strings.es.resx # OneGateApp/Properties/Strings.fr.resx # OneGateApp/Properties/Strings.id.resx # OneGateApp/Properties/Strings.it.resx # OneGateApp/Properties/Strings.ja.resx # OneGateApp/Properties/Strings.ko.resx # OneGateApp/Properties/Strings.nl.resx # OneGateApp/Properties/Strings.pt-BR.resx # OneGateApp/Properties/Strings.ru.resx # OneGateApp/Properties/Strings.tr.resx # OneGateApp/Properties/Strings.vi.resx # OneGateApp/Properties/Strings.zh-Hant.resx
|
Resolved the conflict reported by Erik. What changed in this follow-up:
Validation on branch head
Notes: builds still report existing SQLitePCLRaw NU1903 warnings and existing iOS duplicate asset warnings, with no errors. |
|
Conflicts |
…meout-ui # Conflicts: # OneGateApp/Pages/SendingPage.xaml # OneGateApp/Pages/SendingPage.xaml.cs # OneGateApp/Properties/Strings.Designer.cs # OneGateApp/Properties/Strings.de.resx # OneGateApp/Properties/Strings.es.resx # OneGateApp/Properties/Strings.fr.resx # OneGateApp/Properties/Strings.id.resx # OneGateApp/Properties/Strings.it.resx # OneGateApp/Properties/Strings.ja.resx # OneGateApp/Properties/Strings.ko.resx # OneGateApp/Properties/Strings.nl.resx # OneGateApp/Properties/Strings.pt-BR.resx # OneGateApp/Properties/Strings.resx # OneGateApp/Properties/Strings.ru.resx # OneGateApp/Properties/Strings.tr.resx # OneGateApp/Properties/Strings.vi.resx # OneGateApp/Properties/Strings.zh-Hans.resx # OneGateApp/Properties/Strings.zh-Hant.resx
|
Resolved latest master conflicts. Changes pushed:
Validation:
Notes:
|
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.