Hide unavailable stakes when adding device
annybs opened this issue · comments
% edgetest device add
Select a stake to assign this device to:
1. d2e91150 (Stargate)
2. 2afb7488 (Gateway)
3. 69213d41 (Host)
4. eb4c6478 (Host)
5. 93e3718d (Host)
6. 25f47bf9 (Host)
The Stargate stake shown here is unavailable - released to be precise - and shouldn't be displayed as an option in onboarding.
We should also improve clientside validation of the selected stake to handle both selection and argument input. IIRC it already checks if the device/stake are already assigned, but it doesn't prevent a released stake from being used.
@adamkdean What stake states are OK for device assignment? Can unlocking/unlocked stakes be assigned?
What stake states are OK for device assignment?
Only "active" stakes. That is, not unlocking, unlocked, or released. If a device is already assigned it can be overwritten.
Can unlocking/unlocked stakes be assigned?
Nope.