Skip to content

Commit

Permalink
replaced unnecessary calculations with SECONDS_IN_A_WEEK constant (#9269
Browse files Browse the repository at this point in the history
)

Co-authored-by: Nina Barbakadze <ninabarbakadze@ninas-mbp.localdomain>
Co-authored-by: Martín Volpe <volpe@clabs.co>
  • Loading branch information
3 people authored Mar 7, 2022
1 parent 4625c3f commit ca4afce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/protocol/test/stability/grandamento.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ contract('GrandaMento', (accounts: string[]) => {
})

describe('#setVetoPeriodSeconds', () => {
const newVetoPeriodSeconds = 60 * 60 * 24 * 7 // 7 days
const newVetoPeriodSeconds = SECONDS_IN_A_WEEK
it('sets the spread', async () => {
await grandaMento.setVetoPeriodSeconds(newVetoPeriodSeconds)
assertEqualBN(await grandaMento.vetoPeriodSeconds(), newVetoPeriodSeconds)
Expand All @@ -1184,7 +1184,7 @@ contract('GrandaMento', (accounts: string[]) => {
})

it('reverts when the veto period is greater than 4 weeks', async () => {
const fourWeeks = 60 * 60 * 24 * 7 * 4
const fourWeeks = SECONDS_IN_A_WEEK * 4
await assertRevertWithReason(
grandaMento.setVetoPeriodSeconds(fourWeeks + 1),
'Veto period cannot exceed 4 weeks'
Expand Down

0 comments on commit ca4afce

Please sign in to comment.