Skip to content

Commit f35f102

Browse files
authored
fix: fix asset symbol for incoming tx (#11495)
## **Description** This PR fixes the assets symbol displayed in the incoming transaction notification. ## **Related issues** Fixes: #7669 ## **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** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] 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. ## **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.
1 parent 305f930 commit f35f102

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/core/NotificationManager.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ import {
1616

1717
import { safeToChecksumAddress } from '../util/address';
1818
import ReviewManager from './ReviewManager';
19-
import { selectChainId } from '../selectors/networkController';
19+
import { selectChainId, selectTicker } from '../selectors/networkController';
2020
import { store } from '../store';
21+
import { useSelector } from 'react-redux';
22+
import { getTicker } from '../../app/util/transactions';
2123
export const constructTitleAndMessage = (notification) => {
2224
let title, message;
2325
switch (notification.type) {
@@ -412,6 +414,7 @@ class NotificationManager {
412414
);
413415

414416
const chainId = selectChainId(store.getState());
417+
const ticker = useSelector(selectTicker);
415418

416419
/// Find the incoming TX
417420
const transactions = TransactionController.getTransactions({
@@ -442,7 +445,7 @@ class NotificationManager {
442445
nonce: `${hexToBN(txs[0].txParams.nonce).toString()}`,
443446
amount: `${renderFromWei(hexToBN(txs[0].txParams.value))}`,
444447
id: txs[0]?.id,
445-
assetType: strings('unit.eth'),
448+
assetType: getTicker(ticker),
446449
},
447450
autoHide: true,
448451
duration: 7000,

0 commit comments

Comments
 (0)