mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 13:37:59 +00:00
fix: hardcode chain genesis hashes in WC session to fix signing
WC session was missing Asset Hub and People Chain because their APIs weren't connected yet at session creation time. Also fix catch blocks in ExistingCitizenAuth that referenced undefined err variable.
This commit is contained in:
@@ -52,8 +52,8 @@ export const ExistingCitizenAuth: React.FC<ExistingCitizenAuthProps> = ({ onClos
|
||||
const authChallenge = generateAuthChallenge(citizenNumber);
|
||||
setChallenge(authChallenge);
|
||||
setStep('signing');
|
||||
} catch {
|
||||
if (import.meta.env.DEV) console.error('Verification error:', err);
|
||||
} catch (err) {
|
||||
console.error('Verification error:', err);
|
||||
setError(t('existingAuth.verificationFailed'));
|
||||
setStep('error');
|
||||
}
|
||||
@@ -98,9 +98,9 @@ export const ExistingCitizenAuth: React.FC<ExistingCitizenAuthProps> = ({ onClos
|
||||
onClose();
|
||||
window.location.href = '/citizens';
|
||||
}, 2000);
|
||||
} catch {
|
||||
if (import.meta.env.DEV) console.error('Signature error:', err);
|
||||
setError(t('existingAuth.signError'));
|
||||
} catch (err) {
|
||||
console.error('Signature error:', err);
|
||||
setError(err instanceof Error ? err.message : t('existingAuth.signError'));
|
||||
setStep('error');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user