Skip to content

Commit

Permalink
Merge branch 'master' into validation-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteenkamp89 committed Apr 17, 2024
2 parents 66b74ef + cb5ca02 commit 29275bf
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"@sentry/vite-plugin": "^2.10.1",
"@sentry/vue": "^7.80.1",
"@shutter-network/shutter-crypto": "1.0.1",
"@snapshot-labs/lock": "^0.2.3",
"@snapshot-labs/lock": "^0.2.4",
"@snapshot-labs/pineapple": "^1.1.0",
"@snapshot-labs/snapshot.js": "^0.11.16",
"@snapshot-labs/snapshot.js": "^0.11.17",
"@vue/apollo-composable": "4.0.0-beta.11",
"@vueuse/core": "^10.6.1",
"@vueuse/head": "^2.0.0",
Expand Down
6 changes: 3 additions & 3 deletions src/components/ProposalsItemFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ const quorumText = computed(() => {
return '';
}
const optimisticQuorum = props.proposal.quorumType === 'optimistic';
const quorumOfRejection = props.proposal.quorumType === 'rejection';
const percentage = formatPercentNumber(
optimisticQuorum
quorumOfRejection
? Number(
props.proposal.scores
.filter((c, i) => i === 1)
.reduce((a, b) => a + b, 0) / props.proposal.quorum
)
: Number(props.proposal.scores_total / props.proposal.quorum)
);
return optimisticQuorum
return quorumOfRejection
? `${percentage} quorum rejection`
: `${percentage} quorum reached`;
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/SettingsVotingBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const { form, validationErrors } = useFormSpaceSettings(props.context);
name: 'Default'
},
{
value: 'optimistic',
name: 'Optimistic'
value: 'rejection',
name: 'Quorum of rejection'
}
]"
:disabled="isViewOnly"
Expand Down
4 changes: 2 additions & 2 deletions src/components/SpaceProposalResultsQuorum.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { formatCompactNumber, formatPercentNumber } = useIntl();
<div class="pt-2 text-skin-link">
<div class="flex justify-between">
<div class="flex items-center gap-1">
{{ quorumType === 'optimistic' ? 'Optimistic Quorum' : 'Quorum' }}
{{ quorumType === 'rejection' ? 'Quorum of rejection' : 'Quorum' }}
</div>
<LoadingSpinner v-if="loadingQuorum" class="mr-1" />
<div v-else class="flex gap-2">
Expand All @@ -29,7 +29,7 @@ const { formatCompactNumber, formatPercentNumber } = useIntl();
/>
<i-ho-x
v-if="
quorum && quorumType === 'optimistic' && totalQuorumScore >= quorum
quorum && quorumType === 'rejection' && totalQuorumScore >= quorum
"
class="text-red"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/composables/useQuorum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function useQuorum(props: QuorumProps) {
const quorumType = ref('default');

const totalQuorumScore = computed(() => {
if (props.proposal.quorumType === 'optimistic') {
if (props.proposal.quorumType === 'rejection') {
return props.results.scores
.filter((c, i) => i === 1)
.reduce((a, b) => a + b, 0);
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export interface ExtendedSpace {
hideAbstain: boolean;
period: number | null;
quorum: number | null;
quorumType: 'default' | 'optimistic';
quorumType: 'default' | 'rejection';
type: string | null;
privacy: string | null;
};
Expand Down Expand Up @@ -230,7 +230,7 @@ export interface Proposal {
validation: VoteValidation;
discussion: string;
quorum: number;
quorumType: 'default' | 'optimistic';
quorumType: 'default' | 'rejection';
scores: number[];
scores_state: string;
scores_total: number;
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/domino/components/CustomBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const customWorkflowUrl = computed(() => {
<div>
<ul class="space-y-2">
<li v-for="(item, index) in automationTemplates" :key="index" class="flex items-center justify-between gap-4 group">
<a :href="`${item.url}`" target="_blank" class="flex items-center gap-2">
<a :href="item.url" target="_blank" class="flex items-center gap-2">
<img
class="mx-auto rounded-xl border border-skin-border opacity-95 group-hover:opacity-100"
:src="item.imageUrl"
Expand All @@ -75,14 +75,14 @@ const customWorkflowUrl = computed(() => {
height="36"
/>
<div class="text-sm leading-tight group-hover:text-gray-800">{{ item.name }}</div>
<div class="text-sm leading-tight">{{ item.name }}</div>
</a>
</li>
<li class="text-center">
<a href="https://domino.run/explore/apps/snapshot-tmkg6ni3l3r" target="_blank">
<div class="text-sm leading-tight group-hover:text-gray-800 text-skin-link">
<div class="text-sm leading-tight text-skin-link">
{{ $t('domino.viewMore') }}
</div>
</a>
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1640,10 +1640,10 @@
"@snapshot-labs/eslint-config-base" "^0.1.0-beta.15"
eslint-plugin-vue "^9.18.1"

"@snapshot-labs/lock@^0.2.3":
version "0.2.3"
resolved "https://registry.yarnpkg.com/@snapshot-labs/lock/-/lock-0.2.3.tgz#6023433ac2c5ad9edb388e6913d8ccb4fedf5c38"
integrity sha512-D1yCbwukV0DHBWO5/yBGRO+0rkpngG52p52RRqsBg4gytyum9FW+GCULix+mq4VKmhN9V1xhH7Oc7BpBWIAJCg==
"@snapshot-labs/lock@^0.2.4":
version "0.2.4"
resolved "https://registry.yarnpkg.com/@snapshot-labs/lock/-/lock-0.2.4.tgz#aa90ac4f618e7e3a323a911aef28fe7e67d62cc8"
integrity sha512-6bhFOVPIMC8R3K0qGGNth2fHYUcw8pg2/g3rvVl9GLYqKYqAEI0DWqM4+t1R/Z8zLFyfMk7iVsVfK5Ivg1r7ig==
dependencies:
"@coinbase/wallet-sdk" "^3.4.0"
"@portis/web3" "^4.0.6"
Expand All @@ -1666,10 +1666,10 @@
resolved "https://registry.yarnpkg.com/@snapshot-labs/prettier-config/-/prettier-config-0.1.0-beta.15.tgz#07e5ae35ed36304250462218e115bab1c1609812"
integrity sha512-va6zYSl8oIraBJeIZWEatOI292rfJQouyyvEeHv8qi9ns+LgxMsKayQtXSqn9GcmAfdWQVs/P9bDaCQ77FyJYw==

"@snapshot-labs/snapshot.js@^0.11.16":
version "0.11.16"
resolved "https://registry.yarnpkg.com/@snapshot-labs/snapshot.js/-/snapshot.js-0.11.16.tgz#36d88a75adeb4b418ba163fb426aa8bfbb0952bb"
integrity sha512-jE3ZUpsQTZT3t3h+2NTu7ZhrUuvSIUixBZ3ziG54GNo/z2j24d5JrwagbJHFlNsqJQ1b84lA3cwO6UexJMGdOQ==
"@snapshot-labs/snapshot.js@^0.11.17":
version "0.11.17"
resolved "https://registry.yarnpkg.com/@snapshot-labs/snapshot.js/-/snapshot.js-0.11.17.tgz#e54a14622956515aba8b6333cbe423e6af3f2250"
integrity sha512-+zM274cRplyN17PQQpP391XhZOV+1ET/bppIY7YfvAIid+q+7TwaTK3VD2kq00ZA2AdasR/f0dwvieKUnTyTUg==
dependencies:
"@ensdomains/eth-ens-namehash" "^2.0.15"
"@ethersproject/abi" "^5.6.4"
Expand Down

0 comments on commit 29275bf

Please sign in to comment.