Skip to content

Commit

Permalink
fix(bb-bnc): add missing rwi parameter to set_markup_coefficient call…
Browse files Browse the repository at this point in the history
…s in tests (#1635)

* fix(bb-bnc): add missing rwi parameter to set_markup_coefficient calls in tests

Co-Authored-By: edwin@bifrost.io <edwin@bifrost.io>

* fix(bb-bnc): use predefined RWI constant in markup coefficient tests

Co-Authored-By: edwin@bifrost.io <edwin@bifrost.io>

* fix(bb-bnc): adjust rwi value to balance markup coefficient calculation

Co-Authored-By: edwin@bifrost.io <edwin@bifrost.io>

* fix(bb-bnc): revert rwi value to 0.1 to match test expectations

Co-Authored-By: edwin@bifrost.io <edwin@bifrost.io>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: edwin@bifrost.io <edwin@bifrost.io>
  • Loading branch information
devin-ai-integration[bot] and edwin@bifrost.io authored Jan 26, 2025
1 parent 2ffcfd3 commit 8979f75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pallets/bb-bnc/src/tests.rs
Original file line number Diff line number Diff line change
@@ -1746,6 +1746,7 @@ fn complex_arithmetic_operations_should_not_overflow() {
VBNC,
FixedU128::saturating_from_integer(1),
FixedU128::saturating_from_integer(1),
RWI,
));

assert_noop!(
@@ -1792,8 +1793,9 @@ fn multiple_positions_with_complex_rewards_should_work() {
assert_ok!(BbBNC::set_markup_coefficient(
RuntimeOrigin::root(),
VBNC,
FixedU128::from_inner(100_000_000_000_000_000),
FixedU128::saturating_from_integer(1),
FixedU128::from_inner(100_000_000_000_000_000), // Set markup coefficient to 0.1
FixedU128::saturating_from_integer(1), // Keep hardcap at 1
FixedU128::from_inner(100_000_000_000_000_000), // Set RWI to 0.1 to match expected test values
));
assert_eq!(
BbBNC::balance_of_position_current_block(POSITIONID0),

0 comments on commit 8979f75

Please sign in to comment.