Skip to content

Commit

Permalink
938/mk/create receiver (#986)
Browse files Browse the repository at this point in the history
* feat(backend): add RemoteIncomingPaymentService

* feat(backend, map): add createRemoteIncomingPayment to graphql schema

* feat(backend): add resolver for CreateRemoteIncomingPayment mutation

* chore(backend): use new Access types, update logging

* chore(backend): prettier for test

* chore(backend): update grantOptions.accessType

* chore(backend, open-payments): export open payment mocks from library

* 938/mk/create receiver (#998)

* feat(backend): add create method for receiverService

* chore(backend): createRemoteIncomingPayment mutation -> createReceiver mutation

* chore(backend): update ReceiverService tests to use mocks when fetching remote incoming payments

* chore(backend): use open-payments mocks

* chore(backend): fix receiver tests

* chore(backend): update receiver tests

* chore(backend): couple more updated tests

* chore(open-payments): fix uuid types

* chore(backend): fix tests and types after merge

* chore(backend): test fixing

* feat(backend): allow creation of local incoming payment via receiverService.create

* chore(backend): fix test name

* chore(backend, map): make sure receiver & incomingPayment id are strings/urls

* chore(backend): remove optional chaining

* feat(backend): return errors when creating remote incoming payments or receivers

* chore(backend): fix any ts warning

* chore(backend): addressing feedback

* chore(backend): addressing feedback

* feat(backend): throw in static Receiver methods instead of returning undefined

* chore(backend): remove unnecessary type assertion in tests

* chore(backend): replace type assertions with asserts
  • Loading branch information
mkurapov committed Jan 24, 2023
1 parent 7482175 commit d40c2e6
Show file tree
Hide file tree
Showing 24 changed files with 1,870 additions and 185 deletions.
4 changes: 4 additions & 0 deletions packages/backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ import { IlpPlugin, IlpPluginOptions } from './shared/ilp_plugin'
import { createValidatorMiddleware, HttpMethod, isHttpMethod } from 'openapi'
import { PaymentPointerKeyService } from './open_payments/payment_pointer/key/service'
import { AccessType, AuthenticatedClient } from 'open-payments'
import { RemoteIncomingPaymentService } from './open_payments/payment/incoming_remote/service'
import { ReceiverService } from './open_payments/receiver/service'
import { Client as TokenIntrospectionClient } from 'token-introspection'

export interface AppContextData {
Expand Down Expand Up @@ -156,6 +158,8 @@ export interface AppServices {
paymentPointerKeyRoutes: Promise<PaymentPointerKeyRoutes>
paymentPointerRoutes: Promise<PaymentPointerRoutes>
incomingPaymentService: Promise<IncomingPaymentService>
remoteIncomingPaymentService: Promise<RemoteIncomingPaymentService>
receiverService: Promise<ReceiverService>
streamServer: Promise<StreamServer>
webhookService: Promise<WebhookService>
quoteService: Promise<QuoteService>
Expand Down
330 changes: 330 additions & 0 deletions packages/backend/src/graphql/generated/graphql.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d40c2e6

Please sign in to comment.