Skip to content

Commit

Permalink
fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lemunozm committed May 16, 2023
1 parent 48bca51 commit 0ce0fc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion runtime/integration-tests/src/pools/pool_starts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ async fn create_loan() {
RuntimeEvent::System(frame_system::Event::ExtrinsicFailed{..}) if [count 0],
RuntimeEvent::PoolRegistry(pallet_pool_registry::Event::Registered { pool_id, .. }) if [*pool_id == 0],
RuntimeEvent::Loans(pallet_loans::Event::Created{ pool_id, loan_id, loan_info })
if [*pool_id == 0 && *loan_id == 1 && *loan_info.collateral() == (4294967296, ItemId(1))],
if [*pool_id == 0 && *loan_id == 1 && loan_info.collateral() == (4294967296, ItemId(1))],
);
}
9 changes: 6 additions & 3 deletions runtime/integration-tests/src/utils/loans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ use pallet_loans::{
use pallet_uniques::Call as UniquesCall;
use sp_runtime::{traits::One, FixedPointNumber};

use crate::{chain::centrifuge::RuntimeCall, utils::tokens::rate_from_percent};
use crate::{
chain::centrifuge::{Runtime, RuntimeCall},
utils::tokens::rate_from_percent,
};

type Asset = (CollectionId, ItemId);

Expand Down Expand Up @@ -134,7 +137,7 @@ pub fn issue_default_loan(
pub fn issue_loan(
owner: AccountId,
pool_id: PoolId,
loan_info: LoanInfo<Asset, Balance, Rate>,
loan_info: LoanInfo<Runtime>,
manager: &mut NftManager,
) -> Vec<RuntimeCall> {
let mut calls = Vec::new();
Expand All @@ -147,7 +150,7 @@ pub fn issue_loan(
calls
}

pub fn create_loan_call(pool_id: PoolId, info: LoanInfo<Asset, Balance, Rate>) -> RuntimeCall {
pub fn create_loan_call(pool_id: PoolId, info: LoanInfo<Runtime>) -> RuntimeCall {
RuntimeCall::Loans(LoansCall::create { pool_id, info })
}

Expand Down

0 comments on commit 0ce0fc4

Please sign in to comment.