Skip to content
Draft
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
acfec28
chore: fix typo in comment
gap-editor Aug 11, 2025
3337ffe
feat: add markdown features
kemuru Sep 23, 2025
af26e50
chore: style impros
kemuru Sep 23, 2025
a97819b
feat: style impros
kemuru Sep 23, 2025
bd4c0a1
chore: correct url files
kemuru Sep 24, 2025
57eff75
Update web/src/utils/urlValidation.ts
kemuru Sep 24, 2025
2596aab
feat: add `transaction` to IEscrow
0xshitake Oct 15, 2025
18dae17
chore: update imports
0xshitake Oct 15, 2025
f8354ba
chore: styling change reverted
jaybuidl Oct 21, 2025
c382dc8
Merge pull request #128 from 0xshitake/feat/add-getters-to-interface
jaybuidl Oct 21, 2025
10454fc
docs(Escrow): typo
unknownunknown1 Oct 22, 2025
ef7fed6
Merge branch 'dev' into feat/markdown-everywhere
kemuru Oct 23, 2025
1e7c186
Merge pull request #126 from kleros/feat/markdown-everywhere
kemuru Oct 23, 2025
0be02aa
Merge pull request #129 from kleros/docs/typo-fix
jaybuidl Dec 10, 2025
9641ce5
refactor: scaffold to migrate from styled-components to Tailwind CSS
kyrers Dec 16, 2025
a3f01fd
chore: add clsx and tailwind-merge dependencies
kyrers Dec 16, 2025
75568be
refactor: migrate Header and related components
kyrers Dec 16, 2025
5e24ad3
refactor: migrate Footer component
kyrers Dec 17, 2025
0034dfd
refactor: begin "new-transaction" route migration (WIP)
kyrers Dec 17, 2025
d810250
refactor: minor fix to connect wallet message display in NewTransacti…
kyrers Dec 17, 2025
01d2991
refactor: migrate NewTransaction TypeOfEscrow and related components
kyrers Dec 18, 2025
baa32a3
refactor: migrate NewTransaction Title component
kyrers Dec 18, 2025
bc774cb
refactor: migrate NewTransaction Deliverable component (WIP)
kyrers Dec 18, 2025
474c3e0
refactor: migrate and fix markdown editor
kyrers Dec 19, 2025
93de7f8
fix: do not add token if it already exists to prevent infinite loop
kyrers Dec 30, 2025
a1b92d4
refactor: migrate NewTransaction Payment and related components
kyrers Dec 30, 2025
6a766a8
refactor: minor style improvements
kyrers Dec 30, 2025
929cb90
fix: remove maxLength from Buyer and Destination Address components …
kyrers Dec 30, 2025
a4a65f3
refactor: migrate NewTransaction Deadline component
kyrers Jan 1, 2026
e67b5dc
refactor: migrate NewTransaction Notifications and related components
kyrers Jan 1, 2026
d52b6ed
refactor: migrate NewTransaction Preview and related components
kyrers Jan 2, 2026
d71f096
fix: replace custom 50% border radius with equivalent tailwind class
kyrers Jan 6, 2026
dc6d112
fix: properly handle undefined status in StatusBanner component
kyrers Jan 6, 2026
b684184
refactor: migrate MyTransactions TransactionFetcher and related compo…
kyrers Jan 6, 2026
4522f31
refactor: migrate MyTransaction TransactionDetails and related compon…
kyrers Jan 7, 2026
0f893c5
fix: minor prop fixes in two separate NumberField components
kyrers Jan 7, 2026
a54218f
refactor: enhance layout and styling in Description component for bet…
kyrers Jan 8, 2026
635af5e
feat: implement formatting utility for NumberField components to hand…
kyrers Jan 8, 2026
3b6fd25
fix: prevent ProposeSettlementModal from losing state due to parent s…
kyrers Jan 8, 2026
3fa01da
refactor: migrate AttrachmentDisplay and related components
kyrers Jan 8, 2026
d51b4d9
refactor: replace NumberField with BigNumberField where handling amounts
kyrers Jan 9, 2026
8178db5
refactor: migrate minor dispute related components
kyrers Jan 9, 2026
dbf59a3
fix: improve TimeOutButton logic based on party seeing the transaction
kyrers Jan 9, 2026
8c757ab
refactor: migrate Settings and related components
kyrers Jan 9, 2026
8e67152
chore: remove unused code
kyrers Jan 9, 2026
9610230
refactor: simplify message rendering in EnsureAuth component
kyrers Jan 10, 2026
9a6612a
refactor: improve theme color handling in useEscrowTimelineItems
kyrers Jan 12, 2026
834b351
refactor: update custom 3px border radius to use component library de…
kyrers Jan 12, 2026
38d85ea
fix: adjust margin for ToDivider component
kyrers Jan 13, 2026
7d1dc79
Merge pull request #130 from kleros/chore/tailwind-and-ui-library-mig…
kemuru Jan 13, 2026
a1d7c9b
Merge branch 'dev' into patch-1
jaybuidl Jan 14, 2026
9ad98e6
Merge pull request #124 from gap-editor/patch-1
jaybuidl Jan 14, 2026
247c7a3
fix: improve logic for dispute handling in escrow mapping
kyrers Jan 9, 2026
28c71d6
refactor: minor improvement to dispute handling logic in escrow mapping
kyrers Jan 9, 2026
a37001c
Merge pull request #132 from kleros/fix/subgraph-dispute-status-stuck
kyrers Jan 14, 2026
ceaf6d3
chore(deps): bump the npm_and_yarn group across 1 directory with 2 up…
dependabot[bot] Jan 14, 2026
39b1de4
chore: retrigger CI
kyrers Jan 14, 2026
f4aea52
Merge pull request #138 from kleros/dependabot/npm_and_yarn/npm_and_y…
kyrers Jan 14, 2026
fc965ae
chore(deps): bump the npm_and_yarn group across 1 directory with 25 u…
dependabot[bot] Jan 14, 2026
cc461ad
chore: retrigger CI
kyrers Jan 14, 2026
bdecf3e
Merge pull request #139 from kleros/dependabot/npm_and_yarn/npm_and_y…
kyrers Jan 14, 2026
ab745e8
chore: add goldsky tooling
kyrers Jan 14, 2026
dc8a3f0
chore: retrigger CI
kyrers Jan 14, 2026
1c62b85
fix: update subgraph mappings configuration
kyrers Jan 15, 2026
de89ae4
Merge pull request #141 from kleros/chore/add-goldsky-tooling
kyrers Jan 15, 2026
d644106
chore: add status banner toggle to environment variables
kyrers Jan 16, 2026
b8ab333
Merge pull request #144 from kleros/chore/toggle-subgraph-banner-via-…
kyrers Jan 16, 2026
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
3 changes: 2 additions & 1 deletion contracts/src/EscrowUniversal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pragma solidity 0.8.24;
import {IArbitrableV2, IArbitratorV2} from "@kleros/kleros-v2-contracts/arbitration/interfaces/IArbitrableV2.sol";
import "@kleros/kleros-v2-contracts/arbitration/interfaces/IDisputeTemplateRegistry.sol";
import {SafeERC20, IERC20} from "./libraries/SafeERC20.sol";
import {NATIVE, Status, Party, Transaction, Resolution} from "./interfaces/Types.sol";
import "./interfaces/IEscrow.sol";

/// @title EscrowUniversal for a sale paid in native currency or ERC20 tokens without platform fees.
Expand All @@ -36,7 +37,7 @@ contract EscrowUniversal is IEscrow, IArbitrableV2 {
uint256 public feeTimeout; // Time in seconds a party can take to pay arbitration fees before being considered unresponsive and lose the dispute.
uint256 public settlementTimeout; // Time in seconds a party can take to accept or propose a settlement before being considered unresponsive.
Transaction[] public transactions; // List of all created transactions.
mapping(uint256 => uint256) public disputeIDtoTransactionID; // Naps dispute ID to tx ID.
mapping(uint256 => uint256) public disputeIDtoTransactionID; // Maps dispute ID to tx ID.
mapping(IERC20 => uint256) public amountCaps; // Caps the amount of the respective token for the Escrow transaction.

// ************************************* //
Expand Down
3 changes: 2 additions & 1 deletion contracts/src/EscrowView.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ pragma solidity 0.8.24;

import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {EscrowUniversal, Transaction, NATIVE, Party, Status, IERC20} from "./EscrowUniversal.sol";
import {EscrowUniversal} from "./EscrowUniversal.sol";
import {Transaction, NATIVE, Party, Status, IERC20} from "./interfaces/Types.sol";

/// @title EscrowView
/// @notice A view contract for EscrowUniversal to facilitate the display of ruling options.
Expand Down
43 changes: 40 additions & 3 deletions contracts/src/interfaces/IEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.24;

import "./Types.sol";
import {IERC20, Party, Status, Resolution, Transaction} from "./Types.sol";

interface IEscrow {
// ************************************* //
Expand Down Expand Up @@ -76,7 +76,7 @@ interface IEscrow {
/// @dev Create a transaction.
/// @param _deadline Time after which a party can automatically execute the arbitrable transaction.
/// @param _transactionUri The IPFS Uri Hash of the transaction.
/// @param _buyer Party that pays for the transaction. Note that msg.sender can provide finds on their behalf.
/// @param _buyer Party that pays for the transaction. Note that msg.sender can provide funds on their behalf.
/// @param _seller The recipient of the transaction.
/// @return transactionID The index of the transaction.
function createNativeTransaction(
Expand All @@ -91,7 +91,7 @@ interface IEscrow {
/// @param _token The ERC20 token contract.
/// @param _deadline Time after which a party can automatically execute the arbitrable transaction.
/// @param _transactionUri The IPFS Uri Hash of the transaction.
/// @param _buyer Party that pays for the transaction. Note that msg.sender can provide finds on their behalf.
/// @param _buyer Party that pays for the transaction. Note that msg.sender can provide funds on their behalf.
/// @param _seller The recipient of the transaction.
/// @return transactionID The index of the transaction.
function createERC20Transaction(
Expand Down Expand Up @@ -157,6 +157,43 @@ interface IEscrow {
/// @return The count of transactions.
function getTransactionCount() external view returns (uint256);

/// @dev Getter for transaction details.
/// @param _transactionID The index of the transaction.
/// @return buyer The buyer address.
/// @return seller The seller address.
/// @return amount The escrowed amount.
/// @return settlementBuyer Settlement amount proposed by the buyer.
/// @return settlementSeller Settlement amount proposed by the seller.
/// @return deadline The deadline timestamp.
/// @return disputeID The dispute ID if any.
/// @return buyerFee Total fees paid by the buyer.
/// @return sellerFee Total fees paid by the seller.
/// @return lastFeePaymentTime Timestamp of last fee payment or settlement proposal.
/// @return status Current status.
/// @return token Payment token (zero address for native).
function transactions(uint256 _transactionID)
external
view
returns (
address payable buyer,
address payable seller,
uint256 amount,
uint256 settlementBuyer,
uint256 settlementSeller,
uint256 deadline,
uint256 disputeID,
uint256 buyerFee,
uint256 sellerFee,
uint256 lastFeePaymentTime,
Status status,
IERC20 token
);

/// @dev Getter to map a dispute ID to its transaction ID.
/// @param _disputeID The dispute identifier from the arbitrator.
/// @return The corresponding transaction ID.
function disputeIDtoTransactionID(uint256 _disputeID) external view returns (uint256);

// ************************************* //
// * Errors * //
// ************************************* //
Expand Down
10 changes: 7 additions & 3 deletions subgraph/mappings/escrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
DisputeRequest as DisputeRequestEvent,
ParameterUpdated as ParameterUpdatedEvent,
SettlementProposed as SettlementProposedEvent,
EscrowUniversal,
} from "../generated/EscrowUniversal/EscrowUniversal";
import { ZERO, ONE } from "./utils";

Expand Down Expand Up @@ -240,10 +241,13 @@ export function handleTransactionResolved(event: TransactionResolvedEvent): void
}

export function handleDisputeRequest(event: DisputeRequestEvent): void {
let transactionID = event.params._externalDisputeID.toString();
let disputeID = event.params._arbitratorDisputeID.toString();
let disputeID = event.params._arbitratorDisputeID;

let disputeRequest = new DisputeRequest(disputeID);
// Get the transactionID by calling the contract
let contract = EscrowUniversal.bind(event.address);
let transactionID = contract.disputeIDtoTransactionID(disputeID).toString();

let disputeRequest = new DisputeRequest(disputeID.toString());

let escrow = Escrow.load(transactionID);
if (!escrow) {
Expand Down
2 changes: 1 addition & 1 deletion subgraph/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kleros/escrow-v2-subgraph",
"version": "2.2.0",
"version": "2.2.1",
"license": "MIT",
"scripts": {
"update:arbitrum-sepolia-devnet": "./scripts/update.sh arbitrumSepoliaDevnet arbitrum-sepolia",
Expand Down
9 changes: 1 addition & 8 deletions web/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import {} from "styled-components";
import { lightTheme } from "./src/styles/themes";

declare global {
module "*.svg" {
const content: React.FC<React.SVGAttributes<SVGElement>>;
Expand All @@ -12,8 +9,4 @@ declare global {
}
}

declare module "styled-components" {
type Theme = typeof lightTheme;
//eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface DefaultTheme extends Theme {}
}
export {};
14 changes: 10 additions & 4 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"@types/react": "^18.2.59",
"@types/react-dom": "^18.2.18",
"@types/react-modal": "^3.16.3",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@typescript-eslint/utils": "^5.62.0",
Expand All @@ -62,24 +61,27 @@
"eslint-plugin-react-hooks": "^4.6.0",
"lru-cache": "^7.18.3",
"typescript": "^5.7.3",
"vite": "^5.4.2",
"vite": "^5.4.21",
"vite-plugin-node-polyfills": "^0.21.0",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.2"
},
"dependencies": {
"@cyntler/react-doc-viewer": "^1.16.3",
"@kleros/kleros-app": "^2.1.0",
"@kleros/ui-components-library": "^2.19.0",
"@kleros/ui-components-library": "^3.6.0",
"@mdxeditor/editor": "^3.45.0",
"@reown/appkit": "^1.6.6",
"@reown/appkit-adapter-wagmi": "^1.6.6",
"@sentry/react": "^7.93.0",
"@sentry/tracing": "^7.93.0",
"@tailwindcss/vite": "^4.1.17",
"@tanstack/react-query": "^5.66.0",
"@yornaath/batshit": "^0.9.0",
"alchemy-sdk": "^3.3.1",
"chart.js": "^3.9.1",
"chartjs-adapter-moment": "^1.0.1",
"clsx": "^2.1.1",
"core-js": "^3.35.0",
"graphql": "^16.9.0",
"graphql-request": "^7.1.2",
Expand All @@ -99,8 +101,12 @@
"react-scripts": "^5.0.1",
"react-toastify": "^9.1.3",
"react-use": "^17.4.3",
"styled-components": "^5.3.11",
"rehype-raw": "^6.1.1",
"rehype-sanitize": "^5.0.1",
"remark-gfm": "^3.0.1",
"subgraph-status": "^1.2.4",
"tailwind-merge": "^3.4.0",
"tailwindcss": "^4.1.17",
Comment on lines +108 to +109
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check Tailwind v4 configuration

# Look for the new `@import` "tailwindcss" syntax in CSS files
echo "=== Checking for `@import` 'tailwindcss' syntax ==="
rg -n '@import.*tailwindcss' web/src/ 2>/dev/null || echo "No matches found"

# Check for any legacy `@tailwind` directives that should be migrated
echo -e "\n=== Checking for legacy `@tailwind` directives ==="
rg -n '@tailwind (base|components|utilities)' web/src/ 2>/dev/null || echo "No matches found"

# Verify vite.config includes the Tailwind plugin
echo -e "\n=== Checking vite.config ==="
if [ -f web/vite.config.ts ]; then
  echo "--- web/vite.config.ts ---"
  cat web/vite.config.ts
elif [ -f web/vite.config.js ]; then
  echo "--- web/vite.config.js ---"
  cat web/vite.config.js
else
  echo "No vite.config found in web/"
fi

Repository: kleros/escrow-v2

Length of output: 1129


Remove legacy @tailwind directive to complete Tailwind v4 migration.

tailwind-merge and tailwindcss versions are correct, and vite.config.js properly uses the @tailwindcss/vite plugin. However, web/src/global.css contains both the new @import "tailwindcss" syntax (line 4) and a legacy @tailwind utilities directive (line 2). In Tailwind v4's CSS-first approach, the @import statement is the primary way to load Tailwind, and the legacy @tailwind directive should be removed to avoid conflicts and ensure the configuration aligns with v4 best practices.

🤖 Prompt for AI Agents
In `@web/package.json` around lines 108 - 109, Remove the legacy "@tailwind
utilities" directive from the global CSS so only the new CSS-first import
remains; locate the file that currently has both `@tailwind` utilities and `@import`
"tailwindcss", delete the "@tailwind utilities" line, and verify there are no
other "@tailwind" directives remaining so Tailwind v4's `@import` "tailwindcss" is
the sole loader.

"viem": "^2.27.2",
"wagmi": "^2.14.16"
}
Expand Down
8 changes: 5 additions & 3 deletions web/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import { Navigate, Route } from "react-router-dom";
import { SentryRoutes } from "./utils/sentry";
import "react-loading-skeleton/dist/skeleton.css";
import "react-toastify/dist/ReactToastify.css";
import "overlayscrollbars/styles/overlayscrollbars.css";
import "./global.css";
import Web3Provider from "context/Web3Provider";
import IsListProvider from "context/IsListProvider";
import QueryClientProvider from "context/QueryClientProvider";
import StyledComponentsProvider from "context/StyledComponentsProvider";
import ThemeProvider from "context/ThemeProvider";
import GraphqlBatcherProvider from "context/GraphqlBatcher";
import Layout from "layout/index";
import NewTransaction from "./pages/NewTransaction";
Expand All @@ -18,7 +20,7 @@ import Settings from "./pages/Settings";

const App: React.FC = () => {
return (
<StyledComponentsProvider>
<ThemeProvider>
<Web3Provider>
<QueryClientProvider>
<AtlasProvider>
Expand All @@ -41,7 +43,7 @@ const App: React.FC = () => {
</AtlasProvider>
</QueryClientProvider>
</Web3Provider>
</StyledComponentsProvider>
</ThemeProvider>
);
};

Expand Down
Loading
Loading