-
Notifications
You must be signed in to change notification settings - Fork 21
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: only log a warning if there is no preimage when settling an incoming transaction #666
base: master
Are you sure you want to change the base?
Conversation
I am always a bit hesitant with such exceptions they will always haunt one the one way or the other. At least they make the code harder to understand and cause questions in the future. why would a settled payment not require a preimage. or some other calculation is done assuming that all successful payments have preimages and then will cause issues. Maintaining multiple backends is tricky and with such exceptions even harder. Why does cashu not provide a preimage there? |
@bumi I agree. I'd prefer this to be fixed on the Cashu side. |
return nil, errors.New("no preimage in payment") | ||
} | ||
// incoming payments SHOULD have a preimage | ||
// (currently cashu backend does not) |
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.
where does this apply? only cashu? why can transactions not have a preimage.
is cashu worth this?
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.
Not sure if I should've added this comment about the "waiting for payment" issue here. Here it is just in case. |
I've made an issue in the cashu nuts repository: cashubtc/nuts#168 |
Fixes #651
Alternative fix as the cashu connector is a bit broken right now (incoming payments do not show because of a check to ensure there is a preimage set) and there is nothing in the cashu spec to reveal preimages for receiving payments.
I am not really sure this is good or not - ideally all the settled transactions in our DB have preimages.