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

Feature - Show current hDAO curation amount #1336

Open
wants to merge 3,740 commits into
base: main
Choose a base branch
from

Conversation

TezzardzGoneWild
Copy link
Contributor

@TezzardzGoneWild TezzardzGoneWild commented Nov 7, 2021

The Config -> Advanced section does not currently show you the value saved for your curation making it impossible to see how much will be spent when curating without going into dev tools & local storage (or updating the value prior to each curation). Additionally, it accepts non-integer values, so you can pass in any string.

  • Fetch the value of hDAO_config from local storage when initializing the state and feed that to the Input instead of undefined. This will not care if there is no value in local storage -- it will initialize it as empty in the same way it was with it being explicitly told to always use undefined
  • Use type="number" for the Input. This will ensure only valid values are passed in, and it will prevent it from auto-populating with invalid values that may already be there from when there were no restrictions (invalid values will be populated in the same way as the explicit undefined). This restriction does mean the value needs to be converted .toString() prior to being written to local storage, and ... || '' was added in to prevent errors when someone attempts to save without any changes having been made.

Below are some quick screenshots to show what happens in each of the cases

When the page is loaded and there is no local storage value:

image

When the page is loaded and there is a valid local storage value:

image

When the page is loaded and there is an invalid local storage value:

image

@TezzardzGoneWild TezzardzGoneWild changed the title Feature/show current hdao curation amount Feature - Show current hDAO curation amount Nov 7, 2021
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.