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
This commit is contained in:
Daniel Ternyak 2018-07-06 18:45:25 -05:00 committed by GitHub
parent 2af3e3475c
commit e4debe341a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -252,7 +252,13 @@ class CustomNodeModal extends React.Component<Props, State> {
} }
private pollForDefaultNodes() { private pollForDefaultNodes() {
return null;
// @ts-ignore
const pollingInterval = 3000; 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 () => { this.timer = window.setInterval(async () => {
const results = await exists( const results = await exists(
[ [