Skip to content

Commit

Permalink
fix: offchain pending proposal should use the proposal snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Oct 24, 2024
1 parent a20a5af commit bb984a6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/ui/src/composables/useVoteVotingPower.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { supportsNullCurrent } from '@/networks';
import { offchainNetworks, supportsNullCurrent } from '@/networks';
import { getIndex } from '@/stores/votingPowers';
import { NetworkID, Proposal, Space } from '@/types';

Expand All @@ -13,8 +13,10 @@ export function useVoteVotingPower() {

function proposalSnapshot(proposal: Proposal) {
return (
(proposal.state === 'pending' ? null : proposal.snapshot) ||
latestBlock(proposal.network)
(proposal.state === 'pending' &&
!offchainNetworks.includes(proposal.network)
? null
: proposal.snapshot) || latestBlock(proposal.network)
);
}

Expand Down

0 comments on commit bb984a6

Please sign in to comment.