--- a/pallets/foreign-assets/src/impl_fungibles.rs +++ b/pallets/foreign-assets/src/impl_fungibles.rs @@ -461,14 +461,10 @@ match asset { AssetIds::NativeAssetId(NativeCurrency::Here) => { - let this_amount: ::Balance = match value.try_into() { - Ok(val) => val, - Err(_) => { - return Err(DispatchError::Other( - "Bad amount to this parachain value conversion", - )) - } - }; + let this_amount: ::Balance = + value.try_into().map_err(|_| { + DispatchError::Other("Bad amount to this parachain value conversion") + })?; match as fungible::Mutate>::burn_from( who,