From e4debe341ad5691fe6fff1ad15213a73ea088265 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Fri, 6 Jul 2018 18:45:25 -0500 Subject: [PATCH] Disable local node polling (need to allow user to disable polling) (#2034) * Only check for custom nodes locally once * Add polling warning for console snoopers * disable local node polling until we allow the user to disable from the client --- common/components/CustomNodeModal/CustomNodeModal.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/components/CustomNodeModal/CustomNodeModal.tsx b/common/components/CustomNodeModal/CustomNodeModal.tsx index f286c9f0..5efdb552 100644 --- a/common/components/CustomNodeModal/CustomNodeModal.tsx +++ b/common/components/CustomNodeModal/CustomNodeModal.tsx @@ -252,7 +252,13 @@ class CustomNodeModal extends React.Component { } private pollForDefaultNodes() { + return null; + // @ts-ignore const pollingInterval = 3000; + // console.warning in production to explain to users why we are making a call to localhost + console.warn( + "Don't panic! MyCrypto is going to start a poll for default nodes on port 8545. If you don't like this feature, send us a ping at support@mycrypto.com and we'll walk you through disabling it." + ); this.timer = window.setInterval(async () => { const results = await exists( [