mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Fix for showing warning when no pending confirmations when network switching (#17179)
This commit is contained in:
parent
082772fd08
commit
48dd819763
@ -28,6 +28,7 @@ import {
|
||||
getSnap,
|
||||
///: END:ONLY_INCLUDE_IN
|
||||
getUnapprovedTemplatedConfirmations,
|
||||
getUnapprovedTxCount,
|
||||
} from '../../selectors';
|
||||
import NetworkDisplay from '../../components/app/network-display/network-display';
|
||||
import Callout from '../../components/ui/callout';
|
||||
@ -169,6 +170,7 @@ export default function ConfirmationPage({
|
||||
const [alertState, dismissAlert] = useAlertState(pendingConfirmation);
|
||||
const [templateState] = useTemplateState(pendingConfirmation);
|
||||
const [showWarningModal, setShowWarningModal] = useState(false);
|
||||
const unnaprovedTxsCount = useSelector(getUnapprovedTxCount);
|
||||
|
||||
const [inputStates, setInputStates] = useState({});
|
||||
const setInputState = (key, value) => {
|
||||
@ -339,6 +341,7 @@ export default function ConfirmationPage({
|
||||
<ConfirmationFooter
|
||||
alerts={
|
||||
alertState[pendingConfirmation.id] &&
|
||||
unnaprovedTxsCount > 0 &&
|
||||
Object.values(alertState[pendingConfirmation.id])
|
||||
.filter((alert) => alert.dismissed === false)
|
||||
.map((alert, idx, filtered) => (
|
||||
|
Loading…
Reference in New Issue
Block a user