Repository: MetaMask/metamask-mobile (2025-07-15T10:58:36Z)

Issue:
[Bug]:n the Activity tab, transaction values are displayed as 'Not Available' or show incorrect amounts unless the network on which the transaction was made is selected
### Describe the bug

In the Activity tab, transaction values are displayed as 'Not Available' or show incorrect amounts unless the network on which the transaction was made is selected.

### Expected behavior

Values displayed correctly

### Screenshots/Recordings

https://github.com/user-attachments/assets/cef4943f-530e-4ae7-8776-4a72dd110e87


<img width="502" height="888" alt="Image" src="https://github.com/user-attachments/assets/d385b5ce-7b0a-4974-9649-aa02a787316a" />


![Image](https://github.com/user-attachments/assets/31ea6586-7cec-4690-8bb5-2798e933936b)




<img width="957" height="582" alt="Image" src="https://github.com/user-attachments/assets/9564e10c-1c7d-45fa-acbd-f06cb0a93d6d" />



https://github.com/user-attachments/assets/c103744d-52b2-42a9-9091-2de428b1b5db

### Steps to reproduce

1. Send tx 
2. Switch to another network
3. Navigate to the Activity tab
### Error messages or log output

```shell

```

### Detection stage

During release testing

### Version

7.51.0

### Build type

None

### Device

Samsung S24+

### Operating system

Android

### Additional context

_No response_

### Severity

_No response_


Discussion:
Reproduced for android. Unable to reproduce for iOS:

<img width="1440" height="3120" alt="Image" src="https://github.com/user-attachments/assets/e74da736-e513-4c6f-928d-8051bfc0c120" />
Hi @matthewwalsh0,

This issue has been closed. Please complete this RCA form:
https://docs.google.com/forms/d/e/1FAIpQLSdnPbJISzFlR_aQD2uRpnMKSoGAopuTd_yeZK7J4Q5GzgbsOA/viewform?entry.340898780=17102&entry.1228565618=regression-RC-7.51.0&entry.1698032149=team-confirmations

<!-- AUTO-FORM -->
Using the QA build for iOS from [here](https://app.bitrise.io/build/21e0c760-25aa-4c81-8e17-bc334df1dee2?tab=artifacts), the issue is still present:

https://github.com/user-attachments/assets/1b4e9ddb-b8f1-4016-aca9-6c1c0ea9d2cd

When switching networks to the network of the transaction, the details become available:

https://github.com/user-attachments/assets/7365b831-e32b-4641-b66f-48d53716ab66

Present also on Android QA build from [here](https://app.bitrise.io/build/34866dc0-d18f-4eb3-8ff6-015e25dd5f68?tab=artifacts)

<img width="1708" height="925" alt="Image" src="https://github.com/user-attachments/assets/8ca93fee-3bb9-4eea-9cf1-7e82d77aa446" />
Hi @matthewwalsh0,

This issue has been closed. Please complete this RCA form:
https://docs.google.com/forms/d/e/1FAIpQLSdnPbJISzFlR_aQD2uRpnMKSoGAopuTd_yeZK7J4Q5GzgbsOA/viewform?entry.340898780=17102&entry.1228565618=regression-RC-7.51.0&entry.1698032149=team-confirmations

<!-- AUTO-FORM -->
Hi @matthewwalsh0,

This issue has been closed. Please complete this RCA form:
https://docs.google.com/forms/d/e/1FAIpQLSdnPbJISzFlR_aQD2uRpnMKSoGAopuTd_yeZK7J4Q5GzgbsOA/viewform?entry.340898780=17102&entry.1228565618=regression-RC-7.51.0&entry.1698032149=team-confirmations

<!-- AUTO-FORM -->
Present in v7.52.0 (2194):

https://github.com/user-attachments/assets/79f7847e-3c96-4cef-96cc-78e90c1469dd


Present in v 7.52.0 (2196):

https://github.com/user-attachments/assets/a5966973-1b35-4dbb-89d4-4dd3047d51ff
Present in v.7.52.0 (2198):

Reopening issue 

https://github.com/user-attachments/assets/ba5ea452-309b-4f80-a737-e76ff0fd911c
Closing as the cherry-pick was merged yesterday. 
Hi @matthewwalsh0,

This issue has been closed. Please complete this RCA form:
https://docs.google.com/forms/d/e/1FAIpQLSdnPbJISzFlR_aQD2uRpnMKSoGAopuTd_yeZK7J4Q5GzgbsOA/viewform?entry.340898780=17102&entry.1228565618=regression-RC-7.52.0&entry.1698032149=team-confirmations

<!-- AUTO-FORM -->



Patch:
diff --git a/app/components/UI/TransactionElement/TransactionDetails/index.js b/app/components/UI/TransactionElement/TransactionDetails/index.js
index 25ab9073e5d8..246411362a96 100644
--- a/app/components/UI/TransactionElement/TransactionDetails/index.js
+++ b/app/components/UI/TransactionElement/TransactionDetails/index.js
@@ -38,7 +38,7 @@ import {
   selectTickerByChainId,
 } from '../../../../selectors/networkController';
 import {
-  selectConversionRate,
+  selectConversionRateByChainId,
   selectCurrentCurrency,
 } from '../../../../selectors/currencyRateController';
 import { selectTokensByAddress } from '../../../../selectors/tokensController';
@@ -553,7 +553,10 @@ const mapStateToProps = (state, ownProps) => ({
     : selectEvmTicker(state),
   tokens: selectTokensByAddress(state),
   contractExchangeRates: selectContractExchangeRates(state),
-  conversionRate: selectConversionRate(state),
+  conversionRate: selectConversionRateByChainId(
+    state,
+    ownProps.transactionObject.chainId,
+  ),
   currentCurrency: selectCurrentCurrency(state),
   primaryCurrency: selectPrimaryCurrency(state),
   swapsTransactions: selectSwapsTransactions(state),
diff --git a/app/components/UI/TransactionElement/index.js b/app/components/UI/TransactionElement/index.js
index 64d297ab86c9..3d27e706753d 100644
--- a/app/components/UI/TransactionElement/index.js
+++ b/app/components/UI/TransactionElement/index.js
@@ -59,6 +59,7 @@ import {
   formatChainIdToHex,
   isSolanaChainId,
 } from '@metamask/bridge-controller';
+import { selectConversionRateByChainId } from '../../../selectors/currencyRateController';
 
 const createStyles = (colors, typography) =>
   StyleSheet.create({
@@ -705,6 +706,7 @@ const mapStateToProps = (state, ownProps) => ({
   swapsTransactions: selectSwapsTransactions(state),
   swapsTokens: swapsControllerTokens(state),
   ticker: selectTickerByChainId(state, ownProps.txChainId),
+  conversionRate: selectConversionRateByChainId(state, ownProps.txChainId),
 });
 
 TransactionElement.contextType = ThemeContext;
diff --git a/app/components/Views/TransactionsView/index.js b/app/components/Views/TransactionsView/index.js
index 3c2937974ed9..5584902cc0c5 100644
--- a/app/components/Views/TransactionsView/index.js
+++ b/app/components/Views/TransactionsView/index.js
@@ -39,6 +39,7 @@ import { toChecksumHexAddress } from '@metamask/controller-utils';
 import { selectTokenNetworkFilter } from '../../../selectors/preferencesController';
 import { CHAIN_IDS } from '@metamask/transaction-controller';
 import { PopularList } from '../../../util/networks/customNetworks';
+import useCurrencyRatePolling from '../../hooks/AssetPolling/useCurrencyRatePolling';
 
 const styles = StyleSheet.create({
   wrapper: {
@@ -63,6 +64,8 @@ const TransactionsView = ({
   const [loading, setLoading] = useState();
   const selectedNetworkClientId = useSelector(selectSelectedNetworkClientId);
 
+  useCurrencyRatePolling();
+
   const selectedAddress = toChecksumHexAddress(
     selectedInternalAccount?.address,
   );


Test patch:
diff --git a/app/components/Views/ActivityView/index.test.tsx b/app/components/Views/ActivityView/index.test.tsx
index 7bd8c7422566..938956ecb572 100644
--- a/app/components/Views/ActivityView/index.test.tsx
+++ b/app/components/Views/ActivityView/index.test.tsx
@@ -18,6 +18,8 @@ jest.mock('../../../core/Engine', () => ({
   },
 }));
 
+jest.mock('../../hooks/AssetPolling/useCurrencyRatePolling', () => jest.fn());
+
 // TODO: Replace "any" with type
 // eslint-disable-next-line @typescript-eslint/no-explicit-any
 const renderComponent = (state: any = {}) =>
diff --git a/app/components/Views/TransactionsView/index.test.tsx b/app/components/Views/TransactionsView/index.test.tsx
index 5742199ce137..c9e431710079 100644
--- a/app/components/Views/TransactionsView/index.test.tsx
+++ b/app/components/Views/TransactionsView/index.test.tsx
@@ -152,6 +152,8 @@ jest.mock('../../../core/Engine', () => ({
   rejectPendingApproval: jest.fn(),
 }));
 
+jest.mock('../../hooks/AssetPolling/useCurrencyRatePolling', () => jest.fn());
+
 import TransactionsView from './index';
 import initialRootState from '../../../util/test/initial-root-state';
 import { TX_SUBMITTED, TX_CONFIRMED } from '../../../constants/transaction';