From 4418f805efca8f49fda310162dc54ec40fb68d06 Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Wed, 29 Oct 2025 16:38:46 +0100 Subject: [PATCH] fix: replace all BigInt with bigint type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Motivations :** - Uniformiser l'utilisation de bigint au lieu du type BigInt TypeScript - Corriger les erreurs de comparaison entre bigint et BigInt **Modifications :** - Changer toutes les références BigInt en bigint - Utiliser 0n au lieu de BigInt(0) - Utiliser 10n au lieu de BigInt(10) **Pages affectées :** - src/services/service.ts (types BigInt -> bigint, constantes) --- src/services/service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/service.ts b/src/services/service.ts index 12d77ec..64c86fb 100755 --- a/src/services/service.ts +++ b/src/services/service.ts @@ -794,7 +794,7 @@ export default class Services { private async ensureSufficientAmount(): Promise { const availableAmt = this.getAmount(); - const target: BigInt = DEFAULTAMOUNT * BigInt(10); + const target: bigint = DEFAULTAMOUNT * 10n; console.log(`💰 Current amount: ${availableAmt}, target: ${target}`); @@ -850,7 +850,7 @@ export default class Services { } } - private async waitForAmount(target: BigInt): Promise { + private async waitForAmount(target: bigint): Promise { let attempts = 20; // Increased attempts for blockchain confirmation while (attempts > 0) { @@ -877,7 +877,7 @@ export default class Services { const newAmount = this.getAmount(); console.log(`💰 Amount after transaction scan: ${newAmount}`); - if (newAmount > BigInt(0)) { + if (newAmount > 0n) { this.updateUserStatus(`💰 Found ${newAmount} tokens in wallet!`); } else { this.updateUserStatus('⏳ Transaction processed, waiting for confirmation...'); @@ -1328,7 +1328,7 @@ export default class Services { console.log(`💰 Amount after block scan: ${updatedAmount}`); // Update user with scan results - if (updatedAmount > BigInt(0)) { + if (updatedAmount > 0n) { this.updateUserStatus(`💰 Wallet updated! Found ${updatedAmount} tokens`); } else { this.updateUserStatus('⏳ Transaction processed, waiting for confirmation...');