You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let (sender, mut receiver) = unbounded_channel();
info_client
.subscribe(
Subscription::ActiveAssetCtx {
coin: "@107".to_string(),
},
sender,
)
.await
.unwrap();
tokio::spawn(async move {
while let Some(msg) = receiver.recv().await {
//Never enters
println!("Received active asset ctx: {:?}", msg);
}
});
The problem lies with the mismatch between type and channel, when the subscription is first created, activeAssetCtx is used as an identifier, but after receiving the response from the websocket endpoint, because channel is of activeSpotAssetCtx, it uses this as an identifier, which doesnt exist when the subscription was first created
When subscribing for asset contexts, but the coin is a spot market:
The return value has a different channel type of
activeSpotAssetCtx
The example payload is this:
The rust sdk is unable to handle this case. I will create a PR to handle this if this is indeed a bug
The text was updated successfully, but these errors were encountered: