Convert all type/* (and some primitives) to srml/* (#1189)

* Convert (almost-all) non-primitives (and some primitives) to srml/*

* Move Vote to primitives, remove type folder

* Move Balance :-o

* Fixup tests, override Balance.toRaw()
This commit is contained in:
Jaco Greeff
2019-07-25 16:34:47 +02:00
committed by GitHub
parent 6d65095ee0
commit 39323a8896
112 changed files with 489 additions and 794 deletions
+3 -1
View File
@@ -2,10 +2,12 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { BlockNumber } from '@polkadot/types/srml/types';
import { Observable } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import { ApiInterfaceRx } from '@polkadot/api/types';
import { BlockNumber, Header } from '@polkadot/types';
import { Header } from '@polkadot/types';
import { drr } from '../util/drr';
@@ -2,10 +2,12 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { BlockNumber } from '@polkadot/types/srml/types';
import { Observable } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import { ApiInterfaceRx } from '@polkadot/api/types';
import { BlockNumber, Header } from '@polkadot/types';
import { Header } from '@polkadot/types';
import { drr } from '../util/drr';
@@ -2,10 +2,12 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { BlockNumber } from '@polkadot/types/srml/types';
import { Observable, combineLatest } from 'rxjs';
import { map } from 'rxjs/operators';
import { ApiInterfaceRx } from '@polkadot/api/types';
import { BlockNumber } from '@polkadot/types';
import { createType } from '@polkadot/types';
import { drr } from '../util/drr';
import { bestNumber } from './bestNumber';
@@ -31,7 +33,7 @@ export function bestNumberLag (api: ApiInterfaceRx): () => Observable<BlockNumbe
bestNumberFinalized(api)()
]).pipe(
map(([bestNumber, bestNumberFinalized]): BlockNumber =>
new BlockNumber(bestNumber.sub(bestNumberFinalized))
createType('BlockNumber', bestNumber.sub(bestNumberFinalized))
),
drr()
);