Skip to content
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

fix: connect on every nwc request to ensure reconnect happens #172

Merged
merged 3 commits into from
Dec 22, 2023

Conversation

rolznz
Copy link
Contributor

@rolznz rolznz commented Dec 21, 2023

No description provided.

@rolznz rolznz requested a review from bumi December 21, 2023 16:32
keysend(args: KeysendArgs) {
this.checkConnected();
async keysend(args: KeysendArgs) {
await this.checkConnected();

return this.executeNip47Request<SendPaymentResponse, Nip47PayResponse>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do those need to be awaited now?

is it good to mix async/await with returned promisses?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just the same as doing

const result = await ...;
return result;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx.

@bumi
Copy link
Contributor

bumi commented Dec 21, 2023

This now changes the API - which might be OK, but now calling enable is no longer required.

shouldn't we still require that? and check if enable was called and if so we do call the connect function

@rolznz rolznz merged commit 4710871 into master Dec 22, 2023
3 checks passed
@bumi bumi deleted the fix/reconnect-nwc branch December 22, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants