From 6afadecc199ef0478a3278b4823c3f4c8fbf736f Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Sun, 14 Apr 2024 19:23:11 +0100 Subject: [PATCH] fixed asset map --- mantis/node/src/solver/router/shortest_path.rs | 5 +++-- mantis/node/tests/cvms.rs | 12 ++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/mantis/node/src/solver/router/shortest_path.rs b/mantis/node/src/solver/router/shortest_path.rs index 8d6323b..7ffcf83 100644 --- a/mantis/node/src/solver/router/shortest_path.rs +++ b/mantis/node/src/solver/router/shortest_path.rs @@ -80,9 +80,9 @@ pub fn route( .expect("venue") .clone(); match venue { - Venue::Transfer(from_asset_id, _to_asset_id) => { + Venue::Transfer(from_asset_id, to_asset_id) => { let spawn = CvmInstruction::Spawn { - network_id: cvm_glt.get_network_for_asset(from_asset_id), + network_id: cvm_glt.get_network_for_asset(to_asset_id), salt: salt.to_vec(), assets: CvmFundsFilter::all_of(from_asset_id), program: CvmProgram { @@ -107,5 +107,6 @@ pub fn route( in_node_index_value, ); } + log::info!("instructions: {:?}", instructions); instructions } diff --git a/mantis/node/tests/cvms.rs b/mantis/node/tests/cvms.rs index 3d881b4..d6267c0 100644 --- a/mantis/node/tests/cvms.rs +++ b/mantis/node/tests/cvms.rs @@ -154,6 +154,8 @@ async fn cvm_devnet_case() { }; let router = "shortest_path"; + let OSMOSIS = 2; + let CENTAURI = 1; let cvm_glt = CvmGlt { network_to_networks: vec![ NetworkToNetworkItem::new(1.into(), 2.into(), OtherNetworkItem::new()), @@ -312,9 +314,15 @@ async fn cvm_devnet_case() { let query = cvm_runtime::outpost::QueryMsg::GetConfig {}; let cvm_glt: CvmGlt = centauri .wrap() - .query_wasm_smart(cw_cvm_outpost_contract, &query) + .query_wasm_smart(cw_cvm_outpost_contract.clone(), &query) + .unwrap(); + let query = cvm_runtime::outpost::QueryMsg::GetAssetById { + asset_id: 12.into(), + }; + let asset: GetAssetResponse = centauri + .wrap() + .query_wasm_smart(cw_cvm_outpost_contract.clone(), &query) .unwrap(); - centauri .execute_contract( sender.clone(),