mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-25 07:27:54 +00:00
d860d8beb3
Taybetmendiyên Nû: • pallet-multisig bi kar anîna - 3/5 threshold • wUSDT asset (ID: 2) - 1:1 backing bi USDT • Multisig members: Serok, SerokiMeclise, Xezinedar, Noter, Berdevk • Otomatîk query ji pallet-tiki (unique roles) Lib/Utilities: ✅ src/lib/multisig.ts - Multisig utilities (members, tx, queries) ✅ src/lib/usdt.ts - wUSDT bridge helpers (mint, burn, reserves) ✅ src/lib/wallet.ts - WUSDT asset ID zêde kir Components: ✅ MultisigMembers.tsx - Multisig members display ✅ USDTBridge.tsx - Deposit/withdrawal UI ✅ ReservesDashboard.tsx - Reserve monitoring dashboard Pages & Routes: ✅ ReservesDashboardPage.tsx - /reserves route ✅ App.tsx - Route integration Taybetmendî: • Full on-chain multisig (no Ethereum dependency) • Automatic tiki holder lookup • Reserve health monitoring • Tiered withdrawal limits (instant, standard, large) • Event subscriptions (mint/burn tracking) • 1:1 USDT backing verification Documentation: ✅ USDT_MULTISIG_SETUP.md - Complete setup guide 🤖 Bi [Claude Code](https://claude.com/claude-code) re hate çêkirin Co-Authored-By: Claude <noreply@anthropic.com>
60 lines
2.0 KiB
TypeScript
60 lines
2.0 KiB
TypeScript
import React, { useState } from 'react';
|
|
import { useNavigate } from 'react-router-dom';
|
|
import { ArrowLeft, Plus } from 'lucide-react';
|
|
import { Button } from '@/components/ui/button';
|
|
import { ReservesDashboard } from '@/components/ReservesDashboard';
|
|
import { USDTBridge } from '@/components/USDTBridge';
|
|
|
|
// TODO: Replace with actual addresses when multisig is set up
|
|
const SPECIFIC_ADDRESSES = {
|
|
Noter: '5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy', // Example address
|
|
Berdevk: '5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw', // Example address
|
|
};
|
|
|
|
const ReservesDashboardPage = () => {
|
|
const navigate = useNavigate();
|
|
const [isBridgeOpen, setIsBridgeOpen] = useState(false);
|
|
const [offChainReserve, setOffChainReserve] = useState(10000); // Example: $10,000 USDT
|
|
|
|
return (
|
|
<div className="min-h-screen bg-gray-950 pt-24 pb-12">
|
|
<div className="container mx-auto px-4 py-8 relative">
|
|
{/* Back Button */}
|
|
<button
|
|
onClick={() => navigate('/wallet')}
|
|
className="absolute top-4 left-4 text-gray-400 hover:text-white transition-colors flex items-center gap-2"
|
|
>
|
|
<ArrowLeft className="w-5 h-5" />
|
|
<span>Back to Wallet</span>
|
|
</button>
|
|
|
|
{/* Bridge Button */}
|
|
<div className="absolute top-4 right-4">
|
|
<Button
|
|
onClick={() => setIsBridgeOpen(true)}
|
|
className="bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 flex items-center gap-2"
|
|
>
|
|
<Plus className="h-4 w-4" />
|
|
Deposit/Withdraw USDT
|
|
</Button>
|
|
</div>
|
|
|
|
{/* Main Content */}
|
|
<ReservesDashboard
|
|
specificAddresses={SPECIFIC_ADDRESSES}
|
|
offChainReserveAmount={offChainReserve}
|
|
/>
|
|
|
|
{/* Bridge Modal */}
|
|
<USDTBridge
|
|
isOpen={isBridgeOpen}
|
|
onClose={() => setIsBridgeOpen(false)}
|
|
specificAddresses={SPECIFIC_ADDRESSES}
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ReservesDashboardPage;
|