@@ -8,15 +8,15 @@ import {
8
8
webWalletURL ,
9
9
webWalletSelectors ,
10
10
tokens ,
11
- extractNumber ,
12
11
} from '../test.utils' ;
13
12
14
13
describe ( 'Liquidation Reconstitution Testing' , ( ) => {
15
14
let startTime ;
16
15
const AGORIC_NET = Cypress . env ( 'AGORIC_NET' ) . trim ( ) ;
17
16
const network =
18
17
{ local : 'local' , emerynet : 'emerynet' } [ AGORIC_NET ] || 'testnet' ;
19
-
18
+ const checkLastestAuctionValue =
19
+ network === 'local' || network === 'emerynet' ? false : true ;
20
20
const currentConfig = configMap [ network ] ;
21
21
const QUICK_WAIT =
22
22
AGORIC_NET === 'local' ? QUICK_WAIT_LOCAL : QUICK_WAIT_TESTNET ;
@@ -545,7 +545,6 @@ describe('Liquidation Reconstitution Testing', () => {
545
545
cy . fetchVStorageData ( {
546
546
url : reserveURL ,
547
547
field : 'shortfallBalance' ,
548
- latest : true ,
549
548
} ) . then ( output => {
550
549
shortfallBalance = Number (
551
550
( Number ( output . value . slice ( 1 ) ) / 1_000_000 ) . toFixed ( 2 ) ,
@@ -621,9 +620,11 @@ describe('Liquidation Reconstitution Testing', () => {
621
620
622
621
const expectedValue = 9.99 ;
623
622
cy . task ( 'info' , `Expected Value: ${ expectedValue } ` ) ;
623
+ // TODO: temporarily check second last value
624
624
cy . fetchVStorageData ( {
625
625
url : auctionURL ,
626
626
field : 'startPrice' ,
627
+ latest : checkLastestAuctionValue ,
627
628
} ) . then ( data => {
628
629
cy . calculateRatios ( data , { hasDenom : true , useValue : false } ) . then (
629
630
result => {
@@ -637,9 +638,11 @@ describe('Liquidation Reconstitution Testing', () => {
637
638
it ( 'should verify the value of startProceedsGoal' , ( ) => {
638
639
const expectedValue = 309.54 ;
639
640
cy . task ( 'info' , `Expected Value: ${ expectedValue } ` ) ;
641
+ // TODO: temporarily check second last value
640
642
cy . fetchVStorageData ( {
641
643
url : auctionURL ,
642
644
field : 'startProceedsGoal' ,
645
+ latest : checkLastestAuctionValue ,
643
646
} ) . then ( data => {
644
647
cy . calculateRatios ( data , { hasDenom : false , useValue : true } ) . then (
645
648
result => {
@@ -653,9 +656,11 @@ describe('Liquidation Reconstitution Testing', () => {
653
656
it ( 'should verify the value of startCollateral' , ( ) => {
654
657
const expectedValue = 45 ;
655
658
cy . task ( 'info' , `Expected Value: ${ expectedValue } ` ) ;
659
+ // TODO: temporarily check second last value
656
660
cy . fetchVStorageData ( {
657
661
url : auctionURL ,
658
662
field : 'startCollateral' ,
663
+ latest : checkLastestAuctionValue ,
659
664
} ) . then ( data => {
660
665
cy . calculateRatios ( data , { hasDenom : false , useValue : true } ) . then (
661
666
result => {
@@ -697,9 +702,11 @@ describe('Liquidation Reconstitution Testing', () => {
697
702
698
703
const expectedValue = 31.414987 ;
699
704
cy . task ( 'info' , `Expected Value: ${ expectedValue } ` ) ;
705
+ // TODO: temporarily check second last value
700
706
cy . fetchVStorageData ( {
701
707
url : auctionURL ,
702
708
field : 'collateralAvailable' ,
709
+ latest : checkLastestAuctionValue ,
703
710
} ) . then ( data => {
704
711
cy . calculateRatios ( data , { hasDenom : false , useValue : true } ) . then (
705
712
result => {
@@ -720,7 +727,6 @@ describe('Liquidation Reconstitution Testing', () => {
720
727
cy . fetchVStorageData ( {
721
728
url : reserveURL ,
722
729
field : 'shortfallBalance' ,
723
- latest : true ,
724
730
} )
725
731
. then ( newBalanceObj => {
726
732
let newBalance = Number (
0 commit comments