From 3c718ae4c6d16e44fb3e37618d5d33d3fdda264f Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Thu, 7 Nov 2024 18:52:44 +0100 Subject: [PATCH] fix(receive): refresh onchain wallet after receive --- src/utils/wallet/index.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/utils/wallet/index.ts b/src/utils/wallet/index.ts index fd23517fb..ee8f6ba21 100644 --- a/src/utils/wallet/index.ts +++ b/src/utils/wallet/index.ts @@ -1041,17 +1041,14 @@ const onMessage: TOnMessage = async (key, data): Promise => { 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': @@ -1084,9 +1081,8 @@ const onMessage: TOnMessage = async (key, data): Promise => { }); break; case 'newBlock': - refreshWallet({ - onchain: false, // Beignet will handle this. - }).then(); + // Beignet will handle this. + refreshWallet({ onchain: false }).then(); syncLedger(); } };