Don't make types depend on api (dev deps) (#1869)

* Don't make types depend on api (dev deps)

* Naming cleanups

* Remove skipped tests

* Splt types/types into chunks

* Re-add setChainProperties (properties?: ChainProperties): void;
This commit is contained in:
Jaco Greeff
2020-02-16 13:13:56 +01:00
committed by GitHub
parent 1ddad84d7e
commit 6e535b0502
15 changed files with 556 additions and 505 deletions
+3 -3
View File
@@ -2,9 +2,9 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { ApiTypes, DecorateMethod, SubmittableResultImpl } from '@polkadot/api/types';
import { ApiTypes, DecorateMethod } from '@polkadot/api/types';
import { AccountId, Address, Hash } from '@polkadot/types/interfaces';
import { IKeyringPair } from '@polkadot/types/types';
import { IKeyringPair, ISubmittableResult } from '@polkadot/types/types';
import { ApiObject, ContractABIPre } from '../types';
import BN from 'bn.js';
@@ -27,7 +27,7 @@ export interface BlueprintCreate<ApiType extends ApiTypes> {
class BlueprintCreateResult<ApiType extends ApiTypes> extends SubmittableResult {
public readonly contract?: Contract<ApiType>;
constructor (result: SubmittableResultImpl, contract?: Contract<ApiType>) {
constructor (result: ISubmittableResult, contract?: Contract<ApiType>) {
super(result);
this.contract = contract;
+4 -4
View File
@@ -2,9 +2,9 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { ApiTypes, DecorateMethod, SubmittableResultImpl } from '@polkadot/api/types';
import { ApiTypes, DecorateMethod } from '@polkadot/api/types';
import { AccountId, Address, Hash } from '@polkadot/types/interfaces';
import { IKeyringPair } from '@polkadot/types/types';
import { IKeyringPair, ISubmittableResult } from '@polkadot/types/types';
import { ApiObject, ContractABIPre } from '../types';
import BN from 'bn.js';
@@ -27,7 +27,7 @@ export interface CodePutCode<ApiType extends ApiTypes> {
class CodePutCodeResult<ApiType extends ApiTypes> extends SubmittableResult {
public readonly blueprint?: Blueprint<ApiType>;
constructor (result: SubmittableResultImpl, blueprint?: Blueprint<ApiType>) {
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType>) {
super(result);
this.blueprint = blueprint;
@@ -55,7 +55,7 @@ export default class Code<ApiType extends ApiTypes> extends BaseWithTx<ApiType>
};
}
private createResult = (result: SubmittableResultImpl): CodePutCodeResult<ApiType> => {
private createResult = (result: ISubmittableResult): CodePutCodeResult<ApiType> => {
let blueprint: Blueprint<ApiType> | undefined;
if (result.isInBlock) {