hypercore-one / syrius

MIT License
0 stars 0 forks source link

Unable to withdraw deposited QSR for Sentinel with Syrius #34

Closed KingGorrin closed 7 months ago

KingGorrin commented 1 year ago

Is your feature request related to a problem? Please describe. It is not possible to withdraw deposited QSR for the Sentinel registration process with Syrius.

See this link for more information about the problem

Describe the solution you'd like Add a withdraw QSR button to step 2 of the Sentinel registration step, similar to step 3 of the Pillar registration step.

KingGorrin commented 1 year ago

Interestingly the Sentinel stepper already has a withdraw qsr step implemented, but it is only shown when depositedQsr >= _qsrCost. Changing the visible: depositedQsr >= 0, or visible: true, would always show how much is needed and how much has been deposited.

Also noticed that the _qsrAmountController is disabled and initialized with the _qsrCost, but the _qsrAmountValidator validates on the _maxQsrAmount which is calculated _qsrCost - (depositedQsr - _withdrawnQSR). This means if you deposit 1 or more QSR with the CLI, the deposit button will never be enabled.

KingGorrin commented 1 year ago

The QSR management step of the pillar implementation works better than the sentinel impl. I'll continue with this issue when https://github.com/zenon-network/syrius/pull/19 is merged.