Swap CodecArg usage to unknown (#3845)

* Swap CodecArg usage to unknown

* Adjust Constructor defintion
This commit is contained in:
Jaco
2021-08-05 12:27:51 +02:00
committed by GitHub
parent 9961595634
commit a80df7d846
12 changed files with 73 additions and 84 deletions
+1 -2
View File
@@ -3,7 +3,6 @@
import type { SubmittableResult } from '@polkadot/api';
import type { EventRecord } from '@polkadot/types/interfaces';
import type { CodecArg } from '@polkadot/types/types';
import type { BN } from '@polkadot/util';
import type { BlueprintOptions, ContractOptions } from './types';
@@ -29,7 +28,7 @@ export function isOptions <T> (options: BigInt | string | number | BN | T): opti
return !(isBn(options) || isBigInt(options) || isNumber(options) || isString(options));
}
export function extractOptions <T extends TOptions> (value: BigInt | string | number | BN, params: CodecArg[]): [T, CodecArg[]] {
export function extractOptions <T extends TOptions> (value: BigInt | string | number | BN, params: unknown[]): [T, unknown[]] {
const gasLimit = params.shift() as BN;
return [{ gasLimit, value } as T, params];