Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

fix: request event state after publishing response #167

Merged
merged 2 commits into from
Mar 28, 2024
Merged

Conversation

im-adithya
Copy link
Member

Resolves #159 (comment)

service.go Outdated
svc.Logger.WithFields(logrus.Fields{
"nostrPubkey": event.PubKey,
}).Errorf("Failed to save state to nostr event: %v", err)
if requestEvent.State == REQUEST_EVENT_STATE_HANDLER_EXECUTING {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe instead we can return if there is an error here: https://github.com/getAlby/nostr-wallet-connect-next/blob/master/service.go#L559

and move this code to under that error check. Then we do not check if the state is executing (does this feel a bit strange?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm yeah that sounds better 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

Copy link
Collaborator

@rolznz rolznz left a comment

Choose a reason for hiding this comment

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

utACK

code is a bit complicated with embedded if/else but should be ok for now

@rolznz rolznz merged commit db1ee69 into master Mar 28, 2024
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants