Add persistent pending-transaction tracking with local notifications#60
Add persistent pending-transaction tracking with local notifications#60Jim8y wants to merge 4 commits into
Conversation
…tions Add a PendingTransactionService (DI singleton) that tracks broadcast transactions to a terminal state (HALT/FAULT) and raises a local notification on confirm/fail. Unlike SendingPage's in-page poll, tracking lives for the app process and is persisted in the existing Settings store, so it survives navigation, backgrounding and relaunch. Wires Plugin.LocalNotification, POST_NOTIFICATIONS, startup permission request + resume, and enqueues on send (SendPage/SendNFTPage). Builds for net10.0-android (0 errors).
There was a problem hiding this comment.
Pull request overview
Adds an app-wide, persisted pending-transaction tracker that continues confirmation polling beyond the Send flow and surfaces final outcomes via OS local notifications.
Changes:
- Introduces
PendingTransactionService(singleton) to persist and resume tracking of broadcast tx hashes and poll RPC until a terminal state. - Integrates
Plugin.LocalNotification(builder + Android permission) and requests notification permission at startup. - Enqueues pending tracking after broadcasting transactions from
SendPageandSendNFTPage, and addsTransactionFailedlocalized string.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| OneGateApp/Services/PendingTransactionService.cs | New persisted polling loop + local-notification dispatch for tx confirm/fail outcomes |
| OneGateApp/Properties/Strings.resx | Adds TransactionFailed base string |
| OneGateApp/Properties/Strings.zh-Hans.resx | Adds Simplified Chinese TransactionFailed |
| OneGateApp/Properties/Strings.zh-Hant.resx | Adds Traditional Chinese TransactionFailed |
| OneGateApp/Properties/Strings.Designer.cs | Adds Strings.TransactionFailed accessor |
| OneGateApp/Platforms/Android/AndroidManifest.xml | Declares POST_NOTIFICATIONS permission |
| OneGateApp/Pages/SendPage.xaml.cs | Enqueues tx hash for background tracking after broadcast |
| OneGateApp/Pages/SendNFTPage.xaml.cs | Enqueues tx hash for background tracking after broadcast |
| OneGateApp/OneGateApp.csproj | Adds Plugin.LocalNotification package reference |
| OneGateApp/MauiProgram.cs | Registers plugin + DI singleton for pending tracking |
| OneGateApp/App.xaml.cs | Starts pending-tracking service on app startup |
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 #60 review threads. Changes:
Validation:
Screenshots:
|
…tifications # Conflicts: # OneGateApp/Platforms/Android/AndroidManifest.xml
|
Merged current master into this branch to clear the dirty merge state. The only manual conflict was AndroidManifest.xml; both POST_NOTIFICATIONS and VIBRATE are now preserved.\n\nValidation after merge:\n- Android emulator: dotnet build/run passed on emulator-5554 using the local Android SDK/JDK paths. OneGate process remained running after launch.\n- iOS simulator: net10.0-ios simulator build passed with code signing disabled for simulator, then launched successfully on iPhone 17 Pro (iOS 26.5).\n- Existing warning remains: NU1903 for SQLitePCLRaw packages.\n\nScreenshots:\n- Android: https://github.com/Jim8y/OneGateApp/releases/download/pr-60-merge-refresh-20260626/android-pr60-after-merge-clean5.png\n- iOS: https://github.com/Jim8y/OneGateApp/releases/download/pr-60-merge-refresh-20260626/ios-pr60-after-merge.png |
What
A
PendingTransactionService(DI singleton) that tracks each broadcast transaction to a terminal state and raises an OS local notification on confirm/fail.Unlike
SendingPage's in-page poll (which is cancelled the moment you leave the page), this:transactions/pending), resumed on startup.getapplicationlog+VMState.HALT(a reverted FAULT tx notifies as failed, not succeeded).How
Services/PendingTransactionService.cs; registered as a singleton inMauiProgram.Plugin.LocalNotification14.1.1 (net10.0-compatible) +builder.UseLocalNotification().POST_NOTIFICATIONSpermission; startup requests notification permission and resumes pending tracking (Appctor).SendPage/SendNFTPage.Verified
Builds clean for net10.0-android (0 errors; the 6 warnings are pre-existing SQLitePCLRaw NU1903 advisories). iOS/maccatalyst not buildable in this environment (no Xcode), but the platform specifics are handled by Plugin.LocalNotification.
Scope / notes
LaunchDAppPagedAPI) are not yet enqueued — easy follow-up.