From 86b17100302fcbdaf4f246bb93451bb8a1a87621 Mon Sep 17 00:00:00 2001 From: padreug Date: Sun, 14 Sep 2025 23:23:55 +0200 Subject: [PATCH] Update WalletService to adjust transaction amount and fee calculations - Modified the transaction amount to be divided by 1000 for accurate representation. - Updated the fee calculation to also divide by 1000, ensuring consistency in transaction data. These changes enhance the accuracy of transaction details displayed in the wallet module. --- src/modules/wallet/services/WalletService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/wallet/services/WalletService.ts b/src/modules/wallet/services/WalletService.ts index fa99e76..f392b2b 100644 --- a/src/modules/wallet/services/WalletService.ts +++ b/src/modules/wallet/services/WalletService.ts @@ -269,12 +269,12 @@ export default class WalletService extends BaseService { // Transform to our transaction format this._transactions.value = payments.map((payment: any) => ({ id: payment.payment_hash, - amount: Math.abs(payment.amount), + amount: Math.abs(payment.amount) / 1000, description: payment.memo || payment.description || 'No description', timestamp: payment.time ? new Date(payment.time * 1000) : new Date(), type: payment.amount > 0 ? 'received' : 'sent', status: payment.pending ? 'pending' : 'confirmed', - fee: payment.fee + fee: payment.fee ? payment.fee / 1000 : undefined })).sort((a: PaymentTransaction, b: PaymentTransaction) => b.timestamp.getTime() - a.timestamp.getTime() )