Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .storybook/storybook.requires.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions app/actions/alert/index.js

This file was deleted.

2 changes: 0 additions & 2 deletions app/components/Nav/Main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
import NetInfo from '@react-native-community/netinfo';
import PropTypes from 'prop-types';
import { connect, useSelector } from 'react-redux';
import GlobalAlert from '../../UI/GlobalAlert';
import NotificationManager from '../../../core/NotificationManager';
import Engine from '../../../core/Engine';
import AppConstants from '../../../core/AppConstants';
Expand Down Expand Up @@ -401,7 +400,6 @@ const Main = (props) => {
) : (
renderLoader()
)}
<GlobalAlert />
<FadeOutOverlay />
<Notification navigation={props.navigation} />
<RampOrders />
Expand Down
5 changes: 0 additions & 5 deletions app/components/Nav/Main/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ jest.mock('./MainNavigator', () => {
};
});

jest.mock(
'../../UI/GlobalAlert',
() => () => mockReact.createElement('GlobalAlertMock'),
);

jest.mock(
'../../UI/FadeOutOverlay',
() => () => mockReact.createElement('FadeOutOverlayMock'),
Expand Down
15 changes: 4 additions & 11 deletions app/components/UI/AccountOverview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { connect } from 'react-redux';
import { strings } from '../../../../locales/i18n';
import { AccountOverviewSelectorsIDs } from './AccountOverview.testIds';
import { WalletViewSelectorsIDs } from '../../Views/Wallet/WalletView.testIds';
import { showAlert } from '../../../actions/alert';
import { protectWalletModalVisible } from '../../../actions/user';
import { toast, ToastSeverity } from '@metamask/design-system-react-native';
import Routes from '../../../constants/navigation/Routes';
import ClipboardManager from '../../../core/ClipboardManager';
import { fontStyles } from '../../../styles/common';
Expand Down Expand Up @@ -162,10 +162,6 @@ class AccountOverview extends PureComponent {
* Object that represents the selected account
*/
account: PropTypes.object,
/**
/* Triggers global alert
*/
showAlert: PropTypes.func,
/**
* Used to get child ref
*/
Expand Down Expand Up @@ -278,11 +274,9 @@ class AccountOverview extends PureComponent {
copyAccountToClipboard = async () => {
const { selectedAddress } = this.props;
await ClipboardManager.setString(selectedAddress);
this.props.showAlert({
isVisible: true,
autodismiss: 1500,
content: 'clipboard-alert',
data: { msg: strings('account_details.account_copied_to_clipboard') },
toast({
description: strings('account_details.account_copied_to_clipboard'),
severity: ToastSeverity.Success,
});
setTimeout(() => this.props.protectWalletModalVisible(), 2000);

Expand Down Expand Up @@ -458,7 +452,6 @@ const mapStateToProps = (state) => ({
});

const mapDispatchToProps = (dispatch) => ({
showAlert: (config) => dispatch(showAlert(config)),
protectWalletModalVisible: () => dispatch(protectWalletModalVisible()),
});

Expand Down
156 changes: 0 additions & 156 deletions app/components/UI/GlobalAlert/index.js

This file was deleted.

12 changes: 3 additions & 9 deletions app/components/UI/Transactions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
import { connect } from 'react-redux';
import { ActivitiesViewSelectorsIDs } from '../../Views/ActivityView/ActivitiesView.testIds';
import { strings } from '../../../../locales/i18n';
import { showAlert } from '../../../actions/alert';
import ExtendedKeyringTypes from '../../../constants/keyringTypes';
import { NO_RPC_BLOCK_EXPLORER, RPC } from '../../../constants/network';
import Engine from '../../../core/Engine';
Expand Down Expand Up @@ -1053,10 +1052,6 @@ const mapStateToProps = (state) => ({

Transactions.contextType = ThemeContext;

const mapDispatchToProps = (dispatch) => ({
showAlert: (config) => dispatch(showAlert(config)),
});

export { Transactions as UnconnectedTransactions };

const TransactionsWithHardwareWallet = (props) => {
Expand All @@ -1065,7 +1060,6 @@ const TransactionsWithHardwareWallet = (props) => {
return <Transactions {...props} hardwareWallet={hardwareWallet} />;
};

export default connect(
mapStateToProps,
mapDispatchToProps,
)(withQRHardwareAwareness(TransactionsWithHardwareWallet));
export default connect(mapStateToProps)(
withQRHardwareAwareness(TransactionsWithHardwareWallet),
);
1 change: 0 additions & 1 deletion app/components/UI/Transactions/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ const defaultTestProps = {
collectibleContracts: [],
tokens: {},
navigation: mockNavigation,
showAlert: jest.fn(),
gasFeeEstimates: {
medium: { suggestedMaxFeePerGas: '20' },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
selectInternalAccountListSpreadByScopesByGroupId,
selectInternalAccountsByGroupId,
} from '../../../../selectors/multichainAccounts/accounts';
import { IconName, Toaster, toast } from '@metamask/design-system-react-native';
import { IconName, toast } from '@metamask/design-system-react-native';
import MultichainAddressRow, {
MULTICHAIN_ADDRESS_ROW_QR_BUTTON_TEST_ID,
} from '../../../../component-library/components-temp/MultichainAccounts/MultichainAddressRow';
Expand Down Expand Up @@ -156,7 +156,6 @@ export const AddressList = () => {
renderItem={renderAddressItem}
onLoad={onLoad}
/>
<Toaster />
</View>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
AvatarFavicon,
AvatarFaviconSize,
Box,
Toaster,
toast,
} from '@metamask/design-system-react-native';
import { USER_INTENT } from '../../../../constants/permissions.ts';
Expand Down Expand Up @@ -1002,7 +1001,6 @@ const MultichainAccountConnect = (props: AccountConnectProps) => {
</ScreenContainer>
)}
{renderPhishingModal()}
<Toaster />
</Box>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
Button,
ButtonVariant,
ButtonSize,
Toaster,
toast,
} from '@metamask/design-system-react-native';
import Engine from '../../../../core/Engine';
Expand Down Expand Up @@ -326,7 +325,6 @@ export const PrivateKeyList = () => {
/>

{reveal ? renderPrivateKeyList() : renderPassword()}
<Toaster />
</Box>
);
};
18 changes: 7 additions & 11 deletions app/components/Views/NftDetails/NftDetails.tsx

@georgewrmarshall georgewrmarshall Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After (pure black dark mode)

Success toast

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {
ButtonVariant,
HeaderStandard,
IconName as DSIconName,
toast,
ToastSeverity,
} from '@metamask/design-system-react-native';
import NftDetailsBox from './NftDetailsBox';
import NftDetailsInformationRow from './NftDetailsInformationRow';
Expand All @@ -28,8 +30,7 @@ import Icon, {
IconSize,
} from '../../../component-library/components/Icons/Icon';
import ClipboardManager from '../../../core/ClipboardManager';
import { useDispatch, useSelector } from 'react-redux';
import { showAlert } from '../../../actions/alert';
import { useSelector } from 'react-redux';
import { strings } from '../../../../locales/i18n';
import {
selectChainId,
Expand Down Expand Up @@ -61,7 +62,6 @@ const NftDetails = () => {
const navigation = useNavigation();
const { collectible, source } = useParams<NftDetailsParams>();
const chainId = useSelector(selectChainId);
const dispatch = useDispatch();
const currentCurrency = useSelector(selectCurrentCurrency);
const ticker = useSelector(selectEvmTicker);
const { trackEvent, createEventBuilder } = useAnalytics();
Expand Down Expand Up @@ -135,14 +135,10 @@ const NftDetails = () => {
return;
}
await ClipboardManager.setString(address);
dispatch(
showAlert({
isVisible: true,
autodismiss: 1500,
content: 'clipboard-alert',
data: { msg: strings('detected_tokens.address_copied_to_clipboard') },
}),
);
toast({
description: strings('detected_tokens.address_copied_to_clipboard'),
severity: ToastSeverity.Success,
});
};

const blockExplorerTokenLink = () =>
Expand Down
4 changes: 0 additions & 4 deletions app/components/Views/Notifications/Details/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ const mockInitialState = {
},
};

jest.mock('../../../../actions/alert', () => ({
showAlert: jest.fn(),
}));

jest.mock('@react-navigation/native');
describe('NotificationsDetails', () => {
const mockStore = configureMockStore();
Expand Down
Loading
Loading