Skip to content

chore(runway): cherry-pick 5058ba5#21179

Merged
Cal-L merged 2 commits into
release/7.57.0from
cherry-pick-7-57-0-5058ba5
Oct 15, 2025
Merged

chore(runway): cherry-pick 5058ba5#21179
Cal-L merged 2 commits into
release/7.57.0from
cherry-pick-7-57-0-5058ba5

Conversation

@runway-github

@runway-github runway-github Bot commented Oct 15, 2025

Copy link
Copy Markdown
Contributor

Description

  • 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

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

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]

Screenshots/Recordings

Before

After

Very small screen (iPhone SE 3rd gen):

Pre-merge author checklist

Pre-merge reviewer checklist

  • 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.

Note

Show asset amounts (up to 5 decimals) in perps activity details instead of PnL, and update referral code copy across locales.

  • Rewards UI / Formatting:
    • Perps details: For CLOSE_POSITION, TAKE_PROFIT, and STOP_LOSS, display <amount> <symbol> instead of PnL; keep direction for OPEN_POSITION.
    • Precision: Increase amount formatting to at most 5 decimals; introduce formatNumber(value, decimals?) using locale formatter.
    • Tests: Update expectations for zero/low amounts and rounding (e.g., 0 ETH, 0.00401 ETH, Long 0.01235 ETH).
  • i18n:
    • EN: tweak referral copy (step4_title_referral_bonus, step4_referral_bonus_description).
    • Other locales: remove referral bonus strings no longer used.

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

@runway-github runway-github Bot requested a review from a team as a code owner October 15, 2025 07:30
@github-actions

Copy link
Copy Markdown
Contributor

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.

@metamaskbot metamaskbot added the team-runway-bot-deprecated DEPRECATED: please use "team-bots" instead label Oct 15, 2025
cursor[bot]

This comment was marked as outdated.

@baptiste-marchand baptiste-marchand marked this pull request as draft October 15, 2025 08:02
@baptiste-marchand

baptiste-marchand commented Oct 15, 2025

Copy link
Copy Markdown
Contributor

Currently investigating an issue with this cherry-pick

Edit: fixed. PR is ready to be merged

@baptiste-marchand baptiste-marchand force-pushed the cherry-pick-7-57-0-5058ba5 branch from 8c5633f to 9ce88da Compare October 15, 2025 08:27
@github-actions github-actions Bot added size-M and removed size-XL labels Oct 15, 2025
<!--
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>
@baptiste-marchand baptiste-marchand force-pushed the cherry-pick-7-57-0-5058ba5 branch from 9ce88da to 65a5264 Compare October 15, 2025 08:29
@baptiste-marchand baptiste-marchand marked this pull request as ready for review October 15, 2025 08:30
@github-actions github-actions Bot added size-S and removed size-M labels Oct 15, 2025
cursor[bot]

This comment was marked as outdated.

Comment thread locales/languages/tr.json
"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...",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

@sonarqubecloud

Copy link
Copy Markdown

@Cal-L Cal-L left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Cal-L Cal-L merged commit ef339db into release/7.57.0 Oct 15, 2025
151 of 157 checks passed
@Cal-L Cal-L deleted the cherry-pick-7-57-0-5058ba5 branch October 15, 2025 22:16
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 15, 2025
@metamaskbot metamaskbot added the release-7.57.0 Issue or pull request that will be included in release 7.57.0 label Oct 15, 2025
@metamaskbot

Copy link
Copy Markdown
Collaborator

No release label on PR. Adding release label release-7.57.0 on PR, as PR was cherry-picked in branch 7.57.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.57.0 Issue or pull request that will be included in release 7.57.0 size-S team-runway-bot-deprecated DEPRECATED: please use "team-bots" instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants