Skip to content

Conversation

radik878
Copy link

The fee_provision computation incorrectly mapped both a missing fee entry and a Decimal.checked_mul failure to ExcessBalanceKeyError("fees"). This conflated a data lookup issue with a calculation overflow/invalid-state issue. Updated logic to:

  • Return ExcessBalanceKeyError("fees") only when fees.get(&account) is None.
  • Return ExcessBalanceCalculationFailed("fee_provision") when checked_mul fails.

This aligns error semantics with the rest of the function, which consistently distinguishes key-missing vs calculation failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant