Skip to content

Commit c2c7d86

Browse files
committed
release(runway): cherry-pick fix: cp-13.9.0 BTC redeposits not shown in individual asset activity (#37732)
<!-- 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. --> ## **Description** BTC redeposits not shown in individual asset activity section <!-- 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? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/37732?quickstart=1) ## **Changelog** <!-- 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: fix BTC redeposits not shown in individual asset activity ## **Related issues** Fixes: https://consensys.slack.com/archives/C09KHA0P1B7/p1762876275492479 & https://consensyssoftware.atlassian.net/browse/ASSETS-1765 ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <img width="796" height="1182" alt="image" src="https://github.com/user-attachments/assets/30905fe2-fa76-43bd-bcfc-a94ac9b2e6dd" /> <!-- [screenshots/recordings] --> ### **After** <img width="669" height="1042" alt="image" src="https://github.com/user-attachments/assets/abc0e25b-e285-49aa-aab6-25d6725c1994" /> <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/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-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Ensures Bitcoin redeposit transactions appear in individual asset activity by updating the non‑EVM token filter. > > - **Non‑EVM activity filtering**: > - Update `filterNonEvmTxByToken` in `ui/components/app/transaction-list/unified-transaction-list.component.js` to treat Bitcoin redeposits as matching when `tokenAddress` starts with `bip122` and the transaction has no `to` outputs and `type === KeyringTransactionType.Send`. > - Preserve existing filtering that matches transactions by `asset.type` across `transaction.to` and `transaction.from`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 4da050b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 4a75df2 commit c2c7d86

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ui/components/app/transaction-list/unified-transaction-list.component.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,19 @@ export const filterNonEvmTxByToken = (
264264
return nonEvmTransactions;
265265
}
266266

267+
const isBitcoinNetwork = tokenAddress.startsWith('bip122');
268+
267269
const transactionForToken = (nonEvmTransactions.transactions || []).filter(
268270
(transaction) => {
271+
const isRedeposit =
272+
isBitcoinNetwork &&
273+
transaction.to.length === 0 &&
274+
transaction.type === KeyringTransactionType.Send;
275+
276+
if (isRedeposit) {
277+
return true;
278+
}
279+
269280
return [...transaction.to, ...transaction.from].some(
270281
(item) => item.asset.type === tokenAddress,
271282
);

0 commit comments

Comments
 (0)