fix: correct BigInt type and PasswordCredential annotations
**Motivations :** - Corriger le type de retour de getAmount() pour utiliser bigint au lieu de BigInt - Utiliser @ts-ignore au lieu de @ts-expect-error pour PasswordCredential API **Modifications :** - Changer getAmount() return type de BigInt à bigint - Remplacer @ts-expect-error par @ts-ignore pour PasswordCredential **Pages affectées :** - src/services/service.ts (type de retour getAmount) - src/services/secure-credentials.service.ts (annotations PasswordCredential)
This commit is contained in:
parent
aa95537254
commit
6f54d8ad51
@ -944,14 +944,14 @@ QR Code URL: ${qrUrl}`);
|
||||
|
||||
try {
|
||||
// Essayer de récupérer un mot de passe existant
|
||||
// @ts-ignore - PasswordCredential API may not be in TypeScript definitions
|
||||
const existingCredential = await navigator.credentials.get({
|
||||
// @ts-expect-error - PasswordCredential API may not be in TypeScript definitions
|
||||
password: true,
|
||||
mediation: 'optional'
|
||||
} as CredentialRequestOptions);
|
||||
} as any);
|
||||
|
||||
if (existingCredential?.type === 'password') {
|
||||
// @ts-expect-error - PasswordCredential API may not be in TypeScript definitions
|
||||
// @ts-ignore - PasswordCredential API may not be in TypeScript definitions
|
||||
const passwordCredential = existingCredential as any;
|
||||
console.log('🔐 Retrieved existing password from browser');
|
||||
return passwordCredential.password;
|
||||
@ -1032,9 +1032,9 @@ QR Code URL: ${qrUrl}`);
|
||||
|
||||
try {
|
||||
// Sauvegarder le mot de passe dans le gestionnaire de mots de passe du navigateur
|
||||
// @ts-expect-error - PasswordCredential API may not be in TypeScript definitions
|
||||
// @ts-ignore - PasswordCredential API may not be in TypeScript definitions
|
||||
if (typeof PasswordCredential !== 'undefined' && navigator.credentials && navigator.credentials.create) {
|
||||
// @ts-expect-error - PasswordCredential API may not be in TypeScript definitions
|
||||
// @ts-ignore - PasswordCredential API may not be in TypeScript definitions
|
||||
const credential = new PasswordCredential({
|
||||
id: '4nk-pbkdf2-password',
|
||||
password: password,
|
||||
@ -1115,14 +1115,14 @@ QR Code URL: ${qrUrl}`);
|
||||
}
|
||||
|
||||
try {
|
||||
// @ts-ignore - PasswordCredential API may not be in TypeScript definitions
|
||||
const credential = await navigator.credentials.get({
|
||||
// @ts-expect-error - PasswordCredential API may not be in TypeScript definitions
|
||||
password: true,
|
||||
mediation: 'optional'
|
||||
} as CredentialRequestOptions);
|
||||
} as any);
|
||||
|
||||
if (credential?.type === 'password') {
|
||||
// @ts-expect-error - PasswordCredential API may not be in TypeScript definitions
|
||||
// @ts-ignore - PasswordCredential API may not be in TypeScript definitions
|
||||
const passwordCredential = credential as any;
|
||||
console.log('🔐 Retrieved password from browser password manager');
|
||||
return passwordCredential.password;
|
||||
|
||||
@ -1328,7 +1328,7 @@ export default class Services {
|
||||
console.log(`💰 Amount after block scan: ${updatedAmount}`);
|
||||
|
||||
// Update user with scan results
|
||||
if (updatedAmount > 0n) {
|
||||
if (updatedAmount > BigInt(0)) {
|
||||
this.updateUserStatus(`💰 Wallet updated! Found ${updatedAmount} tokens`);
|
||||
} else {
|
||||
this.updateUserStatus('⏳ Transaction processed, waiting for confirmation...');
|
||||
@ -1745,7 +1745,7 @@ export default class Services {
|
||||
}
|
||||
}
|
||||
|
||||
public getAmount(): BigInt {
|
||||
public getAmount(): bigint {
|
||||
if (!this.sdkClient) {
|
||||
throw new Error('SDK not initialized - cannot get amount');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user