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

Improve input validation from ManaCalculator #1337

Merged
merged 15 commits into from
Dec 8, 2023

Conversation

VmMad
Copy link
Member

@VmMad VmMad commented Nov 16, 2023

Description of change

Improve input validation of inputs in the mana calculator

Links to any relevant issues

Fixes #1276

Type of change

  • Documentation Enhancement

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own changes
  • I have made sure that added/changed links still work
  • I have commented my code, particularly in hard-to-understand areas

@VmMad VmMad marked this pull request as ready for review November 22, 2023 16:51
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 8ab5c57

✅ Preview: https://iota-wiki-6hzmxn19q-iota1.vercel.app

@VmMad VmMad changed the title improve input validation from ManaCalculator Improve input validation from ManaCalculator Nov 22, 2023
@Dr-Electron
Copy link
Collaborator

Dr-Electron commented Nov 27, 2023

  • I can enter an initial epoch of 0
  • Owned amount can be bigger than Supply. (Technically it needs to be summed up with the existing stake and that can't be bigger than the total supply, (I guess in a future version we could even check how many tokens are not circulating and use that 👀 ))
    • If we handle this, we should also handle it in the validators config where until now I just throw an error (Pools must have (collectively) at most iotaSupply tokens). Maybe we could show an info window tho? So that people understand why the can't increase the stake anymore?

@begonaalvarezd begonaalvarezd marked this pull request as draft November 27, 2023 10:01
@VmMad VmMad marked this pull request as ready for review November 28, 2023 14:16
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: d77fc1c

✅ Preview: https://iota-wiki-fm7nre9pv-iota1.vercel.app

@VmMad VmMad requested a review from begonaalvarezd November 28, 2023 15:28
Copy link
Collaborator

@Dr-Electron Dr-Electron left a comment

Choose a reason for hiding this comment

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

For some reason no max supply checks work for me 🤔

src/components/ManaCalculator/components/RoleSection.tsx Outdated Show resolved Hide resolved
src/components/ManaCalculator/components/ValidatorCard.tsx Outdated Show resolved Hide resolved
@Dr-Electron
Copy link
Collaborator

@VmMad VmMad requested review from marc2332 and removed request for begonaalvarezd and marc2332 November 29, 2023 09:55
@VmMad VmMad marked this pull request as draft November 29, 2023 10:29
@begonaalvarezd begonaalvarezd self-requested a review December 7, 2023 16:43
@begonaalvarezd begonaalvarezd marked this pull request as ready for review December 7, 2023 16:48
Copy link
Contributor

github-actions bot commented Dec 7, 2023

This pull request has been deployed to Vercel.

Latest commit: d4fa7b7

✅ Preview: https://iota-wiki-dzf2s3quy-iota1.vercel.app

@Dr-Electron
Copy link
Collaborator

Same here @VmMad, thanks ❤️

@Dr-Electron Dr-Electron merged commit c5ddd17 into main Dec 8, 2023
11 checks passed
@Dr-Electron Dr-Electron deleted the fix/mana-calculator/add-input-validation branch December 8, 2023 13:25
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.

[Task]: Mana Calculator: Fix all input validators
4 participants