Use reclaim wording for Tron resource staking claims#6096
Closed
j0ntz wants to merge 2 commits into
Closed
Conversation
Freezing TRX buys bandwidth and energy rather than yield, and the claim action only returns the user's own unfrozen TRX to their spendable balance. Let a stake policy replace the default reward wording so the Tron policies read as reclaiming instead of earning.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Author
6 tasks
Contributor
Author
|
Superseded by #6105, which consolidates this and 11 other small GUI task branches into one PR/branch per the umbrella task's instructions. |
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.




Description
Edge's staking UI reused yield-staking wording for the Tron resource-freeze policies: "Claim Rewards", "Amount of Reward to Claim", "TRX Earned". Tron pays no APY and holds no third-party reward. Freezing TRX buys bandwidth and energy, and the action Edge calls "claim" is
WithdrawExpireUnfreeze, which returns the user's own previously frozen TRX to their spendable balance after the network's post-unfreeze delay. The old copy read as if the user had earned that TRX.A
StakePolicycan now supplyclaimLanguageto replace the default claim wording, and the Tron resource policies set it. Forcurrency:tron:BANDWIDTH_V2andcurrency:tron:ENERGY_V2:Every other staking policy keeps the existing reward wording. This is display-only: the transaction built, the claim amount, and the claim availability rules are unchanged.
Wording follows the direction on the task: Michael McMurray proposed "Unstake" or "Reclaim Resources" and Alberto Mercado confirmed that satisfies the communication need. "Unstake" is already the unfreeze action on the same scene, so the claim action takes the "Reclaim" wording, naming TRX rather than resources because TRX is what the user gets back.
Asana: https://app.asana.com/0/1215088146871429/1211050361847785
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Tested on the iOS simulator against
edge-funds/ My Tron 2, which held a real41.289 TRX unfrozen balance past Tron's post-unfreeze delay. Drove
Earn → TRON Resources v2 → Reclaim TRX and executed the real
WithdrawExpireUnfreeze: the claim scene showed "Amount of TRX to Reclaim", thetransaction broadcast, the "Reclaim transaction sent successfully" flash
appeared, and the pending-reclaim row cleared with the button returning to
disabled. Screenshots attached below.
Note
Low Risk
UI copy and optional policy metadata only; no changes to claim transaction building or staking logic beyond string selection.
Overview
Tron resource-freeze policies no longer use yield-staking copy (“Claim Rewards”, earned rewards, etc.) for the claim flow.
StakePolicycan now supply optionalclaimLanguage(actionLabel,amountLabel,positionLabel,successMessage), and Stake Overview / Stake Modify read those strings when present instead of the default claim/reward labels.The Tron resource plugin sets
claimLanguageto reclaim TRX wording (e.g. “Reclaim TRX”, “TRX Pending Reclaim”, reclaim success toast). Newstake_reclaim_*strings were added; other stake policies keep existing reward wording. Display-only—claim transactions and eligibility are unchanged.Reviewed by Cursor Bugbot for commit 932e69b. Bugbot is set up for automated code reviews on this repo. Configure here.