Skip to content

Commit

Permalink
Reset activityDashboard when changing explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
Duddino committed Sep 20, 2023
1 parent 00e1e70 commit 10e2555
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/Activity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ async function update(fNewOnly = false, sync = true) {
if (!cNet) return;
// Prevent the user from spamming refreshes
if (cNet.historySyncing) return;
if (updating.value) return;
let arrTXs;
try {
// Set the updating animation
Expand Down
2 changes: 1 addition & 1 deletion scripts/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ export class ExplorerNetwork extends Network {
async syncTxHistoryChunk(fNewOnly = false) {
// Do not allow multiple calls at once
if (this.historySyncing) {
return false;
return this.arrTxHistory;
}

try {
Expand Down
3 changes: 3 additions & 0 deletions scripts/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ export async function setExplorer(explorer, fSilent = false) {
// Enable networking + notify if allowed
const network = new ExplorerNetwork(cExplorer.url, wallet.getMasterKey());
setNetwork(network);

activityDashboard.reset();
stakingDashboard.reset();

// Update the selector UI
doms.domExplorerSelect.value = cExplorer.url;
Expand Down

0 comments on commit 10e2555

Please sign in to comment.