From af514385b2fa0d343df153385a35be9e51a50ef9 Mon Sep 17 00:00:00 2001 From: Zoe Date: Mon, 24 Feb 2020 11:53:12 +0000 Subject: [PATCH] Avoid shadowing window.setTimeout --- src/components/views/dialogs/DevtoolsDialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js index 53edf88698..dc99ed680c 100644 --- a/src/components/views/dialogs/DevtoolsDialog.js +++ b/src/components/views/dialogs/DevtoolsDialog.js @@ -625,7 +625,7 @@ const PHASE_MAP = { function VerificationRequest({txnId, request}) { const [, updateState] = useState(); - const [timeout, setTimeout] = useState(request.timeout); + const [timeout, setRequestTimeout] = useState(request.timeout); /* Re-render if something changes state */ useEffect(() => { @@ -639,7 +639,7 @@ function VerificationRequest({txnId, request}) { /* Note that request.timeout is a getter, so its value changes */ const id = setInterval(() => { - setTimeout(request.timeout); + setRequestTimeout(request.timeout); }, 500); return () => { clearInterval(id); };