Fix syncing issue upon send

This commit is contained in:
pokkst 2023-02-01 20:59:01 -06:00
parent a147faef70
commit 8daa08bd6b
No known key found for this signature in database
GPG key ID: 90C2ED85E67A50FF

View file

@ -92,13 +92,13 @@ public class MoneroHandlerThread extends Thread implements WalletListener {
@Override @Override
public void newBlock(long height) { public void newBlock(long height) {
refresh(); refresh(false);
BlockchainService.getInstance().setDaemonHeight(wallet.isSynchronized() ? height : 0); BlockchainService.getInstance().setDaemonHeight(wallet.isSynchronized() ? height : 0);
} }
@Override @Override
public void updated() { public void updated() {
refresh(); refresh(false);
} }
@Override @Override
@ -115,15 +115,17 @@ public class MoneroHandlerThread extends Thread implements WalletListener {
BlockchainService.getInstance().setDaemonHeight(wallet.getDaemonBlockChainHeight()); BlockchainService.getInstance().setDaemonHeight(wallet.getDaemonBlockChainHeight());
wallet.setSynchronized(); wallet.setSynchronized();
wallet.store(); wallet.store();
refresh(); refresh(true);
} }
BlockchainService.getInstance().setConnectionStatus(status); BlockchainService.getInstance().setConnectionStatus(status);
} }
private void refresh() { private void refresh(boolean refreshCoins) {
wallet.refreshHistory(); wallet.refreshHistory();
if(refreshCoins) {
wallet.refreshCoins(); wallet.refreshCoins();
}
listener.onRefresh(); listener.onRefresh();
} }