XcmContext to buy_weight / refund_weight (#7563)

* added XcmContext to WeightTrader trait

* cargo fmt

* make xcm context optional

* make compile

* fix compile

* `XcmContext` to `buy_weight / refund_weight`

---------

Co-authored-by: Patricio Napoli <hi@patricionapoli.dev>
Co-authored-by: Giles Cope <gilescope@gmail.com>
Co-authored-by: parity-processbot <>
This commit is contained in:
Branislav Kontur
2023-08-01 13:04:52 +02:00
committed by GitHub
parent f226cd5ac9
commit 4980b64497
5 changed files with 77 additions and 29 deletions
@@ -80,7 +80,12 @@ impl WeightTrader for DummyWeightTrader {
DummyWeightTrader
}
fn buy_weight(&mut self, _weight: Weight, _payment: Assets) -> Result<Assets, XcmError> {
fn buy_weight(
&mut self,
_weight: Weight,
_payment: Assets,
_context: &XcmContext,
) -> Result<Assets, XcmError> {
Ok(Assets::default())
}
}