Skip to content
2 changes: 1 addition & 1 deletion bridges/modules/xcm-bridge-hub/src/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ where

fn is_active(lane: Self::LaneId) -> bool {
Pallet::<T, I>::bridge_by_lane_id(&lane)
.and_then(|(_, bridge)| bridge.bridge_origin_relative_location.try_as().cloned().ok())
.and_then(|(_, bridge)| (*bridge.bridge_origin_relative_location).try_into().ok())
.map(|recipient: Location| !T::LocalXcmChannelManager::is_congested(&recipient))
.unwrap_or(false)
}
Expand Down
7 changes: 4 additions & 3 deletions bridges/modules/xcm-bridge-hub/src/exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,16 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
}

// else - suspend the bridge
let bridge_origin_relative_location = match bridge.bridge_origin_relative_location.try_as()
{
let result_bridge_origin_relative_location =
(*bridge.bridge_origin_relative_location).clone().try_into();
let bridge_origin_relative_location = match &result_bridge_origin_relative_location {
Ok(bridge_origin_relative_location) => bridge_origin_relative_location,
Err(_) => {
log::debug!(
target: LOG_TARGET,
"Failed to convert the bridge {:?} origin location {:?}",
bridge_id,
bridge.bridge_origin_relative_location,
bridge.bridge_origin_relative_location.clone(),
);

return
Expand Down
Loading