mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
We count the teleported assets (#7528)
This brings the `limited_teleport_assets` weight into line with the `teleport_assets` weight.
This commit is contained in:
@@ -1085,10 +1085,11 @@ pub mod pallet {
|
|||||||
match (maybe_assets, maybe_dest) {
|
match (maybe_assets, maybe_dest) {
|
||||||
(Ok(assets), Ok(dest)) => {
|
(Ok(assets), Ok(dest)) => {
|
||||||
use sp_std::vec;
|
use sp_std::vec;
|
||||||
|
let count = assets.len() as u32;
|
||||||
let mut message = Xcm(vec![
|
let mut message = Xcm(vec![
|
||||||
WithdrawAsset(assets),
|
WithdrawAsset(assets),
|
||||||
SetFeesMode { jit_withdraw: true },
|
SetFeesMode { jit_withdraw: true },
|
||||||
InitiateTeleport { assets: Wild(All), dest, xcm: Xcm(vec![]) },
|
InitiateTeleport { assets: Wild(AllCounted(count)), dest, xcm: Xcm(vec![]) },
|
||||||
]);
|
]);
|
||||||
T::Weigher::weight(&mut message).map_or(Weight::MAX, |w| T::WeightInfo::teleport_assets().saturating_add(w))
|
T::Weigher::weight(&mut message).map_or(Weight::MAX, |w| T::WeightInfo::teleport_assets().saturating_add(w))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user