Skip to content

[Multi-Tenant] Tenanted Outgoing Payments #3119

Closed
@njlie

Description

@njlie

Outgoing Payments should become tenanted as per the Multi-Tenancy design, and will be logically separated in the backend database by a tenantId row that serves as a foreign key on the tenants table.

  • Add tenantId row to outgoingPayments table that is required and maps to an id on the tenants table.
  • Add tenantId to database queries on outgoing payments.
  • Acquire tenantId from request headers on routes involving outgoing payments and pass them into outgoing payment service logic.
  • Include tenantId in path of outgoing payment URL. e.g. http://exampe-rafiki/:tenantId/outgoing-payments/:id
  • Note: the outgoing payment should be created only for the same tenant/wallet address where the quote was created, i.e. since an outgoing payment depends on a quote (which in turn depends on a wallet address), we shouldn't be able to have a situation where we have an outgoing payment on tenant B and a quote on tenant A.

Prerequisites

Metadata

Metadata

Assignees

Labels

pkg: backendChanges in the backend package.

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions