diff --git a/client/asset/dcr/dcr.go b/client/asset/dcr/dcr.go index 259ba3ad77..3bbcb5c720 100644 --- a/client/asset/dcr/dcr.go +++ b/client/asset/dcr/dcr.go @@ -4835,7 +4835,22 @@ func (dcr *ExchangeWallet) shutdown() { } // SyncStatus is information about the blockchain sync status. -func (dcr *ExchangeWallet) SyncStatus() (*asset.SyncStatus, error) { +func (dcr *ExchangeWallet) SyncStatus() (ss *asset.SyncStatus, err error) { + defer func() { + var synced bool + if ss != nil { + synced = ss.Synced + } + + if wasSynced := dcr.previouslySynced.Swap(synced); synced && !wasSynced { + dcr.tipMtx.RLock() + tip := dcr.currentTip + dcr.tipMtx.RUnlock() + + dcr.syncTxHistory(dcr.ctx, uint64(tip.height)) + } + }() + // If we have a rescan running, do different math. dcr.rescan.RLock() rescanProgress := dcr.rescan.progress @@ -4857,7 +4872,7 @@ func (dcr *ExchangeWallet) SyncStatus() (*asset.SyncStatus, error) { } // No rescan in progress. Ask wallet. - ss, err := dcr.wallet.SyncStatus(dcr.ctx) + ss, err = dcr.wallet.SyncStatus(dcr.ctx) if err != nil { return nil, err } diff --git a/client/webserver/site/src/js/wallets.ts b/client/webserver/site/src/js/wallets.ts index b5adf377e9..ee0d1ec1ec 100644 --- a/client/webserver/site/src/js/wallets.ts +++ b/client/webserver/site/src/js/wallets.ts @@ -974,6 +974,7 @@ export default class WalletsPage extends BasePage { for (const b of assetSelect.children) b.classList.remove('selected') this.assetButtons[assetID].bttn.classList.add('selected') this.selectedAssetID = assetID + this.page.hideMixTxsCheckbox.checked = true this.updateDisplayedAsset(assetID) this.showAvailableMarkets(assetID) const a = this.showRecentActivity(assetID)