mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-25 05:05:03 +00:00
Update XcmError on sending failure. (#358)
This commit is contained in:
1 parent
5fd6e1b4fd
commit
1eecfe1acb
1 file changed
+2
-3
@@ -157,7 +157,7 @@ impl<T: Config> SendXcm for Module<T> {
|
||||
let hash = T::Hashing::hash(&data);
|
||||
|
||||
T::UpwardMessageSender::send_upward_message(data)
|
||||
.map_err(|_| XcmError::Undefined)?;
|
||||
.map_err(|_| XcmError::CannotReachDestination)?;
|
||||
Self::deposit_event(RawEvent::UpwardMessageSent(hash));
|
||||
|
||||
Ok(())
|
||||
@@ -170,9 +170,8 @@ impl<T: Config> SendXcm for Module<T> {
|
||||
recipient: (*id).into(),
|
||||
data,
|
||||
};
|
||||
// TODO: Better error here
|
||||
T::HrmpMessageSender::send_hrmp_message(message)
|
||||
.map_err(|_| XcmError::Undefined)?;
|
||||
.map_err(|_| XcmError::CannotReachDestination)?;
|
||||
Self::deposit_event(RawEvent::HrmpMessageSent(hash));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user