Wallet: Sending again the NodeId to fetch the saturation (#1375)

* Sending again the identity key when fetching the saturation

* Remove non-null assertion
This commit is contained in:
Gala
2022-06-16 11:39:23 +02:00
committed by GitHub
parent e1a1b70832
commit 8eae2e3136
@@ -81,13 +81,12 @@ export const DelegateModal: React.FC<{
}
};
const validateIdentityKey = async (isValid: boolean) => {
const validateIdentityKey = (isValid: boolean) => {
if (!isValid) {
setErrorIdentityKey('Identity key is invalid');
setErrorNodeSaturation(undefined);
} else {
setErrorIdentityKey(undefined);
await handleCheckStakeSaturation(identityKey!);
}
};
@@ -109,8 +108,9 @@ export const DelegateModal: React.FC<{
}
};
const handleIdentityKeyChanged = async (newIdentityKey: string) => {
const handleIdentityKeyChanged = (newIdentityKey: string) => {
setIdentityKey(newIdentityKey);
handleCheckStakeSaturation(newIdentityKey);
if (onIdentityKeyChanged) {
onIdentityKeyChanged(newIdentityKey);