mirror of
https://github.com/Such-Software/smirk-website.git
synced 2026-11-13 09:14:03 +01:00
feat: single-asset auth, UI improvements
- Auth flow now uses single signature from user's chosen coin - Update SmirkSignResult types to match extension API - Add Creepster font for branding - Better error messages from API responses - Update docs to reflect single-asset auth is working
This commit is contained in:
+4
-4
@@ -34,8 +34,8 @@ export async function getChallenge(origin: string): Promise<ChallengeResponse> {
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
const error = await res.json().catch(() => ({ message: 'Request failed' }));
|
||||
throw new Error(error.message || 'Failed to get challenge');
|
||||
const data = await res.json().catch(() => ({}));
|
||||
throw new Error(data.error || data.message || 'Failed to get challenge');
|
||||
}
|
||||
|
||||
return res.json();
|
||||
@@ -55,8 +55,8 @@ export async function verifySignature(
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
const error = await res.json().catch(() => ({ message: 'Request failed' }));
|
||||
throw new Error(error.message || 'Failed to verify signature');
|
||||
const data = await res.json().catch(() => ({}));
|
||||
throw new Error(data.error || data.message || 'Failed to verify signature');
|
||||
}
|
||||
|
||||
return res.json();
|
||||
|
||||
Reference in New Issue
Block a user