git.delta.rocks / unique-network / refs/commits / a8a771936e10

difftreelog

feat testUtils read testValue at specific block

Daniel Shiposha2022-10-28parent: #cb6e27c.patch.diff
in: master

1 file changed

modifiedtests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth
537 await this.helper.executeExtrinsic(signer, 'api.tx.testUtils.setTestValueAndRollback', [testVal], true);537 await this.helper.executeExtrinsic(signer, 'api.tx.testUtils.setTestValueAndRollback', [testVal], true);
538 }538 }
539539
540 async testValue() {540 async testValue(blockIdx?: number) {
541 const api = blockIdx
541 return (await this.helper.callRpc('api.query.testUtils.testValue', [])).toNumber();542 ? await this.helper.getApi().at(await this.helper.callRpc('api.rpc.chain.getBlockHash', [blockIdx]))
543 : this.helper.getApi();
544
545 return (await api.query.testUtils.testValue()).toJSON();
542 }546 }
543547
544 async justTakeFee(signer: TSigner) {548 async justTakeFee(signer: TSigner) {