Skip to content

Commit ea71bef

Browse files
authored
Merge branch 'dev' into feat/ui-improvements
2 parents e6855c2 + 8cde978 commit ea71bef

File tree

26 files changed

+1081
-600
lines changed

26 files changed

+1081
-600
lines changed

kleros-sdk/src/dataMappings/retrieveRealityData.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export const retrieveRealityData = async (realityQuestionID: string, arbitrable?
5050
};
5151

5252
const questionData = await executeAction(questionMapping);
53-
console.log("questionData", questionData);
5453

5554
const templateMapping: AbiEventMapping = {
5655
type: "abi/event",
@@ -66,7 +65,6 @@ export const retrieveRealityData = async (realityQuestionID: string, arbitrable?
6665
};
6766

6867
const templateData = await executeAction(templateMapping);
69-
console.log("templateData", templateData);
7068

7169
if (!templateData) {
7270
throw new NotFoundError("Template Data", "Failed to retrieve template data");
@@ -82,8 +80,6 @@ export const retrieveRealityData = async (realityQuestionID: string, arbitrable?
8280
questionData.realityQuestion
8381
);
8482

85-
console.log("populatedTemplate", populatedTemplate);
86-
8783
let answers: RealityAnswer[] = [];
8884
if (populatedTemplate.type === "bool") {
8985
answers = [

kleros-sdk/src/dataMappings/utils/populateTemplate.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ export const populateTemplate = (mustacheTemplate: string, data: any): DisputeDe
99

1010
const validation = DisputeDetailsSchema.safeParse(dispute);
1111
if (!validation.success) {
12-
console.error("Validation errors:", validation.error.errors, "\n\nDispute details:", `${JSON.stringify(dispute)}`);
13-
throw new InvalidFormatError("Invalid dispute details format");
12+
throw validation.error;
1413
}
15-
console.log(dispute);
1614

1715
return dispute;
1816
};

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
"web-devtools",
2626
"eslint-config",
2727
"prettier-config",
28-
"tsconfig",
29-
"kleros-app"
28+
"tsconfig"
3029
],
3130
"packageManager": "yarn@4.5.1",
3231
"volta": {

web/netlify.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ NETLIFY_YARN_WORKSPACES = "true"
66
YARN_ENABLE_GLOBAL_CACHE = "true"
77
# YARN_CACHE_FOLDER = "$HOME/.yarn_cache"
88
# YARN_VERSION = "3.2.0"
9-
[build]
10-
command = "yarn workspace @kleros/kleros-v2-contracts install && yarn workspace @kleros/kleros-app install && yarn workspace @kleros/kleros-v2-web install && yarn workspace @kleros/kleros-v2-contracts build && yarn workspace @kleros/kleros-app build && yarn workspace @kleros/kleros-v2-web build-netlify"
119

1210
[functions]
1311
directory = "web/netlify/functions/"

web/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@
7878
},
7979
"dependencies": {
8080
"@cyntler/react-doc-viewer": "^1.17.0",
81-
"@kleros/kleros-app": "workspace:^",
81+
"@kleros/kleros-app": "^2.0.1",
8282
"@kleros/kleros-sdk": "workspace:^",
8383
"@kleros/kleros-v2-contracts": "workspace:^",
84-
"@kleros/ui-components-library": "^2.15.0",
84+
"@kleros/ui-components-library": "^2.16.0",
8585
"@lifi/wallet-management": "^3.4.5",
8686
"@lifi/widget": "^3.12.2",
8787
"@sentry/react": "^7.120.0",
8888
"@sentry/tracing": "^7.120.0",
89-
"@tanstack/react-query": "^5.61.0",
89+
"@tanstack/react-query": "^5.56.2",
9090
"@types/react-modal": "^3.16.3",
9191
"@wagmi/connectors": "^5.5.0",
9292
"@wagmi/core": "^2.15.0",
@@ -117,7 +117,7 @@
117117
"react-toastify": "^9.1.3",
118118
"react-use": "^17.5.1",
119119
"styled-components": "^5.3.3",
120-
"viem": "^2.21.48",
121-
"wagmi": "^2.13.0"
120+
"viem": "^2.21.54",
121+
"wagmi": "^2.13.5"
122122
}
123123
}
Lines changed: 1 addition & 1 deletion
Loading

web/src/components/ExternalLink.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { Link } from "react-router-dom";
21
import styled from "styled-components";
32

3+
import { Link } from "react-router-dom";
4+
45
export const ExternalLink = styled(Link)`
56
:hover {
67
text-decoration: underline;

web/src/components/Spinner.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import styled, { keyframes } from "styled-components";
2+
3+
import SpinnerIcon from "svgs/icons/spinner.svg";
4+
5+
const rotating = keyframes`
6+
0%{
7+
transform: rotate(0deg);
8+
}
9+
50%{
10+
transform: rotate(180deg);
11+
}
12+
100%{
13+
transform: rotate(360deg);
14+
}
15+
`;
16+
17+
const Spinner = styled(SpinnerIcon)`
18+
path {
19+
fill: ${({ theme }) => theme.primaryBlue};
20+
}
21+
width: 16px;
22+
height: 16px;
23+
margin-right: 4px;
24+
animation: ${rotating} 2s ease-in-out infinite normal;
25+
`;
26+
27+
export default Spinner;

web/src/components/TxnHash.tsx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React, { useMemo } from "react";
2+
import styled from "styled-components";
3+
4+
import NewTabIcon from "svgs/icons/new-tab.svg";
5+
6+
import { DEFAULT_CHAIN, getChain } from "consts/chains";
7+
8+
import { ExternalLink } from "./ExternalLink";
9+
10+
const TxnLabel = styled.label<{ variant: string }>`
11+
display: flex;
12+
gap: 4px;
13+
color: ${({ theme, variant }) => (variant === "pending" ? theme.primaryBlue : theme[variant])};
14+
cursor: pointer;
15+
path {
16+
fill: ${({ theme, variant }) => (variant === "pending" ? theme.primaryBlue : theme[variant])};
17+
}
18+
`;
19+
20+
interface ITxnHash {
21+
hash: `0x${string}`;
22+
variant: "success" | "error" | "pending";
23+
}
24+
const TxnHash: React.FC<ITxnHash> = ({ hash, variant }) => {
25+
const transactionExplorerLink = useMemo(() => {
26+
return `${getChain(DEFAULT_CHAIN)?.blockExplorers?.default.url}/tx/${hash}`;
27+
}, [hash]);
28+
29+
return (
30+
<ExternalLink to={transactionExplorerLink} rel="noopener noreferrer" target="_blank">
31+
<TxnLabel {...{ variant }}>
32+
{" "}
33+
<span>{hash.substring(0, 6) + "..." + hash.substring(hash.length - 4)}</span>
34+
<NewTabIcon />
35+
</TxnLabel>
36+
</ExternalLink>
37+
);
38+
};
39+
40+
export default TxnHash;

web/src/hooks/queries/useCourtDetails.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const courtDetailsQuery = graphql(`
2323
paidPNK
2424
timesPerPeriod
2525
feeForJuror
26+
name
2627
}
2728
}
2829
`);

0 commit comments

Comments
 (0)