Merge branch 'master' into 5376-merge-attempt

This commit is contained in:
nymkappa 2024-12-09 08:56:55 +01:00
commit e3953a6dca
No known key found for this signature in database
GPG Key ID: 92358FC85D9645DE

View File

@ -84,8 +84,8 @@ class WalletApi {
// resync address transactions from esplora
async $syncWalletAddress(wallet: Wallet, address: WalletAddress): Promise<void> {
// fetch full transaction data if the address is new or still active
const refreshTransactions = !wallet.addresses[address.address] || address.active;
// fetch full transaction data if the address is new or still active and hasn't been synced in the last hour
const refreshTransactions = !wallet.addresses[address.address] || (address.active && (Date.now() - wallet.addresses[address.address].lastSync) > 60 * 60 * 1000);
if (refreshTransactions) {
try {
const summary = await bitcoinApi.$getAddressTransactionSummary(address.address);