From 98542685b1044a7638c561b1bf7055f94ac0fd67 Mon Sep 17 00:00:00 2001
From: Serban Iorga <serban@parity.io>
Date: Tue, 4 Apr 2023 15:05:44 +0300
Subject: [PATCH] Remove unneeded error debug strings (#2017)

* Remove unneeded error debug strings

This reverts commit ff33e6ce127ea22c359b1b0273d6f3a5a27f484c.
---
 .../runtime-common/src/messages_xcm_extension.rs | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/bridges/bin/runtime-common/src/messages_xcm_extension.rs b/bridges/bin/runtime-common/src/messages_xcm_extension.rs
index 3d802d12fad..4ccdd7a4b4d 100644
--- a/bridges/bin/runtime-common/src/messages_xcm_extension.rs
+++ b/bridges/bin/runtime-common/src/messages_xcm_extension.rs
@@ -42,7 +42,7 @@ pub type XcmAsPlainPayload = sp_std::prelude::Vec<u8>;
 pub enum XcmBlobMessageDispatchResult {
 	InvalidPayload,
 	Dispatched,
-	NotDispatched(#[codec(skip)] &'static str),
+	NotDispatched(#[codec(skip)] Option<DispatchBlobError>),
 }
 
 /// [`XcmBlobMessageDispatch`] is responsible for dispatching received messages
@@ -106,24 +106,12 @@ impl<
 				XcmBlobMessageDispatchResult::Dispatched
 			},
 			Err(e) => {
-				let e = match e {
-					DispatchBlobError::Unbridgable => "DispatchBlobError::Unbridgable",
-					DispatchBlobError::InvalidEncoding => "DispatchBlobError::InvalidEncoding",
-					DispatchBlobError::UnsupportedLocationVersion =>
-						"DispatchBlobError::UnsupportedLocationVersion",
-					DispatchBlobError::UnsupportedXcmVersion =>
-						"DispatchBlobError::UnsupportedXcmVersion",
-					DispatchBlobError::RoutingError => "DispatchBlobError::RoutingError",
-					DispatchBlobError::NonUniversalDestination =>
-						"DispatchBlobError::NonUniversalDestination",
-					DispatchBlobError::WrongGlobal => "DispatchBlobError::WrongGlobal",
-				};
 				log::error!(
 					target: crate::LOG_TARGET_BRIDGE_DISPATCH,
 					"[XcmBlobMessageDispatch] DispatchBlob::dispatch_blob failed, error: {:?} - message_nonce: {:?}",
 					e, message.key.nonce
 				);
-				XcmBlobMessageDispatchResult::NotDispatched(e)
+				XcmBlobMessageDispatchResult::NotDispatched(Some(e))
 			},
 		};
 		MessageDispatchResult { unspent_weight: Weight::zero(), dispatch_level_result }
-- 
GitLab