Skip to content

feat: Pass the asset to send page using routing#17415

Merged
jpuri merged 33 commits into
mainfrom
send_asset
Jul 24, 2025
Merged

feat: Pass the asset to send page using routing#17415
jpuri merged 33 commits into
mainfrom
send_asset

Conversation

@jpuri

@jpuri jpuri commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

Description

Passing the asset information to the send page if available.

Changelog

CHANGELOG entry:

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/5407

Manual testing steps

NA

Screenshots/Recordings

Screenshot 2025-07-21 at 5 43 27 PM

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.

@jpuri jpuri requested a review from a team as a code owner July 21, 2025 12:21
@jpuri jpuri added the team-confirmations Push issues to confirmations team label Jul 21, 2025
@jpuri jpuri requested a review from a team as a code owner July 21, 2025 12:21
@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.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@jpuri jpuri marked this pull request as draft July 21, 2025 13:13
@jpuri jpuri marked this pull request as ready for review July 21, 2025 13:13
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Base automatically changed from adding_send_page to main July 23, 2025 13:09
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@github-actions

github-actions Bot commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: deebb38
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/29cdf8b8-2e3f-43de-a83d-cd4ae2ac8fe2

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@cursor cursor Bot 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.

Bug: Send Screen Asset Parameter Mismatch

In CollectibleView, when navigating to the Send screen (for the new redesign flow), the collectible params object is passed directly as navigation parameters. This is incorrect, as the Send component expects the asset data to be nested under an asset key (e.g., { asset: params }). This inconsistent parameter structure differs from other components that correctly wrap their asset data.

app/components/Views/CollectibleView/index.js#L86-L94

this.props.newAssetTransaction(params);
if (isSendRedesignEnabled()) {
this.props.navigation.navigate(Routes.SEND.DEFAULT, {
screen: Routes.SEND.ROOT,
params,
});
} else {
this.props.navigation.navigate('SendFlowView');
}

Fix in CursorFix in Web


Bug: Send Flow Fails to Pass Selected Asset

In the redesigned send flow initiated from WalletActions, the selected asset is not dispatched to the global state or passed via navigation parameters. A return statement prevents the asset dispatch logic (present in the legacy flow) from executing. Consequently, the send component lacks the selected asset, unlike other navigation paths (e.g., AssetOverview) or the legacy flow, which correctly provide this data.

app/components/Views/WalletActions/WalletActions.tsx#L299-L307

if (isSendRedesignEnabled()) {
closeBottomSheetAndNavigate(() => {
navigate(Routes.SEND.DEFAULT, {
screen: Routes.SEND.ROOT,
});
});
return;
}

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
53.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Comment thread app/components/Views/confirmations/components/send/send.tsx
Comment thread app/components/Views/confirmations/utils/confirm.ts
Comment thread app/components/Nav/Main/MainNavigator.js
Comment thread app/components/UI/AssetOverview/AssetOverview.tsx
@jpuri jpuri added this pull request to the merge queue Jul 24, 2025
Merged via the queue into main with commit 2cf42b8 Jul 24, 2025
78 of 86 checks passed
@jpuri jpuri deleted the send_asset branch July 24, 2025 11:32
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 24, 2025
@metamaskbot metamaskbot added the release-7.53.0 Issue or pull request that will be included in release 7.53.0 label Jul 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. release-7.53.0 Issue or pull request that will be included in release 7.53.0 skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants