difftreelog
tests: fix contracthelpers types
in: master
1 file changed
tests/src/util/contracthelpers.tsdiffbeforeafterboth222223function deployContract(alice: IKeyringPair, code: CodePromise, constructor: string = 'default', ...args: any[]): Promise<Contract> {23function deployContract(alice: IKeyringPair, code: CodePromise, constructor: string = 'default', ...args: any[]): Promise<Contract> {24 return new Promise<Contract>(async (resolve, reject) => {24 return new Promise<Contract>(async (resolve, reject) => {25 const unsub = await code25 const unsub = await (code as any)26 .tx[constructor]({value: endowment, gasLimit}, ...args)26 .tx[constructor]({value: endowment, gasLimit}, ...args)27 .signAndSend(alice, (result) => {27 .signAndSend(alice, (result: any) => {28 if (result.status.isInBlock || result.status.isFinalized) {28 if (result.status.isInBlock || result.status.isFinalized) {29 // here we have an additional field in the result, containing the blueprint29 // here we have an additional field in the result, containing the blueprint30 resolve((result as any).contract);30 resolve((result as any).contract);