Skip to content

Commit

Permalink
Merge branch 'master' into refactor-move-proposal-start-end-time-sett…
Browse files Browse the repository at this point in the history
…ing-to-editor
  • Loading branch information
wa0x6e authored Dec 3, 2024
2 parents 44ea912 + 3519562 commit fb00c77
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/ui/src/composables/usePropositionPower.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ export function usePropositionPower() {
}
);

return { fetch, get };
return { fetch, get, reset };
}
17 changes: 12 additions & 5 deletions apps/ui/src/views/Space/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ const {
reset
} = useWalletConnectTransaction();
const proposalsStore = useProposalsStore();
const { get: getPropositionPower, fetch: fetchPropositionPower } =
usePropositionPower();
const {
get: getPropositionPower,
fetch: fetchPropositionPower,
reset: resetPropositionPower
} = usePropositionPower();
const { strategiesWithTreasuries } = useTreasuries(props.space);
const termsStore = useTermsStore();
Expand Down Expand Up @@ -286,9 +289,13 @@ function handleFetchPropositionPower() {
}
watch(
() => web3.value.account,
toAccount => {
if (!toAccount) return;
[() => web3.value.account, () => web3.value.authLoading],
([toAccount, toAuthLoading], [fromAccount]) => {
if (fromAccount && toAccount && fromAccount !== toAccount) {
resetPropositionPower();
}
if (toAuthLoading || !toAccount) return;
handleFetchPropositionPower();
},
Expand Down

0 comments on commit fb00c77

Please sign in to comment.