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

Improved checks for cosmos addresses #101

Open
sudovickili opened this issue Apr 30, 2022 · 0 comments
Open

Improved checks for cosmos addresses #101

sudovickili opened this issue Apr 30, 2022 · 0 comments

Comments

@sudovickili
Copy link
Collaborator

When we lookup a user's cosmos wallet address to update their roles, we currently try to find any wallet address that gets used, in descending order of address. There are a few edgecases here:

  • If a user has never re-joined since we started storing the wallet address, this will fail to find a wallet address
  • If a user is using multiple cosmos wallets, this may find the wrong address
  • If a user has a new cosmos wallet address, this may find the wrong address

We identified a handful of possible fixes to the DB implementation if any of these are an issue:

  1. The getCosmosHubAddressFromDiscordId should also filter on the discord guild ID. In other words, we should allow users to associate one wallet per discord guild that they're joining from
  2. The function should lookup the most recently used wallet address for this user + guild combination via the created_at column, so that we may use the one most likely to be up-to-date
  3. If still no wallet is found, we should have some prompting for the guild admin to ask that user to rejoin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant