Claim accrued GAS rewards from NEO#65
Conversation
Holding NEO accrues claimable GAS, but OneGate had no way to see or claim it. Add getunclaimedgas to RpcClient and surface 'Unclaimed GAS' + a Claim action on the NEO asset detail. Claiming reuses the existing send/sign flow: a NEO self-transfer (which distributes the accrued GAS) is confirmed via SendTransactionPopup and tracked on SendingPage. Builds for net10.0-android (0 errors).
There was a problem hiding this comment.
Pull request overview
Adds support for viewing and claiming accrued GAS rewards for NEO holders by wiring up the getunclaimedgas RPC and exposing a new “Unclaimed GAS” UI row with a Claim flow that reuses the existing transaction signing/broadcasting pipeline.
Changes:
- Add
RpcClient.GetUnclaimedGasAsyncto callgetunclaimedgas. - Add an “Unclaimed GAS” panel and “Claim” button to the NEO asset details page, building a NEO self-transfer and sending it via the existing popup/sign/broadcast flow.
- Add new localized strings for the Claim UX (EN + zh-Hans + zh-Hant) and generated designer entries.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| OneGateApp/Services/RPC/RpcClient.cs | Adds GetUnclaimedGasAsync RPC helper for fetching unclaimed GAS. |
| OneGateApp/Pages/AssetDetailsPage.xaml | Adds “Unclaimed GAS” UI section and Claim button (NEO-only). |
| OneGateApp/Pages/AssetDetailsPage.xaml.cs | Loads unclaimed GAS for NEO and implements the claim transaction flow. |
| OneGateApp/Properties/Strings.resx | Adds EN strings for “Unclaimed GAS” and claim confirmation text. |
| OneGateApp/Properties/Strings.zh-Hans.resx | Adds Simplified Chinese strings for claim UX. |
| OneGateApp/Properties/Strings.zh-Hant.resx | Adds Traditional Chinese strings for claim UX. |
| OneGateApp/Properties/Strings.Designer.cs | Adds strongly-typed accessors for the new string resources. |
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.
| public async Task<BigInteger> GetUnclaimedGasAsync(UInt160 account) | ||
| { | ||
| JsonObject result = await RpcSendAsync<JsonObject>("getunclaimedgas", account.ToAddress(protocolSettings.AddressVersion)); | ||
| return BigInteger.TryParse(result["unclaimed"]?.GetValue<string>(), out BigInteger value) ? value : BigInteger.Zero; | ||
| } |
| } | ||
| catch | ||
| { | ||
| } |
|
Closing this PR as intentionally superseded by the OneGate Vault dApp flow. GAS claim is already covered there, and keeping a separate native GAS-claim screen would duplicate product surface area instead of improving the approved Vault experience. No further code changes are needed on this branch. |
What
Holding NEO accrues claimable GAS, but OneGate had no way to see or claim it — the single most-wanted Neo-native feature (NeoLine/O3 ship it). This adds:
RpcClient.GetUnclaimedGasAsync(thegetunclaimedgasRPC).MakeTransactionAsync, confirmed inSendTransactionPopup, signed, broadcast, and tracked onSendingPage.Notes
RpcClient.csandAssetDetailsPage.xaml(.cs)— neither is touched by any open PR. It uses (does not modify)SendTransactionPopup, so no overlap with Add transaction preview v2 #50.