Allow status updates on 2nd API instance
This commit is contained in:
parent
fcdd19e105
commit
c044534d6a
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import { handleActions } from 'redux-actions';
|
import { handleActions } from 'redux-actions';
|
||||||
|
|
||||||
const initialState = {};
|
const initialState = null;
|
||||||
|
|
||||||
export default handleActions({
|
export default handleActions({
|
||||||
setApi (state, action) {
|
setApi (state, action) {
|
||||||
|
@ -63,8 +63,6 @@ export function personalAccountsInfo (accountsInfo) {
|
|||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const { api } = getState();
|
const { api } = getState();
|
||||||
|
|
||||||
console.log('_fetchOwners', api);
|
|
||||||
|
|
||||||
const _fetchOwners = Object
|
const _fetchOwners = Object
|
||||||
.values(wallets)
|
.values(wallets)
|
||||||
.map((wallet) => {
|
.map((wallet) => {
|
||||||
|
@ -49,6 +49,10 @@ export default class Status {
|
|||||||
api.on('disconnected', this.stop, this);
|
api.on('disconnected', this.stop, this);
|
||||||
|
|
||||||
this.updateApiStatus();
|
this.updateApiStatus();
|
||||||
|
|
||||||
|
if (api.isConnected) {
|
||||||
|
this.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static instantiate (store, api) {
|
static instantiate (store, api) {
|
||||||
|
@ -41,13 +41,13 @@ export default function (api, browserHistory, forEmbed = false) {
|
|||||||
const middleware = initMiddleware(api, browserHistory, forEmbed);
|
const middleware = initMiddleware(api, browserHistory, forEmbed);
|
||||||
const store = applyMiddleware(...middleware)(storeCreation)(reducers);
|
const store = applyMiddleware(...middleware)(storeCreation)(reducers);
|
||||||
|
|
||||||
|
store.dispatch(setApi(api));
|
||||||
|
|
||||||
BalancesProvider.instantiate(store, api);
|
BalancesProvider.instantiate(store, api);
|
||||||
StatusProvider.instantiate(store, api);
|
StatusProvider.instantiate(store, api);
|
||||||
new PersonalProvider(store, api).start();
|
new PersonalProvider(store, api).start();
|
||||||
new SignerProvider(store, api).start();
|
new SignerProvider(store, api).start();
|
||||||
|
|
||||||
store.dispatch(setApi(api));
|
|
||||||
|
|
||||||
store.dispatch(startCachingReverses());
|
store.dispatch(startCachingReverses());
|
||||||
store.dispatch(loadWallet(api));
|
store.dispatch(loadWallet(api));
|
||||||
store.dispatch(initRequests(api));
|
store.dispatch(initRequests(api));
|
||||||
|
19
js/src/views/Home/package.json
Normal file
19
js/src/views/Home/package.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "@parity/view-home",
|
||||||
|
"description": "Parity default Home view",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"author": "Parity Team <admin@parity.io>",
|
||||||
|
"maintainers": [],
|
||||||
|
"contributors": [],
|
||||||
|
"license": "GPL-3.0",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/paritytech/parity.git"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"scripts": {},
|
||||||
|
"devDependencies": {},
|
||||||
|
"dependencies": {},
|
||||||
|
"peerDependencies": {}
|
||||||
|
}
|
19
js/src/views/Status/package.json
Normal file
19
js/src/views/Status/package.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "@parity/view-status",
|
||||||
|
"description": "Parity default Status view",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"author": "Parity Team <admin@parity.io>",
|
||||||
|
"maintainers": [],
|
||||||
|
"contributors": [],
|
||||||
|
"license": "GPL-3.0",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/paritytech/parity.git"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"scripts": {},
|
||||||
|
"devDependencies": {},
|
||||||
|
"dependencies": {},
|
||||||
|
"peerDependencies": {}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user