@@ -123,13 +123,12 @@ describe('safientMain', async () => {
123123 const safientMain1 = new SafientMain ( beneficiarySigner , chainId ) ;
124124
125125 const beforeTotalNumberOfSafes = await safientMain1 . getTotalNumberOfSafes ( ) ;
126-
127126 // SUCCESS : create a safe(for claimType - SignalBased & signal - won't signal)
128127 await safientMain1 . syncSafe (
129128 safeCreatorAddress , // 2nd account
130129 safeId [ 1 ] ,
131130 Types . ClaimType . SignalBased ,
132- 6 , // 6 seconds because opting SignalBased
131+ 10 , // 6 seconds because opting SignalBased
133132 0 ,
134133 '' , // no metaevidence because SignalBased
135134 '' // no safe maintenence fee because SignalBased
@@ -140,7 +139,7 @@ describe('safientMain', async () => {
140139 const safe = await safientMain1 . getSafeBySafeId ( safeId [ 1 ] ) ;
141140 expect ( safe . createdBy ) . to . equal ( safeCreatorAddress ) ;
142141 expect ( safe . beneficiary ) . to . equal ( beneficiaryAddress ) ;
143- expect ( Number ( safe . signalingPeriod ) ) . to . equal ( 6 ) ; // 6 seconds
142+ expect ( Number ( safe . signalingPeriod ) ) . to . equal ( 10 ) ; // 6 seconds
144143 expect ( Number ( safe . endSignalTime ) ) . to . equal ( 0 ) ;
145144 expect ( Number ( safe . latestSignalTime ) ) . to . equal ( 0 ) ;
146145 expect ( Number ( safe . claimType ) ) . to . equal ( 0 ) ; // SignalBased
@@ -151,7 +150,7 @@ describe('safientMain', async () => {
151150 beneficiaryAddress , // 2nd account
152151 safeId [ 2 ] ,
153152 Types . ClaimType . SignalBased ,
154- 6 ,
153+ 10 ,
155154 0 ,
156155 '' ,
157156 ''
@@ -175,7 +174,7 @@ describe('safientMain', async () => {
175174 // SUCCESS : create a claim (ArbitrationBased) on safeId1
176175 const tx = await safientMain . createClaim ( safeId [ 0 ] , metaevidenceOrEvidenceURI ) ;
177176 const txReceipt = await tx . wait ( ) ;
178- claimIdOfSafeId0 = txReceipt . events [ 2 ] . args [ 2 ] ;
177+ claimIdOfSafeId0 = txReceipt . events [ 2 ] . args [ 1 ] ;
179178
180179 expect ( await safientMain . getTotalNumberOfClaims ( ) ) . to . equal ( beforeTotalNumberOfClaims + 1 ) ;
181180
@@ -192,7 +191,7 @@ describe('safientMain', async () => {
192191 // SUCCESS : create claim on safeId2
193192 tx = await safientMain . createClaim ( safeId [ 1 ] , '' ) ;
194193 txReceipt = await tx . wait ( ) ;
195- claimIdOfSafeId1 = txReceipt . events [ 0 ] . args [ 2 ] ;
194+ claimIdOfSafeId1 = parseInt ( txReceipt . events [ 0 ] . args [ 1 ] . _hex )
196195
197196 const safeWithSafeId1 = await safientMain . getSafeBySafeId ( safeId [ 1 ] ) ;
198197 expect ( safeWithSafeId1 . claimsCount ) . to . equal ( 1 ) ;
@@ -204,8 +203,7 @@ describe('safientMain', async () => {
204203 // SUCCESS : create claim on safeId3
205204 tx = await safientMain . createClaim ( safeId [ 2 ] , '' ) ;
206205 txReceipt = await tx . wait ( ) ;
207- claimIdOfSafeId2 = txReceipt . events [ 0 ] . args [ 2 ] ;
208-
206+ claimIdOfSafeId2 = parseInt ( txReceipt . events [ 0 ] . args [ 1 ] . _hex )
209207 const safeWithSafeId2 = await safientMain . getSafeBySafeId ( safeId [ 2 ] ) ;
210208 expect ( safeWithSafeId2 . claimsCount ) . to . equal ( 1 ) ;
211209
@@ -227,7 +225,7 @@ describe('safientMain', async () => {
227225 const mineNewBlock = new Promise ( ( resolve , reject ) => {
228226 setTimeout ( ( ) => {
229227 resolve ( provider . send ( 'evm_mine' ) ) ;
230- } , 7000 ) ;
228+ } , 11000 ) ;
231229 } ) ;
232230 const result = await mineNewBlock ;
233231
@@ -328,17 +326,14 @@ describe('safientMain', async () => {
328326 const safientMainBeneficiary = new SafientMain ( beneficiarySigner , chainId ) ;
329327 const safientMainAccountX = new SafientMain ( accountXSigner , chainId ) ;
330328
331- const latestBlockNumber = await provider . getBlockNumber ( ) ;
332- const latestBlock = await provider . getBlock ( latestBlockNumber ) ;
333- const now = latestBlock . timestamp ;
334329
335330 // SUCCESS : create another safe with safeId4 (for claimType - DDayBased) with DDay set to 6 seconds
336- await safientMainCreator . createSafe ( beneficiaryAddress , safeId [ 3 ] , Types . ClaimType . DDayBased , 0 , now + 6 , '' , '' ) ;
331+ await safientMainCreator . createSafe ( beneficiaryAddress , safeId [ 3 ] , Types . ClaimType . DDayBased , 0 , 6 , '' , '' ) ;
337332
338333 // create a claim - before D-Day (claim should fail)
339334 const tx1 = await safientMainBeneficiary . createClaim ( safeId [ 3 ] , '' ) ;
340335 const txReceipt1 = await tx1 . wait ( ) ;
341- const claimId1 = txReceipt1 . events [ 0 ] . args [ 2 ] ;
336+ const claimId1 = txReceipt1 . events [ 0 ] . args [ 1 ] ;
342337 const claimID1 = parseInt ( claimId1 . _hex ) ;
343338
344339 // check claim status (DDayBased)
@@ -356,7 +351,7 @@ describe('safientMain', async () => {
356351 // create a claim - before D-Day (claim should pass)
357352 const tx2 = await safientMainBeneficiary . createClaim ( safeId [ 3 ] , '' ) ;
358353 const txReceipt2 = await tx2 . wait ( ) ;
359- const claimId2 = txReceipt2 . events [ 0 ] . args [ 2 ] ;
354+ const claimId2 = txReceipt2 . events [ 0 ] . args [ 1 ] ;
360355 const claimID2 = parseInt ( claimId2 . _hex ) ;
361356
362357 // check claim status (DDayBased)
@@ -381,7 +376,7 @@ describe('safientMain', async () => {
381376 // create a claim - before D-Day (6 seconds) (claim should fail)
382377 const tx1 = await safientMainBeneficiary . createClaim ( safeId [ 4 ] , '' ) ;
383378 const txReceipt1 = await tx1 . wait ( ) ;
384- const claimId1 = txReceipt1 . events [ 0 ] . args [ 2 ] ;
379+ const claimId1 = txReceipt1 . events [ 0 ] . args [ 1 ] ;
385380 const claimID1 = parseInt ( claimId1 . _hex ) ;
386381
387382 // check claim status (DDayBased)
@@ -406,7 +401,7 @@ describe('safientMain', async () => {
406401 // create a claim - before D-Day (12 seconds) (claim should fail)
407402 const tx2 = await safientMainBeneficiary . createClaim ( safeId [ 4 ] , '' ) ;
408403 const txReceipt2 = await tx2 . wait ( ) ;
409- const claimId2 = txReceipt2 . events [ 0 ] . args [ 2 ] ;
404+ const claimId2 = txReceipt2 . events [ 0 ] . args [ 1 ] ;
410405 const claimID2 = parseInt ( claimId2 . _hex ) ;
411406
412407 // check claim status (DDayBased)
@@ -424,7 +419,7 @@ describe('safientMain', async () => {
424419 // create a claim - after D-Day (10 + 2 = 12 seconds) (claim should pass)
425420 const tx3 = await safientMainBeneficiary . createClaim ( safeId [ 4 ] , '' ) ;
426421 const txReceipt3 = await tx3 . wait ( ) ;
427- const claimId3 = txReceipt3 . events [ 0 ] . args [ 2 ] ;
422+ const claimId3 = txReceipt3 . events [ 0 ] . args [ 1 ] ;
428423 const claimID3 = parseInt ( claimId3 . _hex ) ;
429424
430425 // check claim status (DDayBased)
0 commit comments