diff --git a/packages/backend/src/payment-method/ilp/service.ts b/packages/backend/src/payment-method/ilp/service.ts index 6142bc4193..1b03e2d719 100644 --- a/packages/backend/src/payment-method/ilp/service.ts +++ b/packages/backend/src/payment-method/ilp/service.ts @@ -16,6 +16,7 @@ import { } from '../handler/errors' import { TelemetryService } from '../../telemetry/service' import { IlpQuoteDetailsService } from './quote-details/service' +import { IlpQuoteDetails } from './quote-details/model' export interface IlpPaymentService extends PaymentMethodService {} @@ -218,8 +219,11 @@ async function pay( } if (!outgoingPayment.quote.ilpQuoteDetails) { - outgoingPayment.quote.ilpQuoteDetails = - await deps.ilpQuoteDetailsService.getByQuoteId(outgoingPayment.quote.id) + outgoingPayment.quote.ilpQuoteDetails = await IlpQuoteDetails.query( + deps.knex + ) + .where('quoteId', outgoingPayment.quote.id) + .first() if (!outgoingPayment.quote.ilpQuoteDetails) { throw new PaymentMethodHandlerError(