diff --git a/react/src/components/dashboard/settings/settings.addNodePanel.js b/react/src/components/dashboard/settings/settings.addNodePanel.js index afc9751..091981f 100644 --- a/react/src/components/dashboard/settings/settings.addNodePanel.js +++ b/react/src/components/dashboard/settings/settings.addNodePanel.js @@ -78,7 +78,7 @@ class AddNodePanel extends React.Component { } addNode() { - if (this.state.addNodeCoin) { + if (this.state.addNodeCoin && this.state.addPeerIP) { Store.dispatch( addPeerNode( this.state.addNodeCoin.split('|')[0], @@ -89,29 +89,9 @@ class AddNodePanel extends React.Component { } updateInput(e) { - if (e.target.name === 'wifkeysPassphrase') { - // remove any empty chars from the start/end of the string - const newValue = e.target.value; - - clearTimeout(this.state.trimPassphraseTimer); - - const _trimPassphraseTimer = setTimeout(() => { - this.setState({ - wifkeysPassphrase: newValue ? newValue.trim() : '', // hardcoded field name - }); - }, 2000); - - this.resizeLoginTextarea(); - - this.setState({ - trimPassphraseTimer: _trimPassphraseTimer, - [e.target.name]: newValue, - }); - } else { this.setState({ [e.target.name]: e.target.value, }); - } } render() { @@ -145,11 +125,11 @@ class AddNodePanel extends React.Component {
SuperNET Peers:
-

{ this.renderSNPeersList() }

+
{ this.renderSNPeersList() }
Raw Peers:
-

{ this.renderPeersList() }

+
{ this.renderPeersList() }
diff --git a/react/src/components/dashboard/settings/settings.importKeysPanel.js b/react/src/components/dashboard/settings/settings.importKeysPanel.js index 8a26ae9..698a673 100644 --- a/react/src/components/dashboard/settings/settings.importKeysPanel.js +++ b/react/src/components/dashboard/settings/settings.importKeysPanel.js @@ -18,7 +18,7 @@ class ImportKeysPanel extends React.Component { Store.dispatch(importPrivKey(this.state.importWifKey)); } - updateInput(e) { + updateInput = (e) => { this.setState({ [e.target.name]: e.target.value, });