-
Notifications
You must be signed in to change notification settings - Fork 89
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): tenant support for wallet address (#3114) #3152
base: 2893/multi-tenancy-v1
Are you sure you want to change the base?
Conversation
…nanted-wallet-addresses
@@ -1213,6 +1226,8 @@ type CreateReceiverResponse { | |||
} | |||
|
|||
input CreateWalletAddressInput { | |||
"Unique identifier of the tenant associated with the wallet address. This cannot be changed." | |||
tenantId: String! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would need to be removed at a later stage (once we obtain the tenant from the signature):
#2928
@@ -53,6 +62,9 @@ export class WalletAddress | |||
public readonly assetId!: string | |||
public asset!: Asset | |||
|
|||
public readonly tenantId!: string | |||
public tenant!: Tenant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually need the tenant!: Tenant
property on the model? I'm not sure we'd end up using it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally I thought we would need it, but since we have authServer
and resourceServer
, we are good. Will update.
@@ -176,13 +181,19 @@ async function createWalletAddress( | |||
const walletAddress = await WalletAddress.query( | |||
deps.knex | |||
).insertGraphAndFetch({ | |||
tenantId: options.tenantId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we would need the gets and update to also take in tenantId in the query, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, since you cannot move a wallet between tenants? Unless that is something we want? @mkurapov
Changes proposed in this pull request
Context
Checklist
fixes #number
user-docs
label (if necessary)