Pass online/offline status indicators with staking accounts (#1265)

* staking online status

* restrict onlineStatus.online to validators

* get onlineStatus for stash/validator only

* tests

* fixes

* Add offline

* Revert stash, change to stashId, linting

* Heartbeat signature

* Make CodeClimate (slightly) happier

* keep compatibility

* change status type

* rv null possible

* cleanup
This commit is contained in:
kwingram25
2019-08-05 16:13:42 +00:00
committed by GitHub
parent 73f33d0168
commit 09ee77d0bc
9 changed files with 125 additions and 11 deletions
+2 -1
View File
@@ -13,6 +13,7 @@ import * as chain from './chain';
import * as contracts from './contracts';
import * as democracy from './democracy';
import * as elections from './elections';
import * as imOnline from './imOnline';
import * as session from './session';
import * as staking from './staking';
@@ -56,7 +57,7 @@ function injectFunctions<AllSections> (api: ApiInterfaceRx, allSections: AllSect
}, {} as unknown as DeriveSections<AllSections>);
}
export const derive = { accounts, balances, chain, contracts, democracy, elections, session, staking };
export const derive = { accounts, balances, chain, contracts, democracy, elections, imOnline, session, staking };
export type Derive = typeof derive;
// FIXME I have no idea how to get this done