mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-02 17:01:07 +00:00
Update XcmError on sending failure. (#358)
This commit is contained in:
1 parent
b50848ea53
commit
56f60a122e
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