diff --git a/pallets/slpx/src/benchmarking.rs b/pallets/slpx/src/benchmarking.rs index 3e58fb064..891d104bc 100644 --- a/pallets/slpx/src/benchmarking.rs +++ b/pallets/slpx/src/benchmarking.rs @@ -107,6 +107,7 @@ mod benchmarks { KSM, TargetChain::Astar(receiver), BoundedVec::default(), + None, ); } diff --git a/pallets/slpx/src/lib.rs b/pallets/slpx/src/lib.rs index a3915139a..f0a4e4a9b 100644 --- a/pallets/slpx/src/lib.rs +++ b/pallets/slpx/src/lib.rs @@ -442,6 +442,7 @@ pub mod pallet { currency_id: CurrencyIdOf, target_chain: TargetChain>, remark: BoundedVec>, + channel_id: Option, ) -> DispatchResultWithPostInfo { let (source_chain_caller, derivative_account, bifrost_chain_caller) = Self::ensure_singer_on_whitelist(origin.clone(), evm_caller, &target_chain)?; @@ -456,6 +457,7 @@ pub mod pallet { currency_id, remark, target_chain, + channel_id, }; OrderQueue::::mutate(|order_queue| -> DispatchResultWithPostInfo { @@ -515,6 +517,7 @@ pub mod pallet { bifrost_chain_caller, derivative_account, target_chain, + channel_id: None, }; OrderQueue::::mutate(|order_queue| -> DispatchResultWithPostInfo { @@ -738,6 +741,7 @@ pub mod pallet { currency_id, remark, target_chain, + channel_id: None, }; OrderQueue::::mutate(|order_queue| -> DispatchResultWithPostInfo { @@ -1000,7 +1004,7 @@ impl Pallet { order.currency_id, currency_amount, order.remark.clone(), - None, + order.channel_id, ) .map_err(|_| Error::::ArgumentsError)?; let vtoken_id = T::VtokenMintingInterface::vtoken_id(order.currency_id) diff --git a/pallets/slpx/src/tests.rs b/pallets/slpx/src/tests.rs index ee06742e8..e779f9738 100644 --- a/pallets/slpx/src/tests.rs +++ b/pallets/slpx/src/tests.rs @@ -354,7 +354,8 @@ fn test_add_order() { source_chain_caller, DOT, TargetChain::Astar(source_chain_caller), - BoundedVec::default() + BoundedVec::default(), + None )); assert_eq!(OrderQueue::::get().len(), 1usize); assert_ok!(Slpx::redeem( @@ -389,7 +390,8 @@ fn test_hook() { source_chain_caller, DOT, TargetChain::Astar(source_chain_caller), - BoundedVec::default() + BoundedVec::default(), + None )); assert_eq!(OrderQueue::::get().len(), 1usize); >::set_block_number(2u32.into()); diff --git a/pallets/slpx/src/types.rs b/pallets/slpx/src/types.rs index bcf02e857..20e7b3213 100644 --- a/pallets/slpx/src/types.rs +++ b/pallets/slpx/src/types.rs @@ -130,4 +130,5 @@ pub struct Order { pub order_type: OrderType, pub remark: BoundedVec>, pub target_chain: TargetChain, + pub channel_id: Option, }