From 26b15058271ea72ff4732268240fc359778d7121 Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Thu, 7 Nov 2024 15:45:36 +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..d06361752 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(); } };