Skip to content

Commit

Permalink
fixed asset map
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Apr 14, 2024
1 parent 3f34039 commit 6afadec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 3 additions & 2 deletions mantis/node/src/solver/router/shortest_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -107,5 +107,6 @@ pub fn route(
in_node_index_value,
);
}
log::info!("instructions: {:?}", instructions);
instructions
}
12 changes: 10 additions & 2 deletions mantis/node/tests/cvms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 6afadec

Please sign in to comment.