Skip to content

Commit

Permalink
Fix bug in cfg flag
Browse files Browse the repository at this point in the history
  • Loading branch information
crodas committed Dec 4, 2024
1 parent 246e583 commit b514281
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
6 changes: 5 additions & 1 deletion crates/cdk/src/wallet/subscription/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ impl SubscriptionClient {
new_subscription_recv: mpsc::Receiver<SubId>,
on_drop_recv: mpsc::Receiver<SubId>,
) -> JoinHandle<()> {
#[cfg(any(feature = "http_subscription", target_arch = "wasm32"))]
#[cfg(any(
feature = "http_subscription",
not(feature = "mint"),
target_arch = "wasm32"
))]
return Self::http_worker(
http_client,
url,
Expand Down
31 changes: 16 additions & 15 deletions crates/cdk/src/wallet/subscription/ws.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
use super::{http::http_main, WsSubscriptionBody};
use crate::{
mint_url::MintUrl,
nuts::nut17::{
ws::{WsMessageOrResponse, WsMethodRequest, WsRequest, WsUnsubscribeRequest},
Params,
},
pub_sub::SubId,
wallet::client::HttpClientMethods,
};
use std::collections::{HashMap, HashSet};
use std::sync::atomic::AtomicUsize;
use std::sync::Arc;

use futures::{SinkExt, StreamExt};
use std::{
collections::{HashMap, HashSet},
sync::{atomic::AtomicUsize, Arc},
};
use tokio::sync::{mpsc, RwLock};
use tokio_tungstenite::{connect_async, tungstenite::Message};
use tokio_tungstenite::connect_async;
use tokio_tungstenite::tungstenite::Message;

use super::http::http_main;
use super::WsSubscriptionBody;
use crate::mint_url::MintUrl;
use crate::nuts::nut17::ws::{
WsMessageOrResponse, WsMethodRequest, WsRequest, WsUnsubscribeRequest,
};
use crate::nuts::nut17::Params;
use crate::pub_sub::SubId;
use crate::wallet::client::HttpClientMethods;

const MAX_ATTEMPT_FALLBACK_HTTP: usize = 10;

Expand Down

0 comments on commit b514281

Please sign in to comment.