Skip to content

Commit 296cb4e

Browse files
committed
refactor: Remove legacy InternalBalance struct, align PositionView with receipt pattern
- Remove InternalBalance struct and its recordDeposit/recordWithdrawal methods - Refactor PositionView to use separate creditBalances/debitBalances dictionaries - Update healthFactor() pure helper to iterate over separate balance dictionaries - Update maxWithdraw() to accept withdrawType instead of InternalBalance - Update buildPositionView() to populate new structure directly from receipts - Update quoteLiquidation() to use new PositionView structure - Update phase0_pure_math_test.cdc to use new PositionView signature All 45 tests passing.
1 parent d012440 commit 296cb4e

2 files changed

Lines changed: 149 additions & 216 deletions

File tree

0 commit comments

Comments
 (0)