Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dao sync text after restore from seed #2836

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/java/bisq/core/app/WalletAppSetup.java
Expand Up @@ -117,7 +117,7 @@ void init(@Nullable Consumer<String> chainFileLockedExceptionHandler,
} else if (percentage > 0.0) {
result = Res.get("mainView.footer.btcInfo",
peers,
Res.get("mainView.footer.btcInfo.synchronizedWith"),
Res.get("mainView.footer.btcInfo.synchronizingWith"),
getBtcNetworkAsString() + ": " + formatter.formatToPercentWithSymbol(percentage));
} else {
result = Res.get("mainView.footer.btcInfo",
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/i18n/displayStrings.properties
Expand Up @@ -241,6 +241,7 @@ mainView.footer.localhostBitcoinNode=(localhost)
mainView.footer.btcInfo=Bitcoin network peers: {0} / {1} {2}
mainView.footer.btcInfo.initializing=Connecting to Bitcoin network
mainView.footer.bsqInfo.synchronizing=/ Synchronizing DAO
mainView.footer.btcInfo.synchronizingWith=Synchronizing with
mainView.footer.btcInfo.synchronizedWith=Synchronized with
mainView.footer.btcInfo.connectingTo=Connecting to
mainView.footer.btcInfo.connectionFailed=connection failed
Expand Down
Expand Up @@ -270,13 +270,23 @@ private void onUpdateAnyChainHeight() {
chainSyncIndicator.setManaged(!synced);
if (synced) {
chainHeightLabel.setText(Res.get("dao.wallet.chainHeightSynced",
currentBlockHeight,
walletChainHeight));
currentBlockHeight));
} else {
chainSyncIndicator.setProgress(progress);
chainHeightLabel.setText(Res.get("dao.wallet.chainHeightSyncing",
currentBlockHeight,
walletChainHeight));
if (walletChainHeight > currentBlockHeight) {
// Normally we get the latest block height from BitcoinJ as the target height,
// and we request BSQ blocks from seed nodes up to latest block
chainHeightLabel.setText(Res.get("dao.wallet.chainHeightSyncing",
currentBlockHeight,
walletChainHeight));
} else {
// But when restoring from seed, we receive the latest block height
// from the seed nodes while BitcoinJ has not received all blocks yet and
// is still syncing
chainHeightLabel.setText(Res.get("dao.wallet.chainHeightSyncing",
walletChainHeight,
currentBlockHeight));
}
}
} else {
chainHeightLabel.setText(Res.get("dao.wallet.chainHeightSyncing",
Expand Down