Skip to content

Commit

Permalink
fix(encointer): AssetId -> XcmAssetId
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoaguirre committed Jul 12, 2024
1 parent ee2e870 commit 555eb1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system-parachains/encointer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -925,12 +925,12 @@ impl_runtime_apis! {

impl xcm_fee_payment_runtime_api::fees::XcmPaymentApi<Block> for Runtime {
fn query_acceptable_payment_assets(xcm_version: xcm::Version) -> Result<Vec<VersionedAssetId>, XcmPaymentApiError> {
let acceptable_assets = vec![AssetId(xcm_config::KsmLocation::get())];
let acceptable_assets = vec![XcmAssetId(xcm_config::KsmLocation::get())];
PolkadotXcm::query_acceptable_payment_assets(xcm_version, acceptable_assets)
}

fn query_weight_to_asset_fee(weight: Weight, asset: VersionedAssetId) -> Result<u128, XcmPaymentApiError> {
match asset.try_as::<AssetId>() {
match asset.try_as::<XcmAssetId>() {
Ok(asset_id) if asset_id.0 == xcm_config::KsmLocation::get() => {
// for native token
Ok(WeightToFee::weight_to_fee(&weight))
Expand Down

0 comments on commit 555eb1a

Please sign in to comment.