-
Notifications
You must be signed in to change notification settings - Fork 21
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: fix duplicate uploaded key #1431
Conversation
If the users have the same key (by any chance), will they be able to upload the same key? |
@rico191013 please take a look at Radu's question and also on the story check the items that you solved. |
@@ -91,7 +92,15 @@ export class WalletAddressKeyService implements IWalletAddressKeyService { | |||
walletAddressId | |||
} | |||
|
|||
await WalletAddressKeys.query().insert(key) | |||
try { | |||
await WalletAddressKeys.query().insert(key) |
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.
@raducristianpopa For the sake of having a unique ID constraint for each key in the DB, every user can have one unique key for uploading, ensuring that others can't upload the same key.
Context
Changes