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:
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user