Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
XcmContext to buy_weight / refund_weight
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Jul 31, 2023
1 parent 5ce8e30 commit 800e914
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions primitives/utility/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ impl<
&mut self,
weight: Weight,
payment: xcm_executor::Assets,
context: &XcmContext,
) -> Result<xcm_executor::Assets, XcmError> {
log::trace!(target: "xcm::weight", "TakeFirstAssetTrader::buy_weight weight: {:?}, payment: {:?}", weight, payment);
log::trace!(target: "xcm::weight", "TakeFirstAssetTrader::buy_weight weight: {:?}, payment: {:?}, context: {:?}", weight, payment, context);

// Make sure we dont enter twice
if self.0.is_some() {
Expand Down Expand Up @@ -196,8 +197,8 @@ impl<
Ok(unused)
}

fn refund_weight(&mut self, weight: Weight) -> Option<MultiAsset> {
log::trace!(target: "xcm::weight", "TakeFirstAssetTrader::refund_weight weight: {:?}", weight);
fn refund_weight(&mut self, weight: Weight, context: &XcmContext) -> Option<MultiAsset> {
log::trace!(target: "xcm::weight", "TakeFirstAssetTrader::refund_weight weight: {:?}, context: {:?}", weight, context);
if let Some(AssetTraderRefunder {
mut weight_outstanding,
outstanding_concrete_asset: MultiAsset { id, fun },
Expand Down

0 comments on commit 800e914

Please sign in to comment.