Skip to content

Commit d931fab

Browse files
committed
Merge branch 'dev' into 'main'
fix(VoteSection): change ceiling to rounding for threshold calculation See merge request voltaire/govtool-outcomes-pillar!80
2 parents a3a091f + a1bdd10 commit d931fab

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

ui/src/Components/SingleAction/ReasoningElement.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import remarkMath from "remark-math";
44
import rehypeKatex from "rehype-katex";
55
import remarkGfm from "remark-gfm";
66
import remarkBreaks from "remark-breaks";
7-
import { useScreenDimension } from "../../hooks/useDimensions";
87

98
type ReasoningElementProps = {
109
label: string;
1110
text: string;
1211
dataTestId?: string;
1312
};
13+
1414
function ReasoningElement({ label, text, dataTestId }: ReasoningElementProps) {
1515
return (
1616
<Box

ui/src/Components/SingleAction/VoteSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export const VoteSection = ({
253253

254254
const thresholdValue = threshold
255255
? isCC
256-
? Number(Math.ceil((totalControlled - totalAbstainVotes) * threshold))
256+
? Number(Math.round((totalControlled - totalAbstainVotes) * threshold))
257257
: threshold * ratificationThreshold
258258
: 0;
259259

ui/src/Pages/GovernanceAction.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ function GovernanceAction({ id }: GovernanceActionProps) {
8888
abstract: governanceAction?.abstract || metadata?.data?.abstract,
8989
motivation: governanceAction?.motivation || metadata?.data?.motivation,
9090
rationale: governanceAction?.rationale || metadata?.data?.rationale,
91-
references: metadata?.data?.references || [],
91+
references:
92+
governanceAction?.json_metadata?.body?.references ||
93+
metadata?.data?.references ||
94+
[],
9295
};
9396

9497
const hasAnyContent =

ui/src/lib/openInNewTab.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export const openInNewTab = (url: string, ipfsGateway: string) => {
2-
// Ensure the URL is absolute
32
const fullUrl =
43
url.startsWith("http://") || url.startsWith("https://")
54
? url

0 commit comments

Comments
 (0)