Skip to content

Commit

Permalink
fix(receive): refresh onchain wallet after receive
Browse files Browse the repository at this point in the history
  • Loading branch information
pwltr committed Nov 7, 2024
1 parent 3927859 commit 26b1505
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 @@ -1041,17 +1041,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 @@ -1084,9 +1081,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 26b1505

Please sign in to comment.