diff --git a/crates/redeem/rpc/src/lib.rs b/crates/redeem/rpc/src/lib.rs index ac4afcef83..3a65641a9e 100644 --- a/crates/redeem/rpc/src/lib.rs +++ b/crates/redeem/rpc/src/lib.rs @@ -34,7 +34,7 @@ where #[method(name = "redeem_getVaultRedeemRequests")] fn get_vault_redeem_requests(&self, vault_id: AccountId, at: Option) -> RpcResult>; - #[method(name = "redeem_getPremiumRedeemVaults", aliases = ["redeem_getPremiumRedeemVaults"])] + #[method(name = "redeem_getPremiumRedeemVaults", aliases = ["vaultRegistry_getPremiumRedeemVaults"])] fn get_premium_redeem_vaults(&self, at: Option) -> RpcResult)>>; } diff --git a/crates/vault-registry/src/tests.rs b/crates/vault-registry/src/tests.rs index aa34564d18..99c47abae0 100644 --- a/crates/vault-registry/src/tests.rs +++ b/crates/vault-registry/src/tests.rs @@ -996,6 +996,7 @@ mod get_vaults_below_premium_collaterlization_tests { VaultRegistry::_set_premium_redeem_threshold(DEFAULT_CURRENCY_PAIR, FixedU128::one()); ext::fee::premium_redeem_reward_rate::.mock_safe(move || MockResult::Return(1.into())); ext::oracle::get_price::.mock_safe(move |_| MockResult::Return(Ok(1.into()))); + ext::fee::get_redeem_fee_value::.mock_safe(move || MockResult::Return(FixedU128::from_float(0.005))); test() }) @@ -1019,7 +1020,7 @@ mod get_vaults_below_premium_collaterlization_tests { add_vault(vault_id(4), 50, 100); assert_err!( - VaultRegistry::get_premium_redeem_vaults(400_u32), + VaultRegistry::get_premium_redeem_vaults(0_u32), TestError::NoVaultUnderThePremiumRedeemThreshold ); }) @@ -1044,8 +1045,8 @@ mod get_vaults_below_premium_collaterlization_tests { VaultRegistry::_set_secure_collateral_threshold(DEFAULT_CURRENCY_PAIR, secure); assert_eq!( - VaultRegistry::get_premium_redeem_vaults(400_u32), - Ok(vec![(id2, wrapped(452)), (id1, wrapped(451))]) + VaultRegistry::get_premium_redeem_vaults(0_u32), + Ok(vec![(id2, wrapped(52)), (id1, wrapped(51))]) ); }) } @@ -1078,8 +1079,8 @@ mod get_vaults_below_premium_collaterlization_tests { VaultRegistry::_set_secure_collateral_threshold(DEFAULT_CURRENCY_PAIR, secure); assert_eq!( - VaultRegistry::get_premium_redeem_vaults(400_u32), - Ok(vec!((id2, wrapped(451)))) + VaultRegistry::get_premium_redeem_vaults(0_u32), + Ok(vec!((id2, wrapped(51)))) ); }) }