Kodylow / fedimint-http

MIT License
12 stars 14 forks source link

Improved WebSocket messaging in await_deposit.rs and await_invoice.rs #16

Closed OsauravO closed 5 months ago

OsauravO commented 5 months ago

This pull request makes the following changes:

OsauravO commented 5 months ago

@Kodylow i have made some changes in handle_socket function and accordingly in match_method in ws.rs file and also tried to explain my approach using comments . Accordingly i have changed handle_ws function in await_deposit.rs file . I am still getting some errors . Can you please check it for me . thanks

OsauravO commented 5 months ago

@Kodylow i tried to resolve all the changes you suggested but i am getting an error in ws.rs file . Can you please check it for me. Thanks

Kodylow commented 5 months ago

can you rebase + post the errors

OsauravO commented 5 months ago

i think i have done the rebasing now. and the error which i am getting in ws.rs file is image

Kodylow commented 5 months ago

Okay, that error's pretty clear, you're passing ownership of the socket into the method which drops it so you have to either borrow it like &socket, clone it like socket.clone(), or refactor to not drop the socket.

when you split the socket into sender/receiver you don't have the socket anymore, you have sender and receiver, so use those if you're splitting instead of using socket

OsauravO commented 5 months ago

hey i think i got what you said , can you now check it . Thanks a lot

Kodylow commented 5 months ago

Can you reopen this on https://github.com/fedimint/fedimint-clientd , moved the project into the fedimint org

OsauravO commented 5 months ago

Already done 👍

Kodylow commented 5 months ago

closing with move to new repo