@@ -137,6 +137,7 @@ describe("Draw Benchmark", async () => {
137
137
const tx = await arbitrable [ "createDispute(string)" ] ( "future of france" , {
138
138
value : arbitrationCost ,
139
139
} ) ;
140
+ await tx . wait ( ) ;
140
141
if ( tx . blockNumber === null ) throw new Error ( "tx.blockNumber is null" ) ;
141
142
const trace = await network . provider . send ( "debug_traceTransaction" , [ tx . hash ] ) ;
142
143
const [ disputeId ] = abiCoder . decode ( [ "uint" ] , ethers . getBytes ( `${ trace . returnValue } ` ) ) ;
@@ -208,6 +209,7 @@ describe("Draw Benchmark", async () => {
208
209
expect ( await core . getRoundInfo ( 0 , 0 ) . then ( ( round ) => round . drawIterations ) ) . to . equal ( 3 ) ;
209
210
210
211
const tx = await ( await drawTx ) . wait ( ) ;
212
+ if ( ! tx ) throw new Error ( "Failed to get transaction receipt" ) ;
211
213
expect ( tx )
212
214
. to . emit ( core , "Draw" )
213
215
. withArgs ( anyValue , 0 , 0 , 0 )
@@ -306,7 +308,7 @@ describe("Draw Benchmark", async () => {
306
308
expect ( await core . getRoundInfo ( 0 , 0 ) . then ( ( round ) => round . drawIterations ) ) . to . equal ( 3 ) ;
307
309
308
310
const tx = await ( await drawTx ) . wait ( ) ;
309
- if ( tx === null ) throw new Error ( "tx is null " ) ;
311
+ if ( ! tx ) throw new Error ( "Failed to get transaction receipt " ) ;
310
312
expect ( tx )
311
313
. to . emit ( core , "Draw" )
312
314
. withArgs ( anyValue , 0 , 0 , 0 )
@@ -368,7 +370,7 @@ describe("Draw Benchmark", async () => {
368
370
expect ( await core . getRoundInfo ( 0 , 0 ) . then ( ( round ) => round . drawIterations ) ) . to . equal ( 3 ) ;
369
371
370
372
const tx = await ( await drawTx ) . wait ( ) ;
371
- if ( tx === null ) throw new Error ( "tx is null " ) ;
373
+ if ( ! tx ) throw new Error ( "Failed to get transaction receipt " ) ;
372
374
expect ( tx )
373
375
. to . emit ( core , "Draw" )
374
376
. withArgs ( anyValue , 0 , 0 , 0 )
0 commit comments