mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-10 15:40:22 -04:00
cache txs fetched from daemon
This commit is contained in:
parent
54eee73c04
commit
f9d700074a
3 changed files with 58 additions and 8 deletions
|
@ -178,7 +178,7 @@ public class TxIdTextField extends AnchorPane {
|
|||
private void updateConfidence(String txId) {
|
||||
MoneroTx tx = null;
|
||||
try {
|
||||
tx = xmrWalletService.getDaemon().getTx(txId); // TODO: cache results and don't re-fetch
|
||||
tx = xmrWalletService.getTxWithCache(txId);
|
||||
tx.setNumConfirmations(tx.isConfirmed() ? xmrWalletService.getConnectionsService().getLastInfo().getHeight() - tx.getHeight() : 0l); // TODO: use tx.getNumConfirmations() when MoneroDaemonRpc supports it
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue