interledger / rafiki

An open-source, comprehensive Interledger service for wallet providers, enabling them to provide Interledger functionality to their users.
https://rafiki.dev/
Apache License 2.0
226 stars 77 forks source link

feat(backend): make quote step optional #2654

Closed BlairCurrey closed 2 months ago

BlairCurrey commented 2 months ago

Changes proposed in this pull request

Context

fixes #2409 fixes #2573

Checklist

netlify[bot] commented 2 months ago

Deploy Preview for brilliant-pasca-3e80ec canceled.

Name Link
Latest commit 9900f933f46997b2693cddd681634bdef9f6fcc2
Latest deploy log https://app.netlify.com/sites/brilliant-pasca-3e80ec/deploys/662fbbdcd537260008bf20be
BlairCurrey commented 2 months ago

Do we want to add this functionality in the Admin API as well?

Also, this looks good, I think only the test integration README needs updating IMO

@mkurapov

added support for creating from incoming payment here: https://github.com/interledger/rafiki/pull/2654/commits/a7e59c2eac837a1d8928d1dda2ed3986aa44a702

I opted for a new createOutgoingPaymentFromIncomingPayment resolver. I did this for the more explicit interface that can be enforced at compile. We could instead make all of quoteId, incomingPayment, and debitAmount optional but then bad inputs would have to be caught at runtime. So I think it's a trade between a little duplication in the resolver definition for a much clearer interface. There is no way to just make the input a union of inputs (like it is for the open payments route).