Skip to content

Commit

Permalink
Fix for Transact v5->v4 decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Nov 22, 2024
1 parent 7c5224c commit c96a7ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion polkadot/xcm/src/v4/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,9 @@ impl<Call: Decode + GetDispatchInfo> TryFrom<NewInstruction<Call>> for Instructi
HrmpChannelClosing { initiator, sender, recipient } =>
Self::HrmpChannelClosing { initiator, sender, recipient },
Transact { origin_kind, mut call } => {
let require_weight_at_most = call.take_decoded()?.get_dispatch_info().call_weight;
let require_weight_at_most = call.take_decoded()
.map(|c| c.get_dispatch_info().call_weight)
.unwrap_or(Weight::MAX);
Self::Transact { origin_kind, require_weight_at_most, call: call.into() }
},
ReportError(response_info) => Self::ReportError(QueryResponseInfo {
Expand Down

0 comments on commit c96a7ba

Please sign in to comment.