-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support wasm #91
base: trunk
Are you sure you want to change the base?
Support wasm #91
Conversation
src/swaps/liquid.rs
Outdated
let electrum_client = network_config.clone().build_client()?; | ||
pub async fn fetch_utxo<LC: LiquidClient, N: LiquidNetworkConfig<LC>>( | ||
&self, | ||
network_config: &N, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing a config forces this function to call build_client
(and create a new client) which prevents from the caller to reuse a client implementation. In electrum we have seen it has a big performance penalty.
I know this was the implementation before this PR but perhaps if we are going for such a big change we can improve it?
I commented on this method as an example but this pattern repeats itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d4aee44
to
d7395ba
Compare
0366f4c
to
8ce332e
Compare
8ce332e
to
8aab73a
Compare
6c8e17d
to
b6b46ca
Compare
Resolves #90.
This PR:
ureq
to asyncreqwest
tungstenite
totokio-tungstenite-wasm
- as the name indicates, this crate usestokio-tungstenite
for native buildsThere are still some TODOs, but I would appreciate some initial feedback.TODO: