Skip to content

Commit

Permalink
try-fix-ci-4
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-vincent committed Aug 17, 2024
1 parent 1f90c84 commit 4022762
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod test_calculate_depositories_mint_collateral_amount {
// Compute
let depositories_mint_collateral_amount = calculate_depositories_mint_collateral_amount(
ui_to_native_amount(1_000_000),
&vec![
&[
// identity_depository has available space to mint
DepositoryInfoForMintCollateralAmount {
target_redeemable_amount: ui_to_native_amount(1_000_000),
Expand Down Expand Up @@ -60,7 +60,7 @@ mod test_calculate_depositories_mint_collateral_amount {
// Compute
let depositories_mint_collateral_amount = calculate_depositories_mint_collateral_amount(
ui_to_native_amount(1_000_000),
&vec![
&[
// identity_depository is overflowing
DepositoryInfoForMintCollateralAmount {
target_redeemable_amount: ui_to_native_amount(1_000_000),
Expand Down Expand Up @@ -100,7 +100,7 @@ mod test_calculate_depositories_mint_collateral_amount {
// Compute
let depositories_mint_collateral_amount = calculate_depositories_mint_collateral_amount(
ui_to_native_amount(1_000_000),
&vec![
&[
// identity_depository is overflowing
DepositoryInfoForMintCollateralAmount {
target_redeemable_amount: ui_to_native_amount(1_000_000),
Expand Down Expand Up @@ -140,7 +140,7 @@ mod test_calculate_depositories_mint_collateral_amount {
// Compute
let result = calculate_depositories_mint_collateral_amount(
ui_to_native_amount(1_000_000),
&vec![
&[
// identity_depository is overflowing
DepositoryInfoForMintCollateralAmount {
target_redeemable_amount: ui_to_native_amount(1_000_000),
Expand Down Expand Up @@ -195,7 +195,7 @@ mod test_calculate_depositories_mint_collateral_amount {
// Compute
let result = calculate_depositories_mint_collateral_amount(
requested_mint_collateral_amount,
&vec![
&[
DepositoryInfoForMintCollateralAmount {
target_redeemable_amount: identity_depository_target_redeemable_amount,
redeemable_amount_under_management: identity_depository_redeemable_amount_under_management.into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mod test_calculate_depositories_redeemable_amount {
// Compute
let depositories_redeemable_amount = calculate_depositories_redeemable_amount(
ui_to_native_amount(1_000_000),
&vec![
&[
// identity_depository is overflowing by a little bit
DepositoryInfoForRedeemableAmount {
is_liquid: true,
Expand Down Expand Up @@ -61,7 +61,7 @@ mod test_calculate_depositories_redeemable_amount {
// Compute
let depositories_redeemable_amount = calculate_depositories_redeemable_amount(
ui_to_native_amount(1_000_000),
&vec![
&[
// identity_depository is not filled up (underflow)
DepositoryInfoForRedeemableAmount {
is_liquid: true,
Expand Down Expand Up @@ -104,7 +104,7 @@ mod test_calculate_depositories_redeemable_amount {
// Compute
let depositories_redeemable_amount = calculate_depositories_redeemable_amount(
ui_to_native_amount(1_000_000),
&vec![
&[
// identity_depository is perfectly balanced
DepositoryInfoForRedeemableAmount {
is_liquid: true,
Expand Down Expand Up @@ -148,7 +148,7 @@ mod test_calculate_depositories_redeemable_amount {
// Compute
let depositories_redeemable_amount = calculate_depositories_redeemable_amount(
ui_to_native_amount(1_000_000),
&vec![
&[
// identity_depository is overflowing by a little bit
DepositoryInfoForRedeemableAmount {
is_liquid: true,
Expand Down Expand Up @@ -193,7 +193,7 @@ mod test_calculate_depositories_redeemable_amount {
// Compute
let depositories_redeemable_amount = calculate_depositories_redeemable_amount(
ui_to_native_amount(1_000_000),
&vec![
&[
// identity_depository is underweight
DepositoryInfoForRedeemableAmount {
is_liquid: true,
Expand Down Expand Up @@ -261,7 +261,7 @@ mod test_calculate_depositories_redeemable_amount {
let result =
calculate_depositories_redeemable_amount(
requested_redeemable_amount,
&vec![
&[
DepositoryInfoForRedeemableAmount {
is_liquid: true,
target_redeemable_amount: identity_depository_target_redeemable_amount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mod test_calculate_depositories_sum_value {
mercurial_vault_depository_value: u64,
credix_lp_depository_value: u64,
)| {
let depositories_value = vec![
let depositories_value = [
identity_depository_value,
mercurial_vault_depository_value,
credix_lp_depository_value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mod test_calculate_depositories_target_redeemable_amount {
circulating_supply.into(),
// Weights adds up to 100% and are not evenly distributed
// Each depository can fit at least the whole circulating supply (no overflow possible)
&vec![
&[
DepositoryInfoForTargetRedeemableAmount {
weight_bps: percent_to_weight_bps(5),
redeemable_amount_under_management_cap: percent_of_supply(
Expand Down Expand Up @@ -80,7 +80,7 @@ mod test_calculate_depositories_target_redeemable_amount {
let depositories_target_redeemable_amount =
calculate_depositories_target_redeemable_amount(
circulating_supply.into(),
&vec![
&[
// Weights adds up to 100% and the identity depository receives everything
// The identity depository is fully overflowing, but the other have enough space
DepositoryInfoForTargetRedeemableAmount {
Expand Down Expand Up @@ -133,7 +133,7 @@ mod test_calculate_depositories_target_redeemable_amount {
let depositories_target_redeemable_amount =
calculate_depositories_target_redeemable_amount(
circulating_supply.into(),
&vec![
&[
// Weights adds up to 100% and the identity depository receives everything
// The identity depository is overflowing, mercurial a lot of space and credix has a tiny space
DepositoryInfoForTargetRedeemableAmount {
Expand Down Expand Up @@ -188,7 +188,7 @@ mod test_calculate_depositories_target_redeemable_amount {
let depositories_target_redeemable_amount =
calculate_depositories_target_redeemable_amount(
circulating_supply.into(),
&vec![
&[
// Weights adds up to 100%, somewhat fair split
// All depositories are oveflowing, except the identity depository, but the total cannot fit in all depositories
DepositoryInfoForTargetRedeemableAmount {
Expand Down Expand Up @@ -275,7 +275,7 @@ mod test_calculate_depositories_target_redeemable_amount {
let depositories_target_redeemable_amount =
calculate_depositories_target_redeemable_amount(
circulating_supply.into(),
&vec![
&[
DepositoryInfoForTargetRedeemableAmount {
weight_bps: u16::try_from(identity_depository_weight_bps).unwrap(),
redeemable_amount_under_management_cap: identity_depository_hard_cap.into(),
Expand Down

0 comments on commit 4022762

Please sign in to comment.