diff --git a/programs/uxd/tests/unit_tests/utils/calculate_depositories_mint_collateral_amount.rs b/programs/uxd/tests/unit_tests/utils/calculate_depositories_mint_collateral_amount.rs index e6bc8492a..605067b6d 100644 --- a/programs/uxd/tests/unit_tests/utils/calculate_depositories_mint_collateral_amount.rs +++ b/programs/uxd/tests/unit_tests/utils/calculate_depositories_mint_collateral_amount.rs @@ -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), @@ -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), @@ -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), @@ -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), @@ -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(), diff --git a/programs/uxd/tests/unit_tests/utils/calculate_depositories_redeemable_amount.rs b/programs/uxd/tests/unit_tests/utils/calculate_depositories_redeemable_amount.rs index 5081f67e9..9c7085c8e 100644 --- a/programs/uxd/tests/unit_tests/utils/calculate_depositories_redeemable_amount.rs +++ b/programs/uxd/tests/unit_tests/utils/calculate_depositories_redeemable_amount.rs @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/programs/uxd/tests/unit_tests/utils/calculate_depositories_sum_value.rs b/programs/uxd/tests/unit_tests/utils/calculate_depositories_sum_value.rs index 80b9a861f..da23d02fe 100644 --- a/programs/uxd/tests/unit_tests/utils/calculate_depositories_sum_value.rs +++ b/programs/uxd/tests/unit_tests/utils/calculate_depositories_sum_value.rs @@ -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, diff --git a/programs/uxd/tests/unit_tests/utils/calculate_depositories_target_redeemable_amount.rs b/programs/uxd/tests/unit_tests/utils/calculate_depositories_target_redeemable_amount.rs index 8d0a29a9f..ff1ebc7ef 100644 --- a/programs/uxd/tests/unit_tests/utils/calculate_depositories_target_redeemable_amount.rs +++ b/programs/uxd/tests/unit_tests/utils/calculate_depositories_target_redeemable_amount.rs @@ -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( @@ -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 { @@ -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 { @@ -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 { @@ -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(),