Skip to content

Commit

Permalink
fix: reset firstNoteBucketIndexFetched upon account change
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Dec 5, 2024
1 parent ebfdeff commit 71d084b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ const bucketsCount = computed(() => {
const unfetchedBucketsCount = computed(() => {
if (!noteBucketsInfo.value) return 0;
return (
firstNoteBucketIndexFetched.value -
noteBucketsInfo.value.first.unwrap().index
firstNoteBucketIndexFetched.value ? firstNoteBucketIndexFetched.value -
noteBucketsInfo.value.first.unwrap().index : noteBucketsInfo.value.last.unwrap().index - noteBucketsInfo.value.first.unwrap().index +1
);
});
Expand Down Expand Up @@ -575,7 +575,7 @@ const subscribeWhatsReady = async () => {
//console.log("skipping api init. It seems the ShieldingTarget api is already subscribed to balance changes");
return;
}
firstNoteBucketIndexFetched.value = null;
const wsProvider = new WsProvider(chainConfigs[shieldingTarget.value].api);
console.log(
"trying to init api at " + chainConfigs[shieldingTarget.value].api,
Expand Down

0 comments on commit 71d084b

Please sign in to comment.