Skip to content

Commit

Permalink
Fix ChainStore failing to notify after reset and latency check counter
Browse files Browse the repository at this point in the history
  • Loading branch information
svk31 committed Oct 14, 2017
1 parent 8f734ed commit 0fbdddb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/routerTransition.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import AccountStore from "stores/AccountStore";
import ls from "common/localStorage";
const STORAGE_KEY = "__graphene__";
const ss = new ls(STORAGE_KEY);
const latencyChecks = ss.get("latencyChecks", 1);
let latencyChecks;
import counterpart from "counterpart";

// Actions
Expand Down Expand Up @@ -54,9 +54,10 @@ const filterAndSortURLs = (count, latencies) => {


let _connectInProgress = false;
let _connectionCheckPromise = null
let _connectionCheckPromise = null;
const willTransitionTo = (nextState, replaceState, callback, appInit=true) => { //appInit is true when called via router onEnter, and false when node is manually selected in access settings
const apiLatencies = SettingsStore.getState().apiLatencies;
latencyChecks = ss.get("latencyChecks", 1);
let apiLatenciesCount = Object.keys(apiLatencies).length;
let connectionStart;

Expand Down Expand Up @@ -92,7 +93,6 @@ const willTransitionTo = (nextState, replaceState, callback, appInit=true) => {
if (!autoSelection) SettingsActions.changeSetting({setting: "apiServer", value: currentUrl});
if (!(currentUrl in apiLatencies)) {
apiLatencies[currentUrl] = new Date().getTime() - connectionStart;
console.log("set latency to:", apiLatencies[currentUrl]);
}
}
const currentChain = Apis.instance().chain_id;
Expand Down Expand Up @@ -154,7 +154,7 @@ const willTransitionTo = (nextState, replaceState, callback, appInit=true) => {
};

var onResetError = (err) => {
console.log("err:", err);
console.log("onResetError:", err);
oldChain = "old";
connect = true;
notify.addNotification({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"alt-container": "^1.0.0",
"alt-react": "0.0.1",
"bignumber.js": "^4.0.0",
"bitsharesjs": "^1.3.3",
"bitsharesjs": "^1.3.4",
"classnames": "^2.2.1",
"cookies-js": "^1.2.1",
"counterpart": "^0.17.1",
Expand Down

0 comments on commit 0fbdddb

Please sign in to comment.