Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions solutions/liquidity-accord/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node-linker=hoisted
1 change: 1 addition & 0 deletions solutions/liquidity-accord/packages/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vercel
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { AttestationResponse } from '@/services/AttestationService';
import { Badge } from '@/components/ui/badge';
import { CopyableId } from '@/components/ui/copyable-id';
import { Skeleton } from '@/components/ui/skeleton';

interface AttestationListProps {
Expand Down Expand Up @@ -33,6 +34,7 @@ export function AttestationList({ attestations, loading }: AttestationListProps)
<table className="w-full text-left text-sm">
<thead>
<tr className="border-b border-[var(--border-dark)] text-[var(--text-muted)] uppercase text-xs tracking-wider">
<th className="pb-3 pr-4 font-medium">ID</th>
<th className="pb-3 pr-4 font-medium">Engagement</th>
<th className="pb-3 pr-4 font-medium">Window</th>
<th className="pb-3 pr-4 font-medium">Spread</th>
Expand All @@ -45,8 +47,11 @@ export function AttestationList({ attestations, loading }: AttestationListProps)
<tbody>
{attestations.map((a) => (
<tr key={a.public_id} className="border-b border-[var(--border-dark)] last:border-0">
<td className="py-3 pr-4 font-mono text-xs text-[var(--text-primary)]">
{truncate(a.engagement_public_id, 14)}
<td className="py-3 pr-4">
<CopyableId value={a.public_id} />
</td>
<td className="py-3 pr-4">
<CopyableId value={a.engagement_public_id} max={14} />
</td>
<td className="py-3 pr-4 text-[var(--text-secondary)]">
{formatDate(a.window_start)} → {formatDate(a.window_end)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { EngagementResponse } from '@/services/EngagementService';
import { Badge } from '@/components/ui/badge';
import { CopyableId } from '@/components/ui/copyable-id';
import { Skeleton } from '@/components/ui/skeleton';

interface EngagementListProps {
Expand Down Expand Up @@ -34,6 +35,7 @@ export function EngagementList({ engagements, loading, onSelect }: EngagementLis
<table className="w-full text-left text-sm">
<thead>
<tr className="border-b border-[var(--border-dark)] text-[var(--text-muted)] uppercase text-xs tracking-wider">
<th className="pb-3 pr-4 font-medium">ID</th>
<th className="pb-3 pr-4 font-medium">Pair</th>
<th className="pb-3 pr-4 font-medium">Venue</th>
<th className="pb-3 pr-4 font-medium">Issuer</th>
Expand All @@ -49,6 +51,9 @@ export function EngagementList({ engagements, loading, onSelect }: EngagementLis
className="border-b border-[var(--border-dark)] last:border-0 cursor-pointer hover:bg-[var(--background-secondary)] transition-colors"
onClick={() => onSelect?.(e)}
>
<td className="py-3 pr-4">
<CopyableId value={e.public_id} />
</td>
<td className="py-3 pr-4 font-medium text-[var(--text-primary)]">{e.pair_symbol}</td>
<td className="py-3 pr-4 text-[var(--text-secondary)]">{e.venue}</td>
<td className="py-3 pr-4 font-mono text-xs text-[var(--text-secondary)]">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { MMProfileResponse } from '@/services/MMProfileService';
import { Badge } from '@/components/ui/badge';
import { CopyableId } from '@/components/ui/copyable-id';
import { Skeleton } from '@/components/ui/skeleton';

interface MMProfileListProps {
Expand Down Expand Up @@ -29,6 +30,7 @@ export function MMProfileList({ profiles, loading }: MMProfileListProps) {
<table className="w-full text-left text-sm">
<thead>
<tr className="border-b border-[var(--border-dark)] text-[var(--text-muted)] uppercase text-xs tracking-wider">
<th className="pb-3 pr-4 font-medium">ID</th>
<th className="pb-3 pr-4 font-medium">Name</th>
<th className="pb-3 pr-4 font-medium">Operator</th>
<th className="pb-3 pr-4 font-medium">Tier</th>
Expand All @@ -40,6 +42,9 @@ export function MMProfileList({ profiles, loading }: MMProfileListProps) {
<tbody>
{profiles.map((p) => (
<tr key={p.public_id} className="border-b border-[var(--border-dark)] last:border-0">
<td className="py-3 pr-4">
<CopyableId value={p.public_id} />
</td>
<td className="py-3 pr-4 font-medium text-[var(--text-primary)]">{p.name}</td>
<td className="py-3 pr-4 font-mono text-xs text-[var(--text-secondary)]">
{truncateAddress(p.operator_address)}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
import { useState, type MouseEvent } from 'react';

interface CopyableIdProps {
value: string;
max?: number;
className?: string;
}

function truncate(s: string, max: number): string {
return s.length > max ? `${s.slice(0, max)}…` : s;
}

async function copyToClipboard(value: string): Promise<boolean> {
if (navigator.clipboard?.writeText) {
try {
await navigator.clipboard.writeText(value);
return true;
} catch {
// fall through to legacy fallback
}
}

const ta = document.createElement('textarea');
ta.value = value;
ta.setAttribute('readonly', '');
ta.style.position = 'fixed';
ta.style.top = '0';
ta.style.left = '0';
ta.style.opacity = '0';
document.body.appendChild(ta);
ta.focus();
ta.select();
let ok = false;
try {
ok = document.execCommand('copy');
} catch {
ok = false;
}
document.body.removeChild(ta);
return ok;
}

export function CopyableId({ value, max = 12, className = '' }: CopyableIdProps) {
const [copied, setCopied] = useState(false);

const handleClick = async (e: MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
e.preventDefault();
const ok = await copyToClipboard(value);
if (!ok) return;
setCopied(true);
window.setTimeout(() => setCopied(false), 1400);
};

return (
<span className={'relative inline-flex items-center group ' + className}>
<button
type="button"
onClick={handleClick}
title={`Click to copy: ${value}`}
aria-label={`Copy ${value}`}
className={
'font-mono text-xs cursor-pointer transition-colors duration-200 ' +
'inline-flex items-center gap-1.5 ' +
(copied
? 'text-emerald-400'
: 'text-[var(--text-secondary)] hover:text-[var(--text-primary)]')
}
>
<span>{truncate(value, max)}</span>
<CopyIcon copied={copied} />
</button>

<span
aria-hidden
role="status"
className={
'pointer-events-none absolute left-1/2 -translate-x-1/2 ' +
'whitespace-nowrap rounded-md px-2 py-0.5 text-[10px] font-medium ' +
'bg-emerald-500 text-white shadow-lg shadow-emerald-500/20 ' +
'transition-all duration-200 ease-out ' +
(copied
? 'opacity-100 -top-7 scale-100'
: 'opacity-0 -top-5 scale-95')
}
>
Copied
</span>
</span>
);
}

function CopyIcon({ copied }: { copied: boolean }) {
return (
<span className="relative inline-block h-3 w-3 shrink-0">
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className={
'absolute inset-0 h-3 w-3 transition-all duration-200 ' +
(copied ? 'opacity-0 scale-50' : 'opacity-50 group-hover:opacity-100 scale-100')
}
>
<rect x="9" y="9" width="13" height="13" rx="2" />
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
</svg>
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2.5"
strokeLinecap="round"
strokeLinejoin="round"
className={
'absolute inset-0 h-3 w-3 transition-all duration-200 ' +
(copied ? 'opacity-100 scale-100' : 'opacity-0 scale-50')
}
>
<polyline points="20 6 9 17 4 12" />
</svg>
</span>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function authenticateWithSiwe(address: string) {

const domain = window.location.host;
const origin = window.location.origin;
const statement = 'Sign in to ReineiraOS';
const statement = 'Sign in to Liquidity Accord';
const message = buildSiweMessage(domain, address, statement, origin, nonce);

const signature = await useWalletStore.getState().signMessage(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ export function WalletAuthPage() {
<div className="flex min-h-screen items-center justify-center bg-[var(--background)] px-4">
<div className="w-full max-w-sm">
<div className="mb-8 text-center">
<h1 className="text-2xl font-bold text-[var(--text-primary)]">Reineira Platform Modules</h1>
<p className="mt-1 text-sm font-medium text-[var(--text-secondary)]">Build on ReineiraOS</p>
<h1 className="text-2xl font-bold text-[var(--text-primary)]">Liquidity Accord</h1>
<p className="mt-1 text-sm font-medium text-[var(--text-secondary)]">
Confidential performance bonds &amp; delisting insurance
</p>
<p className="mt-2 text-sm text-[var(--text-secondary)]">Connect your wallet to get started</p>
</div>
<div className="rounded-xl border border-[var(--border-dark)] bg-[var(--background)] p-6 shadow-sm">
Expand Down
8 changes: 7 additions & 1 deletion solutions/liquidity-accord/packages/app/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
"installCommand": "cd ../.. && pnpm install --frozen-lockfile",
"buildCommand": "pnpm run build",
"outputDirectory": "dist",
"rewrites": [{ "source": "/((?!assets/).*)", "destination": "/index.html" }],
"rewrites": [
{
"source": "/api/:path*",
"destination": "https://liquidity-accord-backend.vercel.app/api/:path*"
},
{ "source": "/((?!assets/).*)", "destination": "/index.html" }
],
"headers": [
{
"source": "/(.*)",
Expand Down
2 changes: 2 additions & 0 deletions solutions/liquidity-accord/packages/backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vercel
.env*.local

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading