Skip to content

Commit

Permalink
fix(receive): refresh onchain wallet after receive (#2340)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwltr authored Nov 26, 2024
1 parent 06258ce commit 0fbc9c3
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/utils/wallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1033,17 +1033,14 @@ const onMessage: TOnMessage = async (key, data): Promise<void> => {
receivedTxids.push(transaction.txid);
}
}
setTimeout(() => {
updateActivityList();
}, 500);
refreshWallet({ lightning: false }).then();
setTimeout(updateActivityList, 500);
bitkitLedger?.handleOnchainTx(txMsg.transaction);
break;
}
case 'transactionSent':
const txMsg = data as TTransactionMessage;
setTimeout(() => {
updateActivityList();
}, 500);
setTimeout(updateActivityList, 500);
bitkitLedger?.handleOnchainTx(txMsg.transaction);
break;
case 'connectedToElectrum':
Expand Down Expand Up @@ -1076,9 +1073,8 @@ const onMessage: TOnMessage = async (key, data): Promise<void> => {
});
break;
case 'newBlock':
refreshWallet({
onchain: false, // Beignet will handle this.
}).then();
// Beignet will handle this.
refreshWallet({ onchain: false }).then();
syncLedger();
}
};
Expand Down

0 comments on commit 0fbc9c3

Please sign in to comment.