-
Notifications
You must be signed in to change notification settings - Fork 104
feat(backend): add handlePartialPayment for incoming payments #3772
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
Conversation
🚀 Performance Test ResultsTest Configuration:
Test Metrics:
📜 Logs |
mkurapov
left a comment
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.
Looks good, just a few comments
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.
| dataToTransmit: acc.name |
Since we have it already anyway
| incomingPaymentId: incomingPayment.id, | ||
| type: IncomingPaymentEventType.IncomingPaymentPartialPaymentReceived, | ||
| data: { | ||
| ...incomingPayment.toData(0n), |
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.
Here, we need to add a new property to the data that specifies the amount that was only sent in the "partial" payment, so the receiving ASE can make a decision whether to action it or not. The receivedAmount should remain unchanged, ie, it will include the cumulative amount received thus far for the incoming payment.
I will encapsulate this in a separate issue.
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.
If we keep the DB encryption secret as optional, this can just be: "Data to transmit to the recipient during the payment"
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.
I think instead of this, we can just assert that depositSpy was called with dataToTransmit (since the resolver doesn't really need to know about how it gets used in the method 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.
Do you think the encryption should be an optional feature? I think this might be a good call, as it allows the integrator to decide whether they want it or 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.
Yeah, I figured leaving it open was the best possibility - I definitely can see cases where an integrator might not want it, and therefore not have to deal with another piece of the environment to configure.
✅ Deploy Preview for brilliant-pasca-3e80ec ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
313abf0 to
97ada59
Compare
sanducb
left a comment
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.
Looks good!
Changes proposed in this pull request
handlePartialPaymentservice call to the incoming payment service, to be called when encrypted data is transmitted through an ILP stream.Context
Fixes RAF-1183 and fixes RAF-1184.
Checklist
fixes #numberuser-docslabel (if necessary)