Report transaction failure when execution reverts#58
Open
Jim8y wants to merge 2 commits into
Open
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.
There was a problem hiding this comment.
Pull request overview
This PR updates the transaction “sending/confirmation” UI so it only reports success after block inclusion and a successful execution result (getapplicationlog with vmstate == HALT), and adds localized strings for the new failure state.
Changes:
- Add a tri-state execution result (
Succeeded: bool?) and deriveIsConfirming/IsSucceeded/IsFailedfor UI binding. - After
blocktimeappears, querygetapplicationlogand show a failure state when execution is notHALT. - Introduce new localization keys (
Failed,TransactionFailed) and expose them viaStrings.Designer.cs.
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/Pages/SendingPage.xaml.cs | Adds execution-state tracking and queries getapplicationlog after block inclusion. |
| OneGateApp/Pages/SendingPage.xaml | Updates UI bindings to show confirming/success/failure states and adds failure visuals. |
| OneGateApp/Properties/Strings.resx | Adds new neutral-language strings for failure state. |
| OneGateApp/Properties/Strings.zh-Hans.resx | Adds Simplified Chinese strings for failure state. |
| OneGateApp/Properties/Strings.zh-Hant.resx | Adds Traditional Chinese strings for failure state. |
| OneGateApp/Properties/Strings.Designer.cs | Exposes new resource keys as strongly-typed properties. |
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.
This was referenced Jun 21, 2026
Contributor
Author
|
Handled the open #58 review threads. Changes:
Validation:
Known limitation:
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
SendingPagereports success as soon as the transaction has ablocktime— i.e. on block inclusion. But a transaction can be included in a block and still revert (VMState.FAULT), so a failed transaction was shown as "Transaction succeeded", with no failure state at all.Fix
After
blocktimeappears, callgetapplicationlogand requireexecutions[0].vmstate == HALTbefore reporting success; otherwise show an explicit failed state (red icon + 'Transaction failed' + red status). If the application log can't be read, fall back to confirmed to avoid a false failure.Reuses
VMStateandgetapplicationlogalready present in the repo — no new dependency. AddsTransactionFailed/Failedstrings in all three locales.Verified by static review (no MAUI workload locally); please confirm in CI.