diff --git a/app/components/SyncError.jsx b/app/components/SyncError.jsx index cfb7021190..f3a03ea38d 100644 --- a/app/components/SyncError.jsx +++ b/app/components/SyncError.jsx @@ -8,6 +8,7 @@ import {Apis} from "bitsharesjs-ws"; import Icon from "./Icon/Icon"; import WebsocketAddModal from "./Settings/WebsocketAddModal"; import counterpart from "counterpart"; +import AccessSettings from "./Settings/AccessSettings"; class SyncError extends React.Component { @@ -18,6 +19,9 @@ class SyncError extends React.Component { onChangeWS(e) { SettingsActions.changeSetting({setting: "apiServer", value: e.target.value }); Apis.reset(e.target.value, true); + setTimeout(()=>{ + this.onReloadClick(); + }, 50); } onReloadClick(e) { @@ -31,13 +35,13 @@ class SyncError extends React.Component { else window.location.href = __BASE_URL__; } - onReset() { - SettingsActions.changeSetting({setting: "apiServer", value: this.props.defaultConnection }); - SettingsActions.clearSettings(); + triggerModal(e, ...args) { + this.refs.ws_modal.show(e, ...args); } render() { - let options = this.props.apis.map(entry => { + const { props } = this; + let options = props.apis.map(entry => { let onlyDescription = entry.url.indexOf("fake.automatic-selection") !== -1; let {location} = entry; if (location && typeof location === "object" && "translate" in location) location = counterpart.translate(location.translate); @@ -48,8 +52,7 @@ class SyncError extends React.Component { return (