File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
vm/src/hint_processor/builtin_hint_processor Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 22
33#### Upcoming Changes
44
5+ * fix: error mapping for fee_provision in excess_balance hint [ #2236 ] ( https://github.com/lambdaclass/cairo-vm/pull/2236 )
6+
57* fix: ArcTooBig parameter order in assert_le_felt. [ #2234 ] ( https://github.com/lambdaclass/cairo-vm/pull/2234 )
68
79* chore: Bump Rust toolchain to 1.89 [ #2245 ] ( https://github.com/lambdaclass/cairo-vm/pull/2245 )
Original file line number Diff line number Diff line change @@ -376,10 +376,12 @@ pub fn excess_balance_hint(
376376 . checked_add ( unrealized_funding_pnl)
377377 . and_then ( |sum| sum. checked_add ( token_assets_value_d) )
378378 . ok_or_else ( || HintError :: ExcessBalanceCalculationFailed ( "account_value" . into ( ) ) ) ?;
379- let fee_provision = fees
379+ let fee = fees
380380 . get ( & account)
381- . and_then ( |fee| abs_balance_value. checked_mul ( * fee) )
382381 . ok_or_else ( || HintError :: ExcessBalanceKeyError ( "fees" . into ( ) ) ) ?;
382+ let fee_provision = abs_balance_value
383+ . checked_mul ( * fee)
384+ . ok_or_else ( || HintError :: ExcessBalanceCalculationFailed ( "fee_provision" . into ( ) ) ) ?;
383385 let margin_requirement = position_margin
384386 . checked_add ( fee_provision)
385387 . ok_or_else ( || HintError :: ExcessBalanceCalculationFailed ( "margin_requirements" . into ( ) ) ) ?;
You can’t perform that action at this time.
0 commit comments