Skip to content

Commit

Permalink
fixup: auto format Rust code
Browse files Browse the repository at this point in the history
  • Loading branch information
oak-code-formatter committed Nov 15, 2023
1 parent 3d22eab commit b7ebf10
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pallets/xcmp-handler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,12 @@ pub mod pallet {
Ok(instructions)
}

fn get_local_xcm(asset: MultiAsset, destination: MultiLocation) -> Result<xcm::latest::Xcm<<T as pallet::Config>::RuntimeCall>, DispatchError> {
let reserve = T::ReserveProvider::reserve(&asset)
.ok_or(Error::<T>::InvalidAssetLocation)?;
fn get_local_xcm(
asset: MultiAsset,
destination: MultiLocation,
) -> Result<xcm::latest::Xcm<<T as pallet::Config>::RuntimeCall>, DispatchError> {
let reserve =
T::ReserveProvider::reserve(&asset).ok_or(Error::<T>::InvalidAssetLocation)?;
let local_xcm = if reserve == MultiLocation::here() {
log::error!("get_local_xcm, AAA");
Xcm(vec![
Expand Down Expand Up @@ -288,7 +291,7 @@ pub mod pallet {

let local_xcm = Self::get_local_xcm(local_asset.clone(), destination.clone())?;

// XCM for target chain
// XCM for target chain
let target_asset = local_asset
.clone()
.reanchored(&destination, T::UniversalLocation::get())
Expand Down

0 comments on commit b7ebf10

Please sign in to comment.