Skip to content

Claim accrued GAS rewards from NEO#65

Closed
Jim8y wants to merge 1 commit into
neoorder:masterfrom
Jim8y:codex/claim-gas-rewards
Closed

Claim accrued GAS rewards from NEO#65
Jim8y wants to merge 1 commit into
neoorder:masterfrom
Jim8y:codex/claim-gas-rewards

Conversation

@Jim8y

@Jim8y Jim8y commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

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 (the getunclaimedgas RPC).
  • An Unclaimed GAS row + Claim button on the NEO asset detail.
  • Claiming reuses the existing flow: a NEO self-transfer (which distributes the accrued GAS) is built via MakeTransactionAsync, confirmed in SendTransactionPopup, signed, broadcast, and tracked on SendingPage.

Notes

  • Conflict-checked: touches RpcClient.cs and AssetDetailsPage.xaml(.cs)neither is touched by any open PR. It uses (does not modify) SendTransactionPopup, so no overlap with Add transaction preview v2 #50.
  • Builds clean for net10.0-android (0 errors).

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).
Copilot AI review requested due to automatic review settings June 21, 2026 12:36

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

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.GetUnclaimedGasAsync to call getunclaimedgas.
  • 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.

Comment on lines +132 to +136
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;
}
Comment on lines +71 to +74
}
catch
{
}
@Jim8y

Jim8y commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

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.

@Jim8y Jim8y closed this Jun 21, 2026
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