Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
ea4cf9e
feat: fetch connected address transactions
kyrers May 29, 2025
7eadb16
chore: fix path aliases and some imports
kyrers May 30, 2025
4514d11
feat: fetch transaction block timestamp so we can display the creatio…
kyrers May 30, 2025
5b327bc
feat: order by last interaction
kyrers May 30, 2025
e269eea
feat: initial transaction card display
kyrers May 30, 2025
df64557
feat: styled transaction cards
kyrers Jun 2, 2025
ec1a599
feat: implement transactions loading & no transactions UI state
kyrers Jun 3, 2025
2a679d6
chore: remove .yarn/install-state.gz from git tracking
kyrers Jun 3, 2025
566672f
fix: improve transaction data fetching for cards
kyrers Jun 5, 2025
eae755f
fix: ui adjustments for smaller screens
kyrers Jun 5, 2025
446fe4f
feat: transaction details page initial UI
kyrers Jun 6, 2025
b4aa26e
feat: improved transaction details fetching and display
kyrers Jun 7, 2025
46b987f
feat: download and display transaction evidence
kyrers Jun 8, 2025
1f2b4a2
fix: correctly typed items for the CustomTimeline
kyrers Jun 9, 2025
eef8227
chore: update kleros/ui-component-library to latest version
kyrers Jun 9, 2025
117223d
fix: minor code improvements
kyrers Jun 9, 2025
c250eba
fix: shorten queryFn bodies for fetching transaction info
kyrers Jun 12, 2025
3c4032a
feat: add wagmi/cli generated hooks
kyrers Jun 13, 2025
e2f550c
docs: update README
kyrers Jun 13, 2025
7f7a1e9
feat: filter transactions by title or address
kyrers Jun 17, 2025
e7c9a45
fix: solve searchbar label warning
kyrers Jun 17, 2025
91e6681
feat: add new contract ABIs for arbitrable address and token lists, a…
kyrers Jun 22, 2025
b809e8d
feat: add New page for creating transactions
kyrers Jun 22, 2025
a7ff504
feat: implement form for creating transactions
kyrers Jun 22, 2025
cd980cc
feat: add hook for fetching tokens from registry
kyrers Jun 22, 2025
e451f0f
feat: enhance CreateTransactionWizard UI and improve responsiveness
kyrers Jun 23, 2025
a3eec9e
feat: add validation to transaction form fields
kyrers Jun 24, 2025
0b6768a
feat: add NewTransaction context and provider for new transaction inp…
kyrers Jun 24, 2025
2f42936
refactor: remove unused contract ABIs and related code for fetching t…
kyrers Jun 27, 2025
c18c871
feat: add predefined escrow tokens data
kyrers Jun 27, 2025
3ee18e6
feat: implement TokenSelector component for improved token selection …
kyrers Jun 28, 2025
82aa7d3
feat: add Alchemy API integration for fetching token metadata
kyrers Jun 29, 2025
7f90de2
feat: add custom ERC20 token, by address, for escrow
kyrers Jun 29, 2025
a4e83bd
refactor: reset user-added tokens on chain change
kyrers Jun 29, 2025
72e7087
feat: display escrow type in transaction details
kyrers Jun 30, 2025
0512b9a
refactor: improved transaction details display
kyrers Jun 30, 2025
f37265e
feat: improved transaction deadline date management
kyrers Jun 30, 2025
f4c285d
refactor: Improved responsiveness and component usability
kyrers Jun 30, 2025
339acce
feat: make ETH the default token for new escrow transactions
kyrers Jul 1, 2025
896b756
feat: improve transaction wizard, namely file upload and amount fields
kyrers Jul 1, 2025
9bc223d
feat: add Preview step to transaction wizard
kyrers Jul 1, 2025
43edc9b
fix: update token selection logic to use token address instead of name
kyrers Jul 1, 2025
d2afb2c
fix: update word-break property in some components for better text ha…
kyrers Jul 3, 2025
412b7be
refactor: improve event definition and transaction context
kyrers Jul 3, 2025
f989cef
feat: implement transaction creation logic and error handling
kyrers Jul 3, 2025
a107df9
feat: add balance check before transaction creation
kyrers Jul 4, 2025
5af4fad
fix: use the same large number old V1 uses as the NO_TIMEOUT_VALUE in…
kyrers Jul 7, 2025
e99ac40
refactor: update transaction status handling
kyrers Jul 7, 2025
7fc574c
refactor: enhance transaction status types for better type safety
kyrers Jul 8, 2025
3f7138f
feat: improved transaction creation logic to include a one-week buffe…
kyrers Jul 10, 2025
4bc54d7
feat: improve timeout calculation to maintain backwards compatibility…
kyrers Jul 10, 2025
889bf05
feat: Display escrow expiry time in Preview
kyrers Jul 10, 2025
c8b0d67
feat: Implement Payment (full or partial) logic and UI
kyrers Jul 10, 2025
c66a8ba
fix: prioritize sender role over receiver, for escrows between same a…
kyrers Jul 11, 2025
9c1d8b1
feat: add Reimburse functionality and improve address comparison
kyrers Jul 13, 2025
c9ed7d6
refactor: improve transaction actions components reusability and UX
kyrers Jul 14, 2025
1b7aba5
feat: add Execute transaction functionality and improve payment logic
kyrers Jul 14, 2025
e30f046
refactor: improved UI, UX, and styles reusability
kyrers Jul 14, 2025
7b5cbf1
chore: update @kleros/ui-components-library
kyrers Aug 11, 2025
f17d6b6
refactor: simplify code using the new kleros/ui-components-library ve…
kyrers Aug 11, 2025
5d18e8f
fix: remove SSR option from wagmiAdapter configuration
kyrers Aug 12, 2025
7326f0c
fix: validate transaction deadline at creation time
kyrers Aug 15, 2025
405efdf
refactor: rename buffer period constant to indicate more clearly that…
kyrers Aug 15, 2025
b7d1d04
feat: add a smart contract wallet warning to layout
kyrers Aug 24, 2025
6a0aa99
feat: customize alert to match styling but also include link to docum…
kyrers Aug 25, 2025
ec914de
refactor: enhance local storage handling and improve smart contract w…
kyrers Aug 28, 2025
5e7f466
feat: add KlerosLiquid ABI and generate wagmi hooks
kyrers Sep 2, 2025
105b9a0
feat: fetch arbitrator address, extra data, and arbitration cost
kyrers Sep 2, 2025
b2a03f2
feat: add RaiseDispute modal
kyrers Sep 2, 2025
75f44d6
feat: allow one party to pay the arbitration cost and start the proce…
kyrers Sep 3, 2025
3f9df5b
refactor: minor update to transaction action components
kyrers Sep 4, 2025
0814c85
feat: update transaction status to include arbitration fee requirements
kyrers Sep 4, 2025
1f5bb9b
feat: integrate countdown timer for arbitration fee deposit
kyrers Sep 4, 2025
491d4f7
feat: implement withdraw functionality for both parties
kyrers Sep 5, 2025
b6cac45
feat: enhance transaction status and amount tags responsiveness
kyrers Sep 5, 2025
678029e
feat: display dispute details and links
kyrers Sep 8, 2025
3427d72
feat: fetch dispute info and add it to the transaction object
kyrers Sep 11, 2025
f0b4493
feat: enhance ongoing dispute information display with ruling details
kyrers Sep 11, 2025
659e78c
feat: implement dispute ruling display
kyrers Sep 12, 2025
2b413d9
feat: implement appeal functionality
kyrers Sep 12, 2025
ef6b11e
fix: correctly fetch appeal decision events
kyrers Sep 15, 2025
bd99b9d
feat: handle scenario where appeal is no longer possible, but the rul…
kyrers Sep 15, 2025
c1afe27
style: update ActionsContainer layout for improved responsiveness and…
kyrers Sep 15, 2025
813e23d
Merge pull request #18 from kleros/feat/raise-dispute-and-appeal
kyrers Sep 30, 2025
a9f6ed3
Merge pull request #17 from kleros/chore/add-smart-contract-wallet-wa…
kyrers Sep 30, 2025
f17b478
Merge pull request #14 from kleros/chore/update-component-library
kyrers Sep 30, 2025
9cee237
Merge pull request #12 from kleros/feat/execute-transaction
kyrers Sep 30, 2025
f10dd52
Merge pull request #11 from kleros/feat/seller-reimburse
kyrers Sep 30, 2025
260cd86
Merge pull request #9 from kleros/feat/execute-payment
kyrers Sep 30, 2025
402889b
Merge pull request #7 from kleros/feat/create-transaction
kyrers Sep 30, 2025
7ee4287
chore: temporarily enable Sepolia on prod environment for testing
kyrers Sep 30, 2025
e07f123
fix: add missing netlify redirects config
kyrers Oct 1, 2025
609007a
fix: handle optional due date in transaction details
kyrers Oct 6, 2025
1a08ed4
feat: enhance preview and transaction summary components
kyrers Oct 7, 2025
d3bf65a
fix: remove loading state from back button in transaction preview com…
kyrers Oct 7, 2025
0904fa4
fix: use requiredChainId query parameter when redirecting to Court
kyrers Oct 8, 2025
9d82f2d
style: minor UI improvements
kyrers Oct 9, 2025
a458d06
feat: implement timeline event variants and enhance transaction timeline
kyrers Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
VITE_REOWN_PROJECT_ID=YOUR_PROJECT_ID
VITE_ALCHEMY_API_KEY=YOUR_ALCHEMY_API_KEY
VITE_ETHEREUM_MAINNET_RPC=YOUR_MAINNET_RPC_URL
VITE_ETHREUM_SEPOLIA_RPC=YOUR_SEPOLIA_RPC_URL
VITE_ETHEREUM_SEPOLIA_RPC=YOUR_SEPOLIA_RPC_URL
VITE_IPFS_UPLOAD_URL=YOUR_IPFS_UPLOAD_URL
VITE_IPFS_GATEWAY_URL=YOUR_IPFS_GATEWAY_URL
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ dist-ssr

# Environment variables
.env

# Yarn
.yarn/install-state.gz
Binary file removed .yarn/install-state.gz
Binary file not shown.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@

[![Netlify Status](https://api.netlify.com/api/v1/badges/4cb4168d-2078-400e-a159-4e52e44175ea/deploy-status)](https://app.netlify.com/projects/kleros-escrow-v1/deploys)

Local development:
For local development:

1. Install dependencies:

```bash
yarn install
```

2. Generate hooks using `wagmi/cli`:

```bash
yarn generate
```

3. Run:

```bash
yarn install && yarn dev
yarn dev
```
4 changes: 4 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
"preview": "vite preview",
"generate": "wagmi generate"
},
"dependencies": {
"@kleros/ui-components-library": "^3.3.4",
"@kleros/ui-components-library": "^3.6.0",
"@reown/appkit": "^1.7.6",
"@reown/appkit-adapter-wagmi": "^1.7.6",
"@tanstack/react-query": "^5.76.1",
"alchemy-sdk": "^3.6.1",
"react": "^18.2.55",
"react-countdown": "^2.3.6",
"react-dom": "^18.2.55",
"react-router": "^7.6.0",
"styled-components": "^6.1.18",
Expand All @@ -26,6 +29,7 @@
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.18",
"@vitejs/plugin-react": "^4.4.1",
"@wagmi/cli": "^2.3.1",
"eslint": "^9.25.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.19",
Expand Down
9 changes: 8 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { BrowserRouter, Routes, Route } from "react-router";
import { Providers } from "./providers";
import Layout from "layout/Layout";
import Home from "components/Home/Home";
import Home from "pages/Home/Home";
import Transaction from "pages/Transaction/Transaction";
import New from "pages/New/New";

function App() {
return (
Expand All @@ -10,6 +12,11 @@ function App() {
<Routes>
<Route element={<Layout />}>
<Route path="/" element={<Home />} />
<Route
path="/transaction/:contractAddress/:id"
element={<Transaction />}
/>
<Route path="/new" element={<New />} />
</Route>
</Routes>
</BrowserRouter>
Expand Down
Binary file added src/assets/aave.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/arb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/crypto-transaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/dai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/doc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/escrow-type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/eth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/assets/etherscan.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/general-service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gno.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/info-circle-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pnk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/uni.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/unknowntoken.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/usdc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/usdt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/warning-circle-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import styled from "styled-components";
import { Button } from "@kleros/ui-components-library";

export const IconButton = styled(Button)`
export const IconButton = styled(Button)<{ customSVGColor?: boolean }>`
background: transparent;
border: none;
padding: 0;
width: 32px;
height: 32px;
path {
/* dark mode secondary text color */
fill: #becce5;
}

${({ customSVGColor = true }) =>
customSVGColor &&
`
path {
/* dark mode secondary text color */
fill: #becce5;
}
`}

&:hover {
opacity: 0.8;
Expand Down
19 changes: 19 additions & 0 deletions src/components/Common/Containers/DefaultPageContainer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import styled from "styled-components";

export const DefaultPageContainer = styled.div`
display: flex;
flex-direction: column;
height: 100%;
gap: 16px;
align-items: center;
overflow-y: auto;
padding: 64px;

@media (max-width: ${({ theme }) => theme.breakpoints.md}) {
padding: 32px;
}

@media (max-width: ${({ theme }) => theme.breakpoints.sm}) {
padding: 16px;
}
`;
40 changes: 40 additions & 0 deletions src/components/Common/Display/AddressLinkAndCopy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { Copiable } from "@kleros/ui-components-library";
import { IconButton } from "../Buttons/IconButton";
import EtherscanIcon from "assets/etherscan.svg?react";
import styled from "styled-components";
import { addressToShortString } from "utils/common";

interface Props {
address: string;
}

const Container = styled.div`
display: flex;
margin-left: -0.5rem;
`;

/*
* NOTE: If in dev and using the Sepolia network, the link will still point to mainnet. This is fine because prod is only available on mainnet, so no need for any logic for dynamic linking.
* Additionally, for existing transactions, there is no easy way to know the chain they are on, because there's no guarantee that that information will be in the metaevidence.
*/
export default function AddressLinkAndCopy({ address }: Props) {
return (
<Container>
<a
href={`https://etherscan.io/address/${address}`}
target="_blank"
rel="noopener noreferrer"
>
<IconButton
small
icon={<EtherscanIcon />}
text=""
customSVGColor={false}
/>
</a>
<Copiable copiableContent={address} tooltipProps={{ isDisabled: true }}>
<h2>{addressToShortString(address)}</h2>
</Copiable>
</Container>
);
}
5 changes: 5 additions & 0 deletions src/components/Common/Dividers/DefaultDivider.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import styled from "styled-components";

export const DefaultDivider = styled.hr`
color: ${({ theme }) => theme.colors.stroke};
`;
20 changes: 20 additions & 0 deletions src/components/Common/Form/StyledDisplaySmall.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import styled from "styled-components";
import { DisplaySmall } from "@kleros/ui-components-library";

export const StyledDisplaySmall = styled(DisplaySmall)`
overflow: hidden;
white-space: nowrap;
height: fit-content;

label {
font-weight: bold;
}

div {
margin-top: 0;
}

h2 {
font-weight: normal;
}
`;
22 changes: 22 additions & 0 deletions src/components/Common/Form/StyledForm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Form } from "@kleros/ui-components-library";
import styled, { css } from "styled-components";

export const StyledForm = styled(Form)`
display: flex;
flex-direction: column;
align-items: center;
width: fit-content;
max-width: 80%;
gap: 16px;
`;

export const ButtonContainer = styled.div`
display: flex;
gap: 16px;
`;

export const mobileResponsive = css`
@media (max-width: ${({ theme }) => theme.breakpoints.sm}) {
width: 250px;
}
`;
21 changes: 21 additions & 0 deletions src/components/Common/Modal/StyledModal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Modal } from "@kleros/ui-components-library";
import styled from "styled-components";
import { mobileResponsive } from "../Form/StyledForm";

export const StyledModal = styled(Modal)<{ width?: string }>`
width: ${({ width }) => width ?? "500px"};
height: 100%;
max-height: 500px;
display: flex;
flex-direction: column;
gap: 1rem;
padding: 1rem;
border-radius: ${({ theme }) => theme.radius.boxDefault};
overflow-y: auto;

@media (max-width: ${({ theme }) => theme.breakpoints.md}) {
width: 500px;
}

${mobileResponsive}
`;
6 changes: 6 additions & 0 deletions src/components/Common/Skeleton/BaseSkeleton.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import styled from "styled-components";

export const BaseSkeleton = styled.div`
animation: ${({ theme }) => theme.animations.loading};
background-color: ${({ theme }) => theme.colors.tintPurple};
`;
62 changes: 62 additions & 0 deletions src/components/CreateTransactionWizard/CreateTransactionWizard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { Steps } from "@kleros/ui-components-library";
import { useState } from "react";
import styled from "styled-components";
import Template from "./Template/Template";
import Details from "./Details/Details";
import Terms from "./Terms/Terms";
import Preview from "./Preview/Preview";

const STEPS = [
{ title: "Escrow type" },
{ title: "Details" },
{ title: "Terms" },
{ title: "Preview" },
];

const Container = styled.div`
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;

@media (max-height: ${({ theme }) => theme.breakpoints.md}) {
height: unset;
}
`;

const StyledSteps = styled(Steps)`
position: absolute;
left: 4%;
top: 50%;
transform: translateY(-50%);
height: 200px;

@media (max-width: ${({ theme }) => theme.breakpoints.lg}) {
display: none;
}
`;

export default function CreateTransactionWizard() {
const [currentStep, setCurrentStep] = useState<number>(0);

const next = () => {
setCurrentStep(currentStep + 1);
};

const back = () => {
setCurrentStep(currentStep - 1);
};

return (
<Container>
<StyledSteps items={STEPS} currentItemIndex={currentStep} />

{currentStep === 0 && <Template next={next} />}
{currentStep === 1 && <Details next={next} back={back} />}
{currentStep === 2 && <Terms next={next} back={back} />}
{currentStep === 3 && <Preview back={back} />}
</Container>
);
}
Loading