tangle-network / dapp

Monorepo for the Tangle ecosystem.
https://app.tangle.tools
Apache License 2.0
29 stars 15 forks source link

[FEAT] Restake Independent Profile Setup Flow #1988

Closed monaiuu closed 7 months ago

monaiuu commented 8 months ago

Description

Implement functionality allowing users to select the 'Independent' profile type within the Restake UI. This flow will enable users to allocate variable amounts of their stake to each selected service independently.

Key Points:

Profile Selection:

Roles/ Amount Input Selection:

Dynamic Chart Component:

Figma Link

Screenshot

Image

yurixander commented 7 months ago
  • Validate inputs to ensure they meet or exceed the minimum required amount for each role.
  • Implement an error handling mechanism that prompts the user if the input amount is less than the minimum required for a role.

@drewstone Is there a minimum amount required per role? I currently seem to be able to set/update my profile with the role amounts being minimal (ie. 1), and looking around at Chain State query functions, under roles, nothing seems to provide the minimum amounts required for each role.

Screenshot @Arc dJlLqsog

yurixander commented 7 months ago
  • Validate inputs to ensure they meet or exceed the minimum required amount for each role.
  • Implement an error handling mechanism that prompts the user if the input amount is less than the minimum required for a role.

Note: From what I've found, it seems that the minimum restaking amount is not based on a per-role basis, but rather a global constant. So, I have adjusted the logic a bit to work for that instead of per-role.

See on the Substrate Portal: Chain State -> roles.minRestakingBond().

See more related to this here.