Skip to content

Commit

Permalink
Buck review update
Browse files Browse the repository at this point in the history
  • Loading branch information
martonp committed Aug 12, 2024
1 parent 38c95e4 commit cfb291c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
19 changes: 17 additions & 2 deletions client/asset/dcr/dcr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions client/webserver/site/src/js/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cfb291c

Please sign in to comment.