diff --git a/mobile/native/src/trade/order/handler.rs b/mobile/native/src/trade/order/handler.rs index f3f817fe9..e30b6222d 100644 --- a/mobile/native/src/trade/order/handler.rs +++ b/mobile/native/src/trade/order/handler.rs @@ -70,6 +70,10 @@ pub async fn submit_order( order: Order, channel_opening_params: Option, ) -> Result { + event::publish(&EventInternal::BackgroundNotification( + BackgroundTask::AsyncTrade(TaskStatus::Pending), + )); + submit_order_internal(order, channel_opening_params) .await .inspect_err(report_error_to_coordinator) @@ -129,10 +133,6 @@ pub async fn submit_order_internal( set_order_to_open_and_update_ui(order.id).map_err(SubmitOrderError::Storage)?; update_position_after_order_submitted(&order).map_err(SubmitOrderError::Storage)?; - event::publish(&EventInternal::BackgroundNotification( - BackgroundTask::AsyncTrade(TaskStatus::Pending), - )); - Ok(order.id) }