@@ -469,17 +469,25 @@ test.describe.serial('One step process', () => {
469469 ) . toBe ( contractLiabilityStEth ) ;
470470 expect ( cliLiabilityStEthAfterRepay ) . toBe ( '0' ) ;
471471
472- const calculatedRecipientStEthBalanceAfterRepay =
473- parseFloat ( recipientStEthBalanceBeforeRepay ) -
474- parseFloat ( cliLiabilityStEthBeforeRepay ) ;
475- const recipientStEthBalanceAfterRepay = parseFloat (
476- await getStEthBalance ( repayRoleAddress ) ,
472+ const recipientStEthBalanceAfterRepay =
473+ await getStEthBalance ( repayRoleAddress ) ;
474+ const recipientStEthBalanceBeforeRepayWei = parseEther (
475+ recipientStEthBalanceBeforeRepay ,
476+ ) ;
477+ const recipientStEthBalanceAfterRepayWei = parseEther (
478+ recipientStEthBalanceAfterRepay ,
477479 ) ;
480+ const cliLiabilityStEthBeforeRepayWei = parseEther (
481+ cliLiabilityStEthBeforeRepay ,
482+ ) ;
483+
484+ const actualBalanceReduction =
485+ recipientStEthBalanceBeforeRepayWei - recipientStEthBalanceAfterRepayWei ;
478486
479487 expect (
480- recipientStEthBalanceAfterRepay ,
488+ actualBalanceReduction ,
481489 'Expect recipient stEth address reduces correct amount after burn' ,
482- ) . toBe ( calculatedRecipientStEthBalanceAfterRepay ) ;
490+ ) . toBe ( cliLiabilityStEthBeforeRepayWei ) ;
483491 } ) ;
484492
485493 test ( `Withdraw ETH as ${ ROLES . WITHDRAW } ` , async ( { ethereumNodeService } ) => {
0 commit comments