From 48dd819763618831f7c8daabf0fc113fca8e06f3 Mon Sep 17 00:00:00 2001 From: aleksandar-mihajlovic <120601632+aleksandar-mihajlovic@users.noreply.github.com> Date: Tue, 17 Jan 2023 22:37:35 +0100 Subject: [PATCH] Fix for showing warning when no pending confirmations when network switching (#17179) --- ui/pages/confirmation/confirmation.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/pages/confirmation/confirmation.js b/ui/pages/confirmation/confirmation.js index ac390c421..bc867a96b 100644 --- a/ui/pages/confirmation/confirmation.js +++ b/ui/pages/confirmation/confirmation.js @@ -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({ 0 && Object.values(alertState[pendingConfirmation.id]) .filter((alert) => alert.dismissed === false) .map((alert, idx, filtered) => (