Skip to content

Commit

Permalink
refactor(backend): handle grant lookup more gracefully in remote inco…
Browse files Browse the repository at this point in the history
…ming payment service (#2888)

* feat(backend): add grantService.getOrCreate method

* feat(backend): update grant lookup call

* feat(backend): add deletedAt to grants table

* feat(backend): add migrations for grants table

* chore(backend): separating into functions

* chore(backend): adding authServerService to list of services

* test(backend): adding tests for getOrCreate and getExistingGrant functions

* refactor(backend): let remote incoming payment use new grantService.getOrCreate function

* feat(backend): getting incoming payment with retry

* chore(backend): remove unused grant service functions

* chore(backend): merge migrations

* feat(backend): add subset actions if present

* feat(backend): add subset actions if present

* chore(backend): dont need some deps in receiver service

* test(backend): adding tests for receiver service

* test(backend): adding remote incoming payment service tests

* chore(backend): dont throw when resolving receiver, return undefined

* chore(backend): add some logging
  • Loading branch information
mkurapov authored Aug 23, 2024
1 parent 175a7cf commit 750f414
Show file tree
Hide file tree
Showing 8 changed files with 1,387 additions and 1,015 deletions.
7 changes: 1 addition & 6 deletions packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,19 +336,14 @@ export function initIocContainer(
})
})
container.singleton('receiverService', async (deps) => {
const config = await deps.use('config')
return await createReceiverService({
logger: await deps.use('logger'),
streamCredentialsService: await deps.use('streamCredentialsService'),
grantService: await deps.use('grantService'),
incomingPaymentService: await deps.use('incomingPaymentService'),
openPaymentsUrl: config.openPaymentsUrl,
walletAddressService: await deps.use('walletAddressService'),
openPaymentsClient: await deps.use('openPaymentsClient'),
remoteIncomingPaymentService: await deps.use(
'remoteIncomingPaymentService'
),
config: await deps.use('config')
)
})
})

Expand Down
Loading

0 comments on commit 750f414

Please sign in to comment.