chore(runway): cherry-pick 5058ba5#21179
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. |
|
Currently investigating an issue with this cherry-pick Edit: fixed. PR is ready to be merged |
8c5633f to
9ce88da
Compare
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
- Align perps activity items with perps activity UI, showing order
amount instead of PnL and increasing displayed decimals
- Update referral code text in onboarding flow
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry:
Fixes:
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
<!-- [screenshots/recordings] -->
<!-- [screenshots/recordings] -->
Very small screen (iPhone SE 3rd gen):
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Perps activity details now display formatted asset amounts (up to 5
decimals) instead of PnL, with updated tests and referral onboarding
strings across locales.
>
> - **Rewards**:
> - **Perps event details**: `getPerpsEventDetails` now shows formatted
asset amounts (max 5 decimals) for `OPEN_POSITION`, `CLOSE_POSITION`,
`TAKE_PROFIT`, `STOP_LOSS` instead of PnL; includes direction for open.
> - **Number formatting**: `formatNumber` accepts optional `decimals`
and uses it for `maximumFractionDigits`.
> - **Tests**: Update `eventDetailsUtils.test.ts` expectations and test
names to reflect amount-based details and 5-decimal rounding (including
zero/low-amount cases).
> - **Localization**: Tweak referral onboarding copy; adjust/remove
`step4_title_referral_bonus` and `step4_referral_bonus_description` in
non-English locales; refine English strings.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
429f629. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Christian Montoya <christian.montoya@consensys.net>
9ce88da to
65a5264
Compare
| "step3_description": "Each season brings new perks. Join in, compete, and claim what you can before time runs out.", | ||
| "step4_title": "You'll earn 250 points when you sign up!", | ||
| "step4_title_referral_bonus": "You'll earn 500 points when you sign up with a code!", | ||
| "step4_title_referral_validating": "Validating referral code...", |
There was a problem hiding this comment.
Bug: Translation Key Inconsistency Causes Missing Text
The referral bonus translation keys (step4_title_referral_bonus, step4_referral_bonus_description) are removed from non-English locale files, but updated in the English locale. This inconsistency means non-English users will see missing text or encounter errors when the app tries to display these messages.
Additional Locations (5)
|
|
No release label on PR. Adding release label release-7.57.0 on PR, as PR was cherry-picked in branch 7.57.0. |



Description
amount instead of PnL and increasing displayed decimals
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Very small screen (iPhone SE 3rd gen):
Pre-merge author checklist
Docs and MetaMask Mobile
Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Note
Show asset amounts (up to 5 decimals) in perps activity details instead of PnL, and update referral code copy across locales.
CLOSE_POSITION,TAKE_PROFIT, andSTOP_LOSS, display<amount> <symbol>instead of PnL; keep direction forOPEN_POSITION.formatNumber(value, decimals?)using locale formatter.0 ETH,0.00401 ETH,Long 0.01235 ETH).step4_title_referral_bonus,step4_referral_bonus_description).Written by Cursor Bugbot for commit ccca2bd. This will update automatically on new commits. Configure here.
Co-authored-by: Christian Montoya christian.montoya@consensys.net 5058ba5