This PR fixes the crashing that occurs when undelegating.
Closes #684
The crash occurs when the user undelegates all the staked tokens from a validator.
The reason behind the crash is a null error that happens when the app updates the user's staked tokens following an undelegation action. In this case, the Undelegate window does not close fast enough, and tries to reference the staked amount for the validator that the user was trying to undelegate from, resulting in a crash as those staked tokens technically do not exist anymore, as they have been undelegated.
This PR fixes the crashing that occurs when undelegating.
Closes #684
The crash occurs when the user undelegates all the staked tokens from a validator.
The reason behind the crash is a null error that happens when the app updates the user's staked tokens following an undelegation action. In this case, the
Undelegate
window does not close fast enough, and tries to reference the staked amount for the validator that the user was trying to undelegate from, resulting in a crash as those staked tokens technically do not exist anymore, as they have been undelegated.