Skip to content

Add timeout and retry to transaction confirmation#59

Open
Jim8y wants to merge 4 commits into
neoorder:masterfrom
Jim8y:codex/improve-tx-timeout-ui
Open

Add timeout and retry to transaction confirmation#59
Jim8y wants to merge 4 commits into
neoorder:masterfrom
Jim8y:codex/improve-tx-timeout-ui

Conversation

@Jim8y

@Jim8y Jim8y commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Problem

SendingPage polls 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/Retry strings 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.

Jimmy 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.
Copilot AI review requested due to automatic review settings June 21, 2026 10:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / TimedOut state and update the SendingPage UI to show Confirming / Succeeded / Failed / Pending (timed out) with a Retry button.
  • After block inclusion, call getapplicationlog and require VMState.HALT to 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.

Comment thread OneGateApp/Pages/SendingPage.xaml.cs
Comment thread OneGateApp/Pages/SendingPage.xaml.cs
@Jim8y

Jim8y commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Handled the open #59 review threads.

Changes:

  • Added a polling re-entrancy guard so Retry cannot start overlapping QueryTransactionStatus() loops.
  • Missing or unparsable execution status now falls back to confirmed/unknown instead of a false failed state. FAULT still reports failure when vmstate is present.
  • Added the PR transaction-status resource keys across all locale files; resource parity is now 15 files / 288 keys.
  • Merged current origin/master into the branch with no conflicts.

Validation:

  • git diff --check
  • Conflict scan with rg -n "<<<<<<<|=======|>>>>>>>" OneGateApp
  • Resource parity checked: 15 resource files, 288 keys
  • iOS simulator build/install/launch verified, then Wallet -> Send UI verified
  • Android emulator build/install/launch verified, then Wallet -> Send UI verified
  • Android crash buffer remained empty after launch and navigation

Screenshots:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants