diff --git a/crates/redeem/src/benchmarking.rs b/crates/redeem/src/benchmarking.rs index e3a2c7dfa7..c6a58c2453 100644 --- a/crates/redeem/src/benchmarking.rs +++ b/crates/redeem/src/benchmarking.rs @@ -18,11 +18,10 @@ use vault_registry::{ // Pallets use crate::Pallet as Redeem; use btc_relay::Pallet as BtcRelay; -use oracle::Pallet as Oracle; +use oracle::{OracleKey, Pallet as Oracle}; use security::Pallet as Security; -use vault_registry::Pallet as VaultRegistry; -use oracle::OracleKey; use sp_runtime::FixedPointNumber; +use vault_registry::Pallet as VaultRegistry; type UnsignedFixedPoint = ::UnsignedFixedPoint; fn collateral(amount: u32) -> Amount { diff --git a/parachain/runtime/runtime-tests/src/parachain/redeem.rs b/parachain/runtime/runtime-tests/src/parachain/redeem.rs index cc57063b64..4e9a361f19 100644 --- a/parachain/runtime/runtime-tests/src/parachain/redeem.rs +++ b/parachain/runtime/runtime-tests/src/parachain/redeem.rs @@ -230,11 +230,11 @@ mod premium_redeem_tests { let redeem_1 = RedeemPallet::get_open_redeem_request_from_id(&redeem_id_1).unwrap(); // recv premium should be equal to max premium assert_eq!(redeem_1.premium, max_premium_for_vault.amount()); - assert!(redeem_1.premium > 0); + assert!(!redeem_1.premium.is_zero()); // max premium for vault should be zero let max_premium_for_vault = VaultRegistryPallet::get_vault_max_premium_redeem(&vault_id).unwrap(); - assert_eq!(max_premium_for_vault.amount(), 0); + assert!(max_premium_for_vault.amount().is_zero()); // redeeming the max premium amount put backs vault above premium threshold // vault should be below secure threshold, while above global secure & premium threshold @@ -245,7 +245,7 @@ mod premium_redeem_tests { let redeem_id_2 = setup_redeem(vault_id.wrapped(800_00), USER, &vault_id); let redeem_2 = RedeemPallet::get_open_redeem_request_from_id(&redeem_id_2).unwrap(); // no premium is given out for new redeems - assert_eq!(redeem_2.premium, 0); + assert!(redeem_2.premium.is_zero()); }); } #[test]