mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-11-17 00:07:49 +00:00
get txs after sync to update from pool
This commit is contained in:
parent
8d7bb250c5
commit
4a57b26469
1 changed files with 4 additions and 2 deletions
|
@ -333,7 +333,9 @@ public class XmrWalletService {
|
||||||
Callable<MoneroSyncResult> task = () -> wallet.sync();
|
Callable<MoneroSyncResult> task = () -> wallet.sync();
|
||||||
Future<MoneroSyncResult> future = syncWalletThreadPool.submit(task);
|
Future<MoneroSyncResult> future = syncWalletThreadPool.submit(task);
|
||||||
try {
|
try {
|
||||||
return future.get();
|
MoneroSyncResult result = future.get();
|
||||||
|
wallet.getTxs(); // TODO: this is necessary to sync from pool, otherwise balance can be incorrect
|
||||||
|
return result;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new MoneroError(e.getMessage());
|
throw new MoneroError(e.getMessage());
|
||||||
}
|
}
|
||||||
|
@ -893,7 +895,7 @@ public class XmrWalletService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// register internal listener to notify external listeners
|
// register internal listener to notify external listeners
|
||||||
wallet.addListener(new XmrWalletListener());
|
wallet.addListener(new XmrWalletListener()); // TODO: initial snapshot calls getTxs() which updates balance after returning but will not announce change
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue