|
@@ -15,17 +15,13 @@ pub(crate) async fn handle(
|
|
|
return Err(WsError::InvalidParams);
|
|
|
}
|
|
|
|
|
|
- let mut subscription = if let Ok(subscription) = context
|
|
|
+ let mut subscription = context
|
|
|
.state
|
|
|
.mint
|
|
|
.pubsub_manager
|
|
|
.try_subscribe(params)
|
|
|
.await
|
|
|
- {
|
|
|
- subscription
|
|
|
- } else {
|
|
|
- return Err(WsError::ParseError);
|
|
|
- };
|
|
|
+ .map_err(|_| WsError::ParseError)?;
|
|
|
|
|
|
let publisher = context.publisher.clone();
|
|
|
context.subscriptions.insert(
|