git.delta.rocks / unique-network / refs/commits / 26798c366c4f

difftreelog

Wait up to 30 minutes for the block by default

Max Andreev2022-10-31parent: #5588adf.patch.diff
in: master

1 file changed

modifiedtests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth
423 }423 }
424424
425 async forParachainBlockNumber(blockNumber: bigint, timeout?: number) {425 async forParachainBlockNumber(blockNumber: bigint, timeout?: number) {
426 timeout = timeout ?? 300_000;426 timeout = timeout ?? 30 * 60 * 1000;
427 // eslint-disable-next-line no-async-promise-executor427 // eslint-disable-next-line no-async-promise-executor
428 const promise = new Promise<void>(async (resolve) => {428 const promise = new Promise<void>(async (resolve) => {
429 const unsubscribe = await this.helper.getApi().rpc.chain.subscribeNewHeads((data: any) => {429 const unsubscribe = await this.helper.getApi().rpc.chain.subscribeNewHeads((data: any) => {
438 }438 }
439 439
440 async forRelayBlockNumber(blockNumber: bigint, timeout?: number) {440 async forRelayBlockNumber(blockNumber: bigint, timeout?: number) {
441 timeout = timeout ?? 300_000;441 timeout = timeout ?? 30 * 60 * 1000;
442 // eslint-disable-next-line no-async-promise-executor442 // eslint-disable-next-line no-async-promise-executor
443 const promise = new Promise<void>(async (resolve) => {443 const promise = new Promise<void>(async (resolve) => {
444 const unsubscribe = await this.helper.getApi().query.parachainSystem.validationData((data: any) => {444 const unsubscribe = await this.helper.getApi().query.parachainSystem.validationData((data: any) => {