diff --git a/apps/ui/src/components/ProposalVoteApproval.vue b/apps/ui/src/components/ProposalVoteApproval.vue
index 3f348387b..e2b7c6a95 100644
--- a/apps/ui/src/components/ProposalVoteApproval.vue
+++ b/apps/ui/src/components/ProposalVoteApproval.vue
@@ -13,7 +13,9 @@ const emit = defineEmits<{
}>();
const selectedChoices = ref
(
- (!props.proposal.privacy && (props.defaultChoice as ApprovalChoice)) || []
+ (props.proposal.privacy === 'none' &&
+ (props.defaultChoice as ApprovalChoice)) ||
+ []
);
function toggleSelectedChoice(choice: number) {
diff --git a/apps/ui/src/components/ProposalVoteChoice.vue b/apps/ui/src/components/ProposalVoteChoice.vue
index e04759dea..d6eced8d3 100644
--- a/apps/ui/src/components/ProposalVoteChoice.vue
+++ b/apps/ui/src/components/ProposalVoteChoice.vue
@@ -16,7 +16,7 @@ withDefaults(
Encrypted choice
diff --git a/apps/ui/src/components/ProposalVoteRankedChoice.vue b/apps/ui/src/components/ProposalVoteRankedChoice.vue
index 2375e3aef..7acbad10a 100644
--- a/apps/ui/src/components/ProposalVoteRankedChoice.vue
+++ b/apps/ui/src/components/ProposalVoteRankedChoice.vue
@@ -14,7 +14,8 @@ const emit = defineEmits<{
}>();
const selectedChoices = ref(
- (!props.proposal.privacy && (props.defaultChoice as RankedChoice)) ||
+ (props.proposal.privacy === 'none' &&
+ (props.defaultChoice as RankedChoice)) ||
props.proposal.choices.map((_, i) => i + 1)
);
diff --git a/apps/ui/src/components/ProposalVoteSingleChoice.vue b/apps/ui/src/components/ProposalVoteSingleChoice.vue
index 747345d31..55469bba8 100644
--- a/apps/ui/src/components/ProposalVoteSingleChoice.vue
+++ b/apps/ui/src/components/ProposalVoteSingleChoice.vue
@@ -11,7 +11,7 @@ const emit = defineEmits<{
}>();
const selectedChoice = ref(
- (!props.proposal.privacy && (props.defaultChoice as number)) || null
+ (props.proposal.privacy === 'none' && (props.defaultChoice as number)) || null
);
diff --git a/apps/ui/src/components/ProposalVoteWeighted.vue b/apps/ui/src/components/ProposalVoteWeighted.vue
index b20e7a864..2ba051278 100644
--- a/apps/ui/src/components/ProposalVoteWeighted.vue
+++ b/apps/ui/src/components/ProposalVoteWeighted.vue
@@ -14,7 +14,9 @@ defineEmits<{
}>();
const selectedChoices = ref(
- (!props.proposal.privacy && (props.defaultChoice as WeightedChoice)) || {}
+ (props.proposal.privacy === 'none' &&
+ (props.defaultChoice as WeightedChoice)) ||
+ {}
);
function increaseChoice(index: number) {
diff --git a/apps/ui/src/networks/offchain/api/index.ts b/apps/ui/src/networks/offchain/api/index.ts
index 95ed9c5b5..105ef7a7a 100644
--- a/apps/ui/src/networks/offchain/api/index.ts
+++ b/apps/ui/src/networks/offchain/api/index.ts
@@ -336,7 +336,7 @@ function formatProposal(proposal: ApiProposal, networkId: NetworkID): Proposal {
tx: '',
execution_tx: null,
veto_tx: null,
- privacy: proposal.privacy,
+ privacy: proposal.privacy || 'none',
flagged: proposal.flagged
};
}
diff --git a/apps/ui/src/networks/offchain/api/types.ts b/apps/ui/src/networks/offchain/api/types.ts
index 6a914f7f7..f8ee096a0 100644
--- a/apps/ui/src/networks/offchain/api/types.ts
+++ b/apps/ui/src/networks/offchain/api/types.ts
@@ -1,7 +1,6 @@
import {
DelegationType,
NetworkID,
- Privacy,
SpaceMetadataLabel,
VoteType
} from '@/types';
@@ -126,7 +125,7 @@ export type ApiProposal = {
created: number;
updated: number | null;
votes: number;
- privacy: Privacy;
+ privacy: 'shutter' | '';
plugins: Record;
flagged: boolean;
};