feat(tron): display TRX in unstaking lock period#27074
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
0115ea0 to
c27848c
Compare
c9e7d2c to
3a1a94e
Compare
The committed fixture schema is out of date. To update, comment: |
The base branch was changed.
3a1a94e to
1c811e5
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
2185794 to
7c89ded
Compare
Add TronUnstakingBanner component to show TRX that is currently in the 14-day unstaking lock period. Also display staking rewards as a Balance row. Both are derived from the Tron special assets selector and rendered conditionally on the token details view. Made-with: Cursor
7c89ded to
f482b1a
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Key observations:
Since there are no E2E tests that cover Tron functionality, and the changes are behind a feature flag, no E2E test tags need to be selected. Performance Test Selection: |
|



Description
Display TRX that is currently in the 14-day unstaking lock period on the token details view.
Adds:
TronUnstakingBannercomponent showing "Unstaking X TRX in progress. It takes 14 days for unstaking." withInfoseveritycreateTronDerivedAsset.tsutility withcreateInLockPeriodTrxAssetandcreateStakingRewardsTrxAssethelpersBalancerow rendered conditionally when staking rewards data is availableinLockPeriodTrxAssetandstakingRewardsTrxAssetfrom the Tron special assets selector inuseTokenBalanceTextfrom@metamask/design-system-react-native(not deprecated component-library)Changelog
CHANGELOG entry: Added a banner to display TRX in the 14-day unstaking lock period on the token details view
Related issues
Refs: NEB-577
Manual testing steps
Screenshots/Recordings
Before
N/A - new feature
After
Pre-merge author checklist
Pre-merge reviewer checklist
Made with Cursor
Note
Medium Risk
Touches the shared
formatWithThresholdutility anduseTokenBalance, which can affect balance formatting across the app if unexpectedNaN/parsing cases occur. UI changes are otherwise gated to Tron-native TRX and only render when a positive lock-period balance is present.Overview
Displays a new Tron-native TRX unstaking in progress info banner on the token details screen when
trxInLockPeriodfromselectTronSpecialAssetsBySelectedAccountGroupis a positive value.Extends
useTokenBalanceto derive and locale-formatinLockPeriodBalance(and threads it throughTokenDetails/AssetOverviewContent), adds a dedicatedTronUnstakingBannercomponent + tests, and hardensformatWithThresholdto return an empty string forNaN(with a new unit test).Written by Cursor Bugbot for commit f482b1a. This will update automatically on new commits. Configure here.