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

Vli decimal column #68

Merged
merged 3 commits into from
Feb 15, 2022
Merged

Vli decimal column #68

merged 3 commits into from
Feb 15, 2022

Conversation

sudovickili
Copy link
Collaborator

Before:

Screen Shot 2022-02-14 at 9 23 17 PM

On this branch:

Screen Shot 2022-02-14 at 9 21 17 PM

Description:

Now that all current token rules in PROD have token values shifted by 6 decimals, we need /starry token-rule list to unshift those 6 decimals for display. We do this with a migration script that adds a new decimals integer column (defaulting to 6), then returning the new decimals property in the db get functions for use by tokenList.

Suggested QA:

  • Use /starry farewell to remove bot, ensure that created roles have been removed
  • Re-add the bot, expect a welcome message
  • Use /starry token-rule add normally
    • Select "Choose a token" normally
    • Select "I need to make a token" normally
    • Select the DAODAO option normally
  • Use /starry token-rule add incorrectly, expect helpful error
    • For the first two options, enter invalid cw20 address
    • For DAODAO option, type in an incorrect URL
  • Use starry join flow from an account that doesn't have the added token, expect no roles when finished
  • Use starry join flow from an account that does have the added token, expect all applicable roles to be added

Further QA:

  • In the middle of a wizard, click on a button from another step, expect a helpful error or it to be ignored
  • Reply to messages that are expecting emoji reaction inputs
  • Kick starrybot (not farewell) and re-add, ensuring normal functioning

This will default this value to 6 for now, as we just bumped up
all the current tokens to the 6 decimal place.
This includes updating the role-related db functions to now pass
back the new decimals column as well.
Copy link
Collaborator

@mikedotexe mikedotexe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need to add decimals column to the rolesSet function in db.js?
For when the cw20 flow gives us tokenInfo that includes the key decimals

Happy Valentines Day, boo!

@sudovickili
Copy link
Collaborator Author

I think we'll need to add decimals column to the rolesSet function in db.js? For when the cw20 flow gives us tokenInfo that includes the key decimals

🤦‍♀️ Oh yeah, the whole functionality bit. Should now be working, screenshot of my DB after running /starry token-rule add for both a native token and a cw20 token:

Screen Shot 2022-02-14 at 10 22 36 PM

@mikedotexe
Copy link
Collaborator

I think we'll need to add decimals column to the rolesSet function in db.js? For when the cw20 flow gives us tokenInfo that includes the key decimals

Happy Valentines Day, boo!

Easy to do in another PR :)

@mikedotexe mikedotexe merged commit 96dbd3e into main Feb 15, 2022
@mikedotexe mikedotexe deleted the vli-decimal-column branch February 15, 2022 17:50
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

Successfully merging this pull request may close these issues.

2 participants