Skip to content

Commit a3f3899

Browse files
runway-github[bot]VGR-GITclaude
authored
chore(runway): cherry-pick chore(rewards): rename Perps competition CTA to "Trade now" (RWDS-1335) cp-7.79.0 (#30745)
- chore(rewards): rename Perps competition CTA to "Trade now" (RWDS-1335) cp-7.79.0 (#30740) ## **Description** Replaces the **"Open Position"** copy on the Perps Trading Competition opted-in CTA with **"Trade now"**, per [RWDS-1335](https://consensyssoftware.atlassian.net/browse/RWDS-1335). Scope is intentionally copy-only: - `locales/languages/en.json` — `rewards.perps_trading_campaign.open_position_cta` value. - `app/components/UI/Rewards/components/Campaigns/PerpsTradingCampaignCTA.tsx` — comment updated to match. - `app/components/UI/Rewards/components/Campaigns/PerpsTradingCampaignCTA.test.tsx` — mock value, test name, and rendered-text assertion. No behavior, navigation, or analytics changes — the CTA still deep-links to `link.metamask.io/perps?screen=market-list`. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: [RWDS-1335](https://consensyssoftware.atlassian.net/browse/RWDS-1335) ## **Manual testing steps** ```gherkin Feature: Perps Trading Competition CTA copy Scenario: Opted-in user sees the renamed CTA Given I am opted in to the Perps Trading Competition campaign And the campaign is active When I open the Rewards campaigns view Then the campaign CTA reads "Trade now" And tapping it deep-links to the Perps market list ``` ## **Screenshots/Recordings** ### **Before** CTA: "Open Position" ### **After** CTA: "Trade now" ## **Pre-merge author checklist** - [x] I've followed MetaMask Contributor Docs and MetaMask Mobile Coding Standards. - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [ ] I've documented my code using JSDoc format if applicable - [ ] I've applied the right labels on the PR [RWDS-1335]: https://consensyssoftware.atlassian.net/browse/RWDS-1335?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [RWDS-1335]: https://consensyssoftware.atlassian.net/browse/RWDS-1335?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Copy-only change to an existing i18n string and tests; navigation and campaign logic are unchanged. > > **Overview** > Renames the opted-in **Perps Trading Competition** primary CTA label from **"Open Position"** to **"Trade now"** via `rewards.perps_trading_campaign.open_position_cta` in English (`en.json`). The component still uses the same i18n key and `handleOpenPosition` still deep-links to `link.metamask.io/perps?screen=market-list`; only the displayed string and an inline comment change. Unit tests update the i18n mock, test description, and on-screen text assertion to match. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit a5c865b. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> [22e2192](22e2192) [RWDS-1335]: https://consensyssoftware.atlassian.net/browse/RWDS-1335?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [RWDS-1335]: https://consensyssoftware.atlassian.net/browse/RWDS-1335?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [RWDS-1335]: https://consensyssoftware.atlassian.net/browse/RWDS-1335?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: VGR <VanGulckRik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 97ba7af commit a3f3899

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

app/components/UI/Rewards/components/Campaigns/PerpsTradingCampaignCTA.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jest.mock('./CampaignOptInSheet', () => {
5555
jest.mock('../../../../../../locales/i18n', () => ({
5656
strings: (key: string) => {
5757
const map: Record<string, string> = {
58-
'rewards.perps_trading_campaign.open_position_cta': 'Open Position',
58+
'rewards.perps_trading_campaign.open_position_cta': 'Trade now',
5959
'rewards.campaign_details.join_campaign': 'Join Campaign',
6060
'rewards.campaign.geo_locked_cta': 'Geo locked',
6161
'rewards.campaign.geo_locked_toast_title': 'Not available',
@@ -150,15 +150,15 @@ describe('PerpsTradingCampaignCTA', () => {
150150
expect(queryByTestId(CAMPAIGN_CTA_TEST_IDS.CTA_BUTTON)).toBeNull();
151151
});
152152

153-
it('when opted in, shows Open Position and calls handleDeeplink with perps market-list URL', () => {
153+
it('when opted in, shows Trade now and calls handleDeeplink with perps market-list URL', () => {
154154
const { getByTestId, getByText } = render(
155155
<PerpsTradingCampaignCTA
156156
campaign={buildCampaign()}
157157
participantStatus={optedIn}
158158
/>,
159159
);
160160

161-
expect(getByText('Open Position')).toBeOnTheScreen();
161+
expect(getByText('Trade now')).toBeOnTheScreen();
162162
fireEvent.press(getByTestId(CAMPAIGN_CTA_TEST_IDS.CTA_BUTTON));
163163

164164
expect(mockHandleDeeplink).toHaveBeenCalledWith({

app/components/UI/Rewards/components/Campaigns/PerpsTradingCampaignCTA.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const PerpsTradingCampaignCTA: React.FC<PerpsTradingCampaignCTAProps> = ({
6969
return null;
7070
}
7171

72-
// Opted in — show "Open Position"
72+
// Opted in — show "Trade now"
7373
if (isOptedIn) {
7474
return (
7575
<Box twClassName="p-4 mb-2">

locales/languages/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8949,7 +8949,7 @@
89498949
"label_notional_volume": "Notional volume",
89508950
"pending": "Pending",
89518951
"qualified": "Qualified",
8952-
"open_position_cta": "Open Position",
8952+
"open_position_cta": "Trade now",
89538953
"leaderboard_title": "Leaderboard",
89548954
"leaderboard_total_participants": "{{count}} participants",
89558955
"last_updated": "Last updated: {{time}}",

0 commit comments

Comments
 (0)