Proposal: Remove Payment class from API
Closed this issue · 1 comments
emschwartz commented
Right now you need to interact with the client by calling:
const payment = client.createPayment(params)
payment.quote().then((quote) => {
payment.sendQuoted(quote)
})
It would be cleaner to get rid of the Payment
class and add quote
and send
methods to the client:
client.quote(params).then((quote) => {
client.send(Object.assign({}, params, quote))
})
This would also make it easier to wrap the quote/send functionality in js-ilp
, for example to have the client check whether the source hold duration is too long.
emschwartz commented
@justmoon I'll take this ticket