Skip to content

Commit

Permalink
fix: fix PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
salimtb committed Dec 5, 2024
1 parent cde651e commit a936f0f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ui/components/app/toast-master/toast-master.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { useI18nContext } from '../../../hooks/useI18nContext';
import { usePrevious } from '../../../hooks/usePrevious';
import {
getCurrentNetwork,
getIsTokenNetworkFilterEqualCurrentNetwork,
getOriginOfCurrentTab,
getSelectedAccount,
getSwitchedNetworkDetails,
Expand Down Expand Up @@ -269,10 +270,19 @@ function BaseNetworkToast() {
const t = useI18nContext();
const dispatch = useDispatch();

const showBaseNetworkToast = useSelector(
const isCurrentNetworkFilerSelected = useSelector(
getIsTokenNetworkFilterEqualCurrentNetwork,
);

const currentNetwork = useSelector(getCurrentNetwork);
const showBaseNetworkToastPreference = useSelector(
(state) => state.metamask.preferences.showBaseNetworkToast,
);

const showBaseNetworkToast =
showBaseNetworkToastPreference &&
(!isCurrentNetworkFilerSelected ||
currentNetwork?.chainId === CHAIN_IDS.BASE);
return (
showBaseNetworkToast && (
<Toast
Expand Down

0 comments on commit a936f0f

Please sign in to comment.