@@ -222,10 +222,6 @@ fn withdraw_single_user_supply_borrow_full_cycle() {
222222 state. change_timestamp ( 1740275066 ) ;
223223 state. update_markets ( & supplier, markets. clone ( ) ) ;
224224
225- // Get balances after interest accrual
226- let initial_collateral = state. get_collateral_amount_for_token ( 1 , EGLD_TOKEN ) ;
227- let initial_borrow = state. get_borrow_amount_for_token ( 1 , EGLD_TOKEN ) ;
228-
229225 // Repay exact borrow amount with interest
230226 state. repay_asset_deno (
231227 & supplier,
@@ -234,12 +230,6 @@ fn withdraw_single_user_supply_borrow_full_cycle() {
234230 1 ,
235231 ) ;
236232
237- // Check market state after repayment
238- let reserve = state. get_market_reserves ( state. egld_market . clone ( ) ) ;
239- let revenue = state. get_market_revenue ( state. egld_market . clone ( ) ) ;
240- let borrow_index = state. get_market_borrow_index ( state. egld_market . clone ( ) ) ;
241- let supply_index = state. get_market_supply_index ( state. egld_market . clone ( ) ) ;
242-
243233 state. change_timestamp ( 1740275594 ) ;
244234 state. update_markets ( & supplier, markets. clone ( ) ) ;
245235
@@ -255,10 +245,6 @@ fn withdraw_single_user_supply_borrow_full_cycle() {
255245 ) ;
256246
257247 state. update_markets ( & supplier, markets. clone ( ) ) ;
258-
259- // Verify final market state
260- let final_reserve = state. get_market_reserves ( state. egld_market . clone ( ) ) ;
261- let final_revenue = state. get_market_revenue ( state. egld_market . clone ( ) ) ;
262248}
263249
264250/// Tests withdrawal with prior market index update to ensure proper accounting.
@@ -306,7 +292,6 @@ fn withdraw_with_prior_index_update_success() {
306292 state. update_markets ( & supplier, markets. clone ( ) ) ;
307293
308294 // Get current positions
309- let initial_collateral = state. get_collateral_amount_for_token ( 1 , EGLD_TOKEN ) ;
310295 let initial_borrow = state. get_borrow_amount_for_token ( 1 , EGLD_TOKEN ) ;
311296
312297 // Repay full borrow amount
@@ -320,13 +305,6 @@ fn withdraw_with_prior_index_update_success() {
320305 // Update markets after repayment
321306 state. update_markets ( & supplier, markets. clone ( ) ) ;
322307
323- // Record market state
324- let reserve = state. get_market_reserves ( state. egld_market . clone ( ) ) ;
325- let revenue = state. get_market_revenue ( state. egld_market . clone ( ) ) ;
326- let total_deposit = state. get_market_supplied ( state. egld_market . clone ( ) ) ;
327- let borrow_index = state. get_market_borrow_index ( state. egld_market . clone ( ) ) ;
328- let supply_index = state. get_market_supply_index ( state. egld_market . clone ( ) ) ;
329-
330308 state. change_timestamp ( 1740275594 ) ;
331309
332310 // Update markets twice to ensure proper synchronization
@@ -336,21 +314,13 @@ fn withdraw_with_prior_index_update_success() {
336314 // Get final collateral after all updates
337315 let final_collateral = state. get_collateral_amount_for_token ( 1 , EGLD_TOKEN ) ;
338316
339- // Calculate expected difference
340- let diff = ( reserve. clone ( ) . into_signed ( ) - final_collateral. clone ( ) . into_signed ( ) )
341- - revenue. clone ( ) . into_signed ( ) ;
342-
343317 // Withdraw full collateral
344318 state. withdraw_asset_den (
345319 & supplier,
346320 EGLD_TOKEN ,
347321 final_collateral. into_raw_units ( ) . clone ( ) ,
348322 1 ,
349323 ) ;
350-
351- // Verify final reserves and revenue
352- let final_reserve = state. get_market_reserves ( state. egld_market . clone ( ) ) ;
353- let final_revenue = state. get_market_revenue ( state. egld_market . clone ( ) ) ;
354324}
355325
356326/// Tests that withdrawal triggering self-liquidation is prevented.
0 commit comments