Skip to content
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

feat(backend): remove connections route (#1940) #2051

Merged
merged 3 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions packages/backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { HttpTokenService } from './payment-method/ilp/peer-http-token/service'
import { AssetService, AssetOptions } from './asset/service'
import { AccountingService } from './accounting/service'
import { PeerService } from './payment-method/ilp/peer/service'
import { connectionMiddleware } from './open_payments/connection/middleware'
import { createWalletAddressMiddleware } from './open_payments/wallet_address/middleware'
import { WalletAddress } from './open_payments/wallet_address/model'
import { WalletAddressService } from './open_payments/wallet_address/service'
Expand All @@ -34,10 +33,7 @@ import {
RequestAction
} from './open_payments/auth/middleware'
import { RatesService } from './rates/service'
import {
spspMiddleware,
SPSPConnectionContext
} from './payment-method/ilp/spsp/middleware'
import { spspMiddleware } from './payment-method/ilp/spsp/middleware'
import { SPSPRoutes } from './payment-method/ilp/spsp/routes'
import {
IncomingPaymentRoutes,
Expand Down Expand Up @@ -360,24 +356,8 @@ export class App {
'outgoingPaymentRoutes'
)
const quoteRoutes = await this.container.use('quoteRoutes')
const connectionRoutes = await this.container.use('connectionRoutes')
const { resourceServerSpec } = await this.container.use('openApi')

// GET /connections/{id}
router.get<DefaultState, SPSPConnectionContext>(
WALLET_ADDRESS_PATH + '/connections/:id',
connectionMiddleware,
spspMiddleware,
createValidatorMiddleware<ContextType<SPSPConnectionContext>>(
resourceServerSpec,
{
path: '/connections/{id}',
method: HttpMethod.GET
}
),
connectionRoutes.get
)

// POST /incoming-payments
// Create incoming payment
router.post<DefaultState, SignedCollectionContext<IncomingCreateBody>>(
Expand Down
8 changes: 0 additions & 8 deletions packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { createConnectorService } from './payment-method/ilp/connector'
import { createOpenAPI } from '@interledger/openapi'
import { createAuthenticatedClient as createOpenPaymentsClient } from '@interledger/open-payments'
import { createConnectionService } from './open_payments/connection/service'
import { createConnectionRoutes } from './open_payments/connection/routes'
import { createWalletAddressKeyService } from './open_payments/wallet_address/key/service'
import { createReceiverService } from './open_payments/receiver/service'
import { createRemoteIncomingPaymentService } from './open_payments/payment/incoming_remote/service'
Expand Down Expand Up @@ -292,13 +291,6 @@ export function initIocContainer(
streamServer: await deps.use('streamServer')
})
})
container.singleton('connectionRoutes', async (deps) => {
return createConnectionRoutes({
logger: await deps.use('logger'),
incomingPaymentService: await deps.use('incomingPaymentService'),
connectionService: await deps.use('connectionService')
})
})
container.singleton('receiverService', async (deps) => {
const config = await deps.use('config')
return await createReceiverService({
Expand Down
121 changes: 0 additions & 121 deletions packages/backend/src/open_payments/connection/routes.test.ts

This file was deleted.

35 changes: 0 additions & 35 deletions packages/backend/src/open_payments/connection/routes.ts

This file was deleted.