@@ -35,29 +35,29 @@ const compareVaultTransactionsNotLiquidated = (
35
35
expect ( expected . network ) . to . eq ( actual . network ) ;
36
36
expect ( expected . nextPriceChange ) . to . deep . equalInAnyOrder ( actual . nextPriceChange ) ;
37
37
38
- expect ( expected . liquidationRatio ) . to . deep . equalInAnyOrder ( actual . liquidationRatio ) ;
39
- expect ( expected . collateralizationRatio ) . to . deep . equalInAnyOrder ( actual . collateralizationRatio ) ;
40
- expect ( expected . proximityToLiquidation ) . to . deep . equalInAnyOrder ( actual . proximityToLiquidation ) ;
38
+ expect ( expected . liquidationRatio . toFixed ( ) ) . to . eq ( actual . liquidationRatio . toFixed ( ) ) ;
39
+ expect ( expected . collateralizationRatio . toFixed ( ) ) . to . eq ( actual . collateralizationRatio . toFixed ( ) ) ;
40
+ expect ( expected . proximityToLiquidation . toFixed ( ) ) . to . eq ( actual . proximityToLiquidation . toFixed ( ) ) ;
41
41
expect ( expected . id ) . to . eq ( actual . id ) ;
42
- expect ( expected . incentiveCombinedDai ) . to . deep . equalInAnyOrder ( actual . incentiveCombinedDai ) ;
43
- expect ( expected . incentiveRelativeDai ) . to . deep . equalInAnyOrder ( actual . incentiveRelativeDai ) ;
44
- expect ( expected . incentiveConstantDai ) . to . deep . equalInAnyOrder ( actual . incentiveConstantDai ) ;
45
- expect ( expected . grossProfitDai ) . to . deep . equalInAnyOrder ( actual . grossProfitDai ) ;
42
+ expect ( expected . incentiveCombinedDai . toFixed ( ) ) . to . eq ( actual . incentiveCombinedDai . toFixed ( ) ) ;
43
+ expect ( expected . incentiveRelativeDai . toFixed ( ) ) . to . eq ( actual . incentiveRelativeDai . toFixed ( ) ) ;
44
+ expect ( expected . incentiveConstantDai . toFixed ( ) ) . to . eq ( actual . incentiveConstantDai . toFixed ( ) ) ;
45
+ expect ( expected . grossProfitDai . toFixed ( ) ) . to . eq ( actual . grossProfitDai . toFixed ( ) ) ;
46
46
// TODO: enable the check and fix the bug with inconsistent price received
47
- // expect(expected.netProfitDai) .to.deep.equalInAnyOrder (actual.netProfitDai);
48
- expect ( expected . stabilityFeeRate ) . to . deep . equalInAnyOrder ( actual . stabilityFeeRate ) ;
49
- expect ( expected . minUnitPrice ) . to . deep . equalInAnyOrder ( actual . minUnitPrice ) ;
50
- expect ( expected . maximumProtocolDebtDai ) . to . deep . equalInAnyOrder ( actual . maximumProtocolDebtDai ) ;
51
- expect ( expected . currentProtocolDebtDai ) . to . deep . equalInAnyOrder ( actual . currentProtocolDebtDai ) ;
52
- expect ( expected . currentCollateralDebtDai ) . to . deep . equalInAnyOrder ( actual . currentCollateralDebtDai ) ;
53
- expect ( expected . maximumCollateralDebtDai ) . to . deep . equalInAnyOrder ( actual . maximumCollateralDebtDai ) ;
54
- expect ( expected . debtDai ) . to . deep . equalInAnyOrder ( actual . debtDai ) ;
55
- expect ( expected . collateralAmount ) . to . deep . equalInAnyOrder ( actual . collateralAmount ) ;
56
- expect ( expected . currentUnitPrice ) . to . deep . equalInAnyOrder ( actual . currentUnitPrice ) ;
57
- expect ( expected . nextUnitPrice ) . to . deep . equalInAnyOrder ( actual . nextUnitPrice ) ;
58
- expect ( expected . initialDebtDai ) . to . deep . equalInAnyOrder ( actual . initialDebtDai ) ;
59
- expect ( expected . liquidationPenaltyRatio ) . to . deep . equalInAnyOrder ( actual . liquidationPenaltyRatio ) ;
60
- expect ( expected . minimalAuctionedDai ) . to . deep . equalInAnyOrder ( actual . minimalAuctionedDai ) ;
47
+ // expect(expected.netProfitDai.toFixed()) .to.eq (actual.netProfitDai.toFixed() );
48
+ expect ( expected . stabilityFeeRate . toFixed ( ) ) . to . eq ( actual . stabilityFeeRate . toFixed ( ) ) ;
49
+ expect ( expected . minUnitPrice . toFixed ( ) ) . to . eq ( actual . minUnitPrice . toFixed ( ) ) ;
50
+ expect ( expected . maximumProtocolDebtDai . toFixed ( ) ) . to . eq ( actual . maximumProtocolDebtDai . toFixed ( ) ) ;
51
+ expect ( expected . currentProtocolDebtDai . toFixed ( ) ) . to . eq ( actual . currentProtocolDebtDai . toFixed ( ) ) ;
52
+ expect ( expected . currentCollateralDebtDai . toFixed ( ) ) . to . eq ( actual . currentCollateralDebtDai . toFixed ( ) ) ;
53
+ expect ( expected . maximumCollateralDebtDai . toFixed ( ) ) . to . eq ( actual . maximumCollateralDebtDai . toFixed ( ) ) ;
54
+ expect ( expected . debtDai . toFixed ( ) ) . to . eq ( actual . debtDai . toFixed ( ) ) ;
55
+ expect ( expected . collateralAmount . toFixed ( ) ) . to . eq ( actual . collateralAmount . toFixed ( ) ) ;
56
+ expect ( expected . currentUnitPrice . toFixed ( ) ) . to . eq ( actual . currentUnitPrice . toFixed ( ) ) ;
57
+ expect ( expected . nextUnitPrice . toFixed ( ) ) . to . eq ( actual . nextUnitPrice . toFixed ( ) ) ;
58
+ expect ( expected . initialDebtDai . toFixed ( ) ) . to . eq ( actual . initialDebtDai . toFixed ( ) ) ;
59
+ expect ( expected . liquidationPenaltyRatio . toFixed ( ) ) . to . eq ( actual . liquidationPenaltyRatio . toFixed ( ) ) ;
60
+ expect ( expected . minimalAuctionedDai . toFixed ( ) ) . to . eq ( actual . minimalAuctionedDai . toFixed ( ) ) ;
61
61
} ;
62
62
63
63
describe ( 'Vaults' , ( ) => {
@@ -82,8 +82,8 @@ describe('Vaults', () => {
82
82
nextPriceChange : new Date ( '2022-09-09T10:00:00.000Z' ) ,
83
83
84
84
liquidationRatio : new BigNumber ( '1.45' ) ,
85
- collateralizationRatio : new BigNumber ( '3.204790430641710905476031356 ' ) ,
86
- proximityToLiquidation : new BigNumber ( '0.547552318511616565008415095 ' ) ,
85
+ collateralizationRatio : new BigNumber ( '3.204790430641710905476031355953603471763531393 ' ) ,
86
+ proximityToLiquidation : new BigNumber ( '0.547552318511616565008415094516004867207418444 ' ) ,
87
87
liquidationPenaltyRatio : new BigNumber ( '1.13' ) ,
88
88
minimalAuctionedDai : new BigNumber ( '15000' ) ,
89
89
id : 22025 ,
@@ -141,8 +141,8 @@ describe('Vaults', () => {
141
141
nextPriceChange : new Date ( '2022-06-13T11:00:00.000Z' ) ,
142
142
143
143
liquidationRatio : new BigNumber ( 1.7 ) ,
144
- collateralizationRatio : new BigNumber ( '1.698313241866926788910221381 ' ) ,
145
- proximityToLiquidation : new BigNumber ( '-0.000993196126304112564617121 ' ) ,
144
+ collateralizationRatio : new BigNumber ( '1.698313241866926788910221380759664664393806833 ' ) ,
145
+ proximityToLiquidation : new BigNumber ( '-0.000993196126304112564617120755317536277614422 ' ) ,
146
146
liquidationPenaltyRatio : new BigNumber ( '1.13' ) ,
147
147
minimalAuctionedDai : new BigNumber ( '5000' ) ,
148
148
id : 27435 ,
0 commit comments