Remove injectDefinitions import, prefer injector (#1195)

* Convert RPC classes to primitive classes or /srml types

* Lint passes... lokking at tests next.

* Tests pass.

* Types with basic docs (lots of work here)

* Update StorageKey.spec.ts

* Add injector to metadata doc generation

* Fix import

* Remove injectDefinitions import, prefer injector
This commit is contained in:
Jaco Greeff
2019-07-26 11:12:17 +02:00
committed by GitHub
parent 478f54c703
commit 700eb7e1f4
34 changed files with 80 additions and 169 deletions
+2 -3
View File
@@ -2,13 +2,14 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import '@polkadot/types/injector';
import { Balance } from '@polkadot/types/srml/types';
import { Codec } from '@polkadot/types/types';
import fromMetadata from '@polkadot/api-metadata/storage/fromMetadata';
import { Storage } from '@polkadot/api-metadata/storage/types';
import Metadata from '@polkadot/types/Metadata';
import { injectDefinitions } from '@polkadot/types/srml';
import rpcMetadataV3 from '@polkadot/types/Metadata/v3/static';
import rpcMetadataV4 from '@polkadot/types/Metadata/v4/static';
import rpcMetadataV5 from '@polkadot/types/Metadata/v5/static';
@@ -33,8 +34,6 @@ function formattingTests (version: string, storage: Storage, encodedValues: [str
let provider: any;
beforeEach((): void => {
injectDefinitions();
provider = {
send: jest.fn((method, [key]): Promise<any> =>
Promise.resolve(