This repository was archived by the owner on Dec 21, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -648,16 +648,16 @@ export class DataUnion {
648648 const helper = this . getContracts ( )
649649 const sidechainAmb = await helper . getSidechainAmb ( )
650650 const mainnetAmb = await helper . getMainnetAmb ( )
651- const message = await sidechainAmb . message ( messageHash )
652651
652+ log ( `Waiting until sidechain AMB has collected required signatures for hash=${ messageHash } ...` )
653+ await until ( async ( ) => helper . requiredSignaturesHaveBeenCollected ( messageHash ) , pollingIntervalMs , retryTimeoutMs )
654+
655+ const message = await sidechainAmb . message ( messageHash )
653656 if ( message === '0x' ) {
654657 throw new Error ( `Message with hash=${ messageHash } not found` )
655658 }
656659 const messageId = '0x' + message . substr ( 2 , 64 )
657660
658- log ( `Waiting until sidechain AMB has collected required signatures for hash=${ messageHash } ...` )
659- await until ( async ( ) => helper . requiredSignaturesHaveBeenCollected ( messageHash ) , pollingIntervalMs , retryTimeoutMs )
660-
661661 log ( `Checking mainnet AMB hasn't already processed messageId=${ messageId } ` )
662662 const alreadySent = await mainnetAmb . messageCallStatus ( messageId )
663663 const failAddress = await mainnetAmb . failedMessageSender ( messageId )
You can’t perform that action at this time.
0 commit comments