Skip to content

Commit

Permalink
chore: More annoying timestamp issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alsco77 committed Aug 24, 2021
1 parent 3ec4f7a commit e994e75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/governance/incentivised-voting-lockup-gov.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ describe("IncentivisedVotingLockup", () => {
* SETUP
*/
const MAXTIME = await votingLockup.MAXTIME()
const tolerance = "0.03" // 0.03% | 0.00003 | 3e14
const tolerance = "0.04" // 0.04% | 0.00004 | 4e14
const alice = sa.dummy1
const bob = sa.dummy2
const amount = simpleToExactAmount(1000, DEFAULT_DECIMALS)
Expand Down
10 changes: 5 additions & 5 deletions test/savings/savings-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ describe("SavingsManager", async () => {
await mUSD.setAmountForCollectInterest(interest_40)
await savingsManager.collectAndDistributeInterest(mUSD.address)
const lastCollection_40 = await savingsManager.lastCollection(mUSD.address)
assertBNClose(lastCollection_40, curTime, 3)
assertBNClose(lastCollection_40, curTime, 5)
const lastPeriodStart_40 = await savingsManager.lastPeriodStart(mUSD.address)
expect(lastPeriodStart_40).eq(lastCollection_40)
const periodYield_40 = await savingsManager.periodYield(mUSD.address)
Expand All @@ -846,7 +846,7 @@ describe("SavingsManager", async () => {
await mUSD.setAmountForCollectInterest(interest_50)
await savingsManager.collectAndDistributeInterest(mUSD.address)
const lastCollection_50 = await savingsManager.lastCollection(mUSD.address)
assertBNClose(lastCollection_50, curTime, 3)
assertBNClose(lastCollection_50, curTime, 5)
const lastPeriodStart_50 = await savingsManager.lastPeriodStart(mUSD.address)
expect(lastPeriodStart_50).eq(lastCollection_40)
const periodYield_50 = await savingsManager.periodYield(mUSD.address)
Expand All @@ -859,7 +859,7 @@ describe("SavingsManager", async () => {
await mUSD.setAmountForCollectInterest(interest_65)
await savingsManager.collectAndDistributeInterest(mUSD.address)
const lastCollection_65 = await savingsManager.lastCollection(mUSD.address)
assertBNClose(lastCollection_65, curTime, 3)
assertBNClose(lastCollection_65, curTime, 5)
const lastPeriodStart_65 = await savingsManager.lastPeriodStart(mUSD.address)
expect(lastPeriodStart_65).eq(lastCollection_40)
const periodYield_65 = await savingsManager.periodYield(mUSD.address)
Expand All @@ -872,7 +872,7 @@ describe("SavingsManager", async () => {
await mUSD.setAmountForCollectInterest(interest_80)
await savingsManager.collectAndDistributeInterest(mUSD.address)
const lastCollection_80 = await savingsManager.lastCollection(mUSD.address)
assertBNClose(lastCollection_80, curTime, 3)
assertBNClose(lastCollection_80, curTime, 5)
const lastPeriodStart_80 = await savingsManager.lastPeriodStart(mUSD.address)
expect(lastPeriodStart_80).eq(lastCollection_65)
const periodYield_80 = await savingsManager.periodYield(mUSD.address)
Expand All @@ -885,7 +885,7 @@ describe("SavingsManager", async () => {
await mUSD.setAmountForCollectInterest(interest_120)
await savingsManager.collectAndDistributeInterest(mUSD.address)
const lastCollection_120 = await savingsManager.lastCollection(mUSD.address)
assertBNClose(lastCollection_120, curTime, 3)
assertBNClose(lastCollection_120, curTime, 5)
const lastPeriodStart_120 = await savingsManager.lastPeriodStart(mUSD.address)
expect(lastPeriodStart_120).eq(lastCollection_120)
const periodYield_120 = await savingsManager.periodYield(mUSD.address)
Expand Down

0 comments on commit e994e75

Please sign in to comment.