Remove onCall, use decorateMethod (#987)

* update signature of doublemap storage function

* add test cases

* update doublemap implementation

* update implementation

* remove duplicate test case

* update test cases

* Add hkt

* Fix derive types

* Make derive work

* Fix some bugs

* Fix some bugs

* More stuff

* Make some more stuff work

* Fix types in derive

* Fix all tests in derive

* Change back ApiType

* Remove vscode

* Fix Submittables

* Fix some errors

* Fix some bugs

* Change some stuff

* Fix merge conflict

* Fix types

* Add console.log

* Add console.log

* Re-add decorateMethod

* Fix tests

* Skip e2e

* Small fixes

* Fix signAndSend

* Fix typings in test

* Fix lint

* Add comments

* One line

* Remove useless

* URI->ApiType

* Indentation
This commit is contained in:
Amaury Martiny
2019-06-14 12:12:53 +02:00
committed by GitHub
parent ce310decf0
commit 63846ac367
26 changed files with 509 additions and 513 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import { AccountId, AccountIndex, Address, Balance, BalanceLock, BlockNumber, In
import { bnMax } from '@polkadot/util';
import { idAndIndex } from '../accounts/idAndIndex';
import { bestNumber } from '../chain/bestNumber';
import { DerivedBalances } from '../types';
import { drr } from '../util/drr';
@@ -78,7 +79,7 @@ export function all (api: ApiInterface$Rx) {
(accountId
? combineLatest([
of(accountId),
api.derive.chain.bestNumber(),
bestNumber(api)(),
api.queryMulti([
[api.query.balances.freeBalance, accountId],
[api.query.balances.reservedBalance, accountId],
@@ -17,7 +17,7 @@ export function votingBalancesNominatorsFor (api: ApiInterface$Rx) {
return idAndIndex(api)(address).pipe(
switchMap(([accountId]) =>
accountId
? (api.query.staking.nominatorsFor(accountId) as Observable<Vector<AccountId>>)
? (api.query.staking.nominatorsFor<Vector<AccountId>>(accountId))
: of([] as Array<AccountId>)
),
switchMap(votingBalances(api)),