Remove derive {Struct,Vector}Any (new typing magic) (#1019)

* Remove derive {Struct,Vector}Any (new typing magic)

* Import ordering

* Small lint fix
This commit is contained in:
Jaco Greeff
2019-06-17 10:41:32 +02:00
committed by GitHub
parent 683ed396c2
commit 22bf06e6e0
11 changed files with 57 additions and 73 deletions
+3 -3
View File
@@ -5,7 +5,7 @@
import { combineLatest, of, Observable } from 'rxjs';
import { map, switchMap } from 'rxjs/operators';
import { ApiInterface$Rx } from '@polkadot/api/types';
import { AccountId, AccountIndex, Address, Balance, BalanceLock, BlockNumber, Index, StructAny, Option, VestingSchedule } from '@polkadot/types';
import { AccountId, AccountIndex, Address, Balance, BalanceLock, BlockNumber, Index, Option, VestingSchedule } from '@polkadot/types';
import { bnMax } from '@polkadot/util';
import { idAndIndex } from '../accounts/idAndIndex';
@@ -44,7 +44,7 @@ function calcBalances ([accountId = EMPTY_ACCOUNT, bestNumber = ZERO, [freeBalan
// (most probably due to movements from stash -> controller -> free)
const availableBalance = bnMax(ZERO, vestedBalance.sub(lockedBalance));
return new StructAny({
return {
accountId,
accountNonce,
availableBalance,
@@ -53,7 +53,7 @@ function calcBalances ([accountId = EMPTY_ACCOUNT, bestNumber = ZERO, [freeBalan
reservedBalance,
vestedBalance,
votingBalance: freeBalance.add(reservedBalance)
}) as DerivedBalances;
} as DerivedBalances;
}
/**