Update WalletService and WalletPage to handle timestamps more robustly

- Modified WalletService to set a default timestamp when payment time is not provided, ensuring consistent date handling.
- Enhanced WalletPage to validate timestamps before formatting, preventing potential errors and improving user experience by displaying a placeholder for invalid timestamps.

These changes improve the reliability of transaction data presentation in the wallet module.
This commit is contained in:
padreug 2025-09-14 23:23:23 +02:00
parent e5054fdb9d
commit 876eb4f20b
2 changed files with 14 additions and 5 deletions

View file

@ -271,7 +271,7 @@ export default class WalletService extends BaseService {
id: payment.payment_hash,
amount: Math.abs(payment.amount),
description: payment.memo || payment.description || 'No description',
timestamp: new Date(payment.time * 1000),
timestamp: payment.time ? new Date(payment.time * 1000) : new Date(),
type: payment.amount > 0 ? 'received' : 'sent',
status: payment.pending ? 'pending' : 'confirmed',
fee: payment.fee