From 491932816268532f36a93a5b3358fac1b9a504f6 Mon Sep 17 00:00:00 2001 From: zaragoza444 Date: Fri, 3 Jul 2026 00:36:21 -0700 Subject: [PATCH 01/21] feat(swift): production listener config, MT202/910 outbound, activate scripts --- config/hybx-omnl-cross-chain-lines.json | 27 ++ config/offices/office-24-settlement.v1.json | 2 +- config/omnl-supported-chains.v1.json | 23 +- config/swift-listener-chain138.v1.json | 110 +++++ config/swift-mt-catalog.v1.json | 72 +++ .../deployment/DEPLOYMENT_ISSUES_AND_FIXES.md | 1 - docs/deployment/INFURA_RPC_ISSUE.md | 3 - docs/deployment/INFURA_SETTINGS_FIX.md | 5 - frontend-dapp/index.html | 28 +- frontend-dapp/package.json | 10 + frontend-dapp/src/App.tsx | 6 +- .../src/components/admin/AdminDashboard.tsx | 2 +- .../src/components/admin/AuditLogViewer.tsx | 2 +- .../components/admin/FunctionPermissions.tsx | 6 +- .../src/components/admin/GasOptimizer.tsx | 2 +- .../components/admin/ImpersonationMode.tsx | 2 +- .../components/admin/MainnetTetherAdmin.tsx | 4 +- .../src/components/admin/MultiChainAdmin.tsx | 2 +- .../src/components/admin/MultiSigAdmin.tsx | 2 +- .../src/components/admin/OwnerManagement.tsx | 6 +- .../src/components/admin/Pagination.tsx | 2 +- .../src/components/admin/RealtimeMonitor.tsx | 2 +- .../src/components/admin/RoleBasedAccess.tsx | 4 +- .../src/components/admin/ScheduledActions.tsx | 8 +- .../components/admin/TimeLockedActions.tsx | 2 +- .../admin/TransactionMirrorAdmin.tsx | 4 +- .../components/admin/TransactionPreview.tsx | 6 +- .../components/admin/TransactionTemplates.tsx | 12 +- .../components/admin/TwoWayBridgeAdmin.tsx | 8 +- .../src/components/admin/WalletBackup.tsx | 6 +- .../src/components/admin/WalletBalance.tsx | 2 +- .../src/components/admin/WalletDeployment.tsx | 6 +- .../admin/WalletDeploymentEnhanced.tsx | 6 +- .../ChainManagementDashboard.tsx | 15 +- .../bridge/SwapBridgeSwapQuoteForm.tsx | 12 +- .../src/components/icons/NasaIcon.tsx | 40 +- .../src/components/layout/Layout.tsx | 120 ++--- .../components/layout/OmnlProductLayout.tsx | 124 ++--- .../src/components/ui/ToastProvider.tsx | 2 +- .../src/components/wallet/WalletConnect.tsx | 4 +- frontend-dapp/src/config/chainIcons.ts | 1 + frontend-dapp/src/config/dex.ts | 14 +- frontend-dapp/src/config/networks.ts | 39 +- .../central-bank/CentralBankDashboard.tsx | 13 +- .../central-bank/ChainMatrixPanel.tsx | 323 ++++++++----- .../features/central-bank/useCentralBank.ts | 9 +- .../features/office24/Office24Dashboard.tsx | 59 ++- .../src/features/office24/useOffice24.ts | 7 +- .../omnl-dashboard/DashboardSection.tsx | 109 +++-- .../omnl-dashboard/DashboardStatCard.tsx | 103 ++-- .../omnl-dashboard/NasaPageHeader.tsx | 35 +- .../omnl-dashboard/QuickPortalLinks.tsx | 4 +- .../src/features/swap/DBISSwapPanel.tsx | 47 +- .../src/features/trade/BinanceTradePanel.tsx | 92 ++-- frontend-dapp/src/index.css | 190 +------- frontend-dapp/src/main.tsx | 5 +- frontend-dapp/src/pages/AdminPanel.tsx | 29 +- frontend-dapp/src/pages/BridgePage.tsx | 26 +- frontend-dapp/src/pages/CentralBankPage.tsx | 4 +- frontend-dapp/src/pages/DocsPage.tsx | 12 +- frontend-dapp/src/pages/HistoryPage.tsx | 55 ++- frontend-dapp/src/pages/ReservePage.tsx | 85 +++- frontend-dapp/src/pages/SwapPage.tsx | 28 +- frontend-dapp/src/pages/TradePage.tsx | 6 +- frontend-dapp/src/pages/WalletsDemoPage.tsx | 71 ++- frontend-dapp/src/styles/mobile.css | 169 ++++--- frontend-dapp/src/styles/nasa-dashboard.css | 445 ------------------ frontend-dapp/src/styles/omnl-apps.css | 23 +- frontend-dapp/tailwind.config.js | 15 +- frontend-dapp/vite.config.ts | 15 + orchestration/portal/client/index.html | 4 +- .../src/react/components/layout/AppLayout.tsx | 6 + .../src/react/components/layout/Header.tsx | 47 ++ .../components/layout/ResizablePanel.tsx | 7 + .../portal/client/src/styles/panels.css | 88 ++++ .../portal/client/src/styles/variables.css | 26 +- .../src/vue/components/layout/AppLayout.vue | 22 +- .../src/vue/components/layout/Header.vue | 41 ++ .../vue/components/layout/ResizablePanel.vue | 5 + orchestration/portal/tailwind.config.js | 25 +- .../portal/templates/cost_dashboard.html | 14 +- orchestration/portal/templates/dashboard.html | 52 +- .../portal/templates/environment.html | 14 +- .../portal/templates/environment_detail.html | 14 +- .../portal/templates/health_dashboard.html | 12 +- orchestration/portal/templates/index.html | 20 +- .../settlement-core/dist/money-supply.d.ts | 18 + packages/settlement-core/dist/money-supply.js | 47 ++ packages/settlement-core/dist/types.d.ts | 23 + packages/settlement-core/src/money-supply.ts | 58 +++ packages/settlement-core/src/types.ts | 25 + .../deployment/activate-swift-production.sh | 71 +++ .../deployment/deploy-omnl-bank-production.sh | 11 +- .../deployment/start-omnl-banking-portal.sh | 276 +++++++---- .../start-swift-listener-production.sh | 70 +++ .../dist/api/routes/settlement.js | 22 + .../src/adapters/swift.ts | 42 ++ .../src/api/routes/settlement.ts | 23 +- .../src/workflows/external-transfer.ts | 25 +- .../token-aggregation/frontend/index.html | 2 +- .../frontend/src/components/Layout.tsx | 64 ++- .../token-aggregation/frontend/src/index.css | 2 +- .../public/omnl-compliance-console.css | 17 +- .../public/omnl-compliance-console.html | 3 +- .../public/omnl-compliance-console.js | 7 +- .../public/omnl-dashboard.html | 19 +- .../public/omnl-settlement-terminal.html | 3 +- .../public/omnl-settlement-terminal.js | 4 +- .../public/reserve-dashboard.css | 16 +- .../api/middleware/omnl-compliance-gate.ts | 2 +- 110 files changed, 2468 insertions(+), 1512 deletions(-) create mode 100644 config/swift-listener-chain138.v1.json create mode 100644 config/swift-mt-catalog.v1.json delete mode 100644 frontend-dapp/src/styles/nasa-dashboard.css create mode 100644 scripts/deployment/activate-swift-production.sh create mode 100644 scripts/deployment/start-swift-listener-production.sh diff --git a/config/hybx-omnl-cross-chain-lines.json b/config/hybx-omnl-cross-chain-lines.json index 96ecaf6..3971e0e 100644 --- a/config/hybx-omnl-cross-chain-lines.json +++ b/config/hybx-omnl-cross-chain-lines.json @@ -527,6 +527,33 @@ }, "inboundSettlementMainnet": "0xB08502ceE2545eEF782e933CFb80D0663E564da8", "inboundSettlementType": "gnosis-safe" + }, + { + "lineId": "0x9f3e2a1b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f", + "officeId": 29, + "externalId": "ZBANK-OMNL", + "entityName": "zBank (OneX Bank)", + "walletId": "HYBX-OFFICE-029", + "treasuryWalletMainnet": "0xB08502ceE2545eEF782e933CFb80D0663E564da8", + "treasuryWalletChain138": "0xc93522ae4ab7482572cc29edd68fbb6d5ec6a585", + "treasuryWalletShivaOneX": "0x0000000000000000000000000000000000000000", + "chains": { + "138": { + "tokenM0": "0x0000000000000000000000000000000000000000", + "tokenM1": "0xf22258f57794CC8E06237084b353Ab30fFfa640b" + }, + "900001": { + "tokenM0": "0x0000000000000000000000000000000000000000", + "tokenM1": "0x0000000000000000000000000000000000000000" + }, + "1": { + "tokenM0": "0x0000000000000000000000000000000000000000", + "tokenM1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + } + }, + "inboundSettlementMainnet": "0xB08502ceE2545eEF782e933CFb80D0663E564da8", + "inboundSettlementType": "gnosis-safe", + "integrationRef": "config/onex-shiva-integration.v1.json" } ], "globalInboundSettlementMainnet": "0xB08502ceE2545eEF782e933CFb80D0663E564da8" diff --git a/config/offices/office-24-settlement.v1.json b/config/offices/office-24-settlement.v1.json index 770b3f1..2ee898d 100644 --- a/config/offices/office-24-settlement.v1.json +++ b/config/offices/office-24-settlement.v1.json @@ -3,7 +3,7 @@ "version": "1.0.0", "officeId": 24, "externalId": "HOSPITALLERS-ZARDASHT-IRAQ-IRAN", - "name": "HOSPITALLERS — Zardasht (Iraq / Iran Operations)", + "name": "Office 24 Central Bank — HOSPITALLERS Zardasht (Iraq / Iran)", "fineractTenant": "omnl", "tenantUser": "ali_hospitallers_tenant", "adminUser": "ali_hospitallers_admin", diff --git a/config/omnl-supported-chains.v1.json b/config/omnl-supported-chains.v1.json index ac04f46..c05ed1c 100644 --- a/config/omnl-supported-chains.v1.json +++ b/config/omnl-supported-chains.v1.json @@ -1224,20 +1224,23 @@ }, { "chainId": 900001, - "name": "OMNL Expansion Slot 1", + "name": "Shiva Blockchain (OneX)", "type": "evm", - "nativeSymbol": "ETH", - "tier": "reserved", - "omnlRole": "expansion", - "status": "reserved", + "nativeSymbol": "SHIVA", + "tier": "primary", + "omnlRole": "onex-shiva", + "status": "active", "rpcEnv": "CHAIN_900001_RPC_URL", + "explorerUrl": "https://explorer.shiva.onex.omdnl.org", + "rpcDefault": "https://rpc.shiva.onex.omdnl.org", "settlement": { - "m2LoadEnabled": false, - "swapEnabled": false, - "bridgeEnabled": false, - "officeId": 24 + "m2LoadEnabled": true, + "swapEnabled": true, + "bridgeEnabled": true, + "officeId": 29 }, - "complianceEnv": "OMNL_COMPLIANCE_CORE_900001" + "complianceEnv": "OMNL_COMPLIANCE_CORE_900001", + "integrationRef": "config/onex-shiva-integration.v1.json" }, { "chainId": 900002, diff --git a/config/swift-listener-chain138.v1.json b/config/swift-listener-chain138.v1.json new file mode 100644 index 0000000..de19e20 --- /dev/null +++ b/config/swift-listener-chain138.v1.json @@ -0,0 +1,110 @@ +{ + "$schema": "OMNL SWIFT FIN / ISO 20022 listener — Chain 138 + Office 24 production", + "schemaVersion": "1.0.0", + "chain138": { + "chainId": 138, + "names": ["chain138", "chain 138", "defi oracle meta", "dbis", "omnl"], + "rpcHint": "RPC_URL_138", + "configSources": [ + "config/ei-matrix-138-assets-and-pools.v1.json", + "config/chain138-iso20022-attestation.v1.json" + ] + }, + "supportedSwiftFinTypes": ["MT103", "MT102", "MT202", "MT910", "MT940", "MT942", "MT950"], + "supportedIso20022Types": [ + "pain.001", + "pacs.008", + "pacs.009", + "pacs.002", + "camt.052", + "camt.053", + "camt.054" + ], + "cToCwSymbolMapping": { + "USD": "cWUSD", + "USDC": "cWUSDC", + "USDT": "cWUSDT", + "EUR": "cWEUR", + "GBP": "cWGBP" + }, + "matchHints": { + "instructionIdPrefixes": ["HOSPITALLERS", "CHAIN138", "OMNL", "HYBX", "ZARDASHT", "Z-BANK", "O24"], + "remittanceKeywords": [ + "chain138", + "cWUSDC", + "cWUSDT", + "cWUSD", + "omnl", + "hybx", + "office 24", + "zardasht", + "hospitallers" + ] + }, + "storage": { + "eventsDir": "reports/swift-listener/events", + "latestStatus": "reports/swift-listener/status-latest.json", + "processedIndex": "reports/swift-listener/processed-index.json", + "inboxDir": "reports/swift-listener/inbox", + "archiveDir": "reports/swift-listener/archive", + "as4InboxDir": "reports/swift-listener/as4-inbox", + "mailInboxDir": "reports/swift-listener/mail-inbox", + "telexInboxDir": "reports/swift-listener/telex-inbox" + }, + "adapters": { + "fileInbox": { "enabled": true, "pollIntervalSec": 30, "archiveOnProcess": true }, + "webhook": { + "enabled": true, + "port": 8788, + "path": "/inbound", + "healthPath": "/health", + "authBearerEnv": "SWIFT_LISTENER_WEBHOOK_TOKEN", + "webhookSecretEnv": "HYBX_WEBHOOK_SECRET", + "webhookSignatureHeader": "x-hybx-signature" + }, + "p2pRail": { + "enabled": false, + "baseUrlEnv": "P2P_BASE_URL", + "pollIntervalSec": 60, + "transactionsPath": "/api/v1/transactions" + }, + "finGateway": { + "enabled": false, + "baseUrlEnv": "FIN_GATEWAY_URL", + "fallbackBaseUrlEnv": "ALLIANCE_ACCESS_URL", + "pollIntervalSec": 120, + "messagesPath": "/messages", + "authBearerEnv": "FIN_GATEWAY_TOKEN" + }, + "swiftFinTcp": { + "enabled": true, + "host": "0.0.0.0", + "portEnv": "SWIFT_FIN_TCP_PORT", + "defaultPort": 5001 + }, + "as4Inbox": { "enabled": false, "pollIntervalSec": 60, "archiveOnProcess": true }, + "mailAttachmentInbox": { "enabled": false, "pollIntervalSec": 120, "archiveOnProcess": true }, + "telexInbox": { "enabled": false, "pollIntervalSec": 120, "archiveOnProcess": true } + }, + "outbound": { + "omnlForward": { + "enabled": true, + "mode": "local_and_api", + "apiPath": "/api/v1/omnl/iso20022/messages", + "tokenAggregationUrlEnv": "TOKEN_AGGREGATION_URL", + "apiKeyEnv": "OMNL_API_KEY", + "localStoreDir": "config/iso20022-omnl/messages" + }, + "intakeGateway": { + "enabled": true, + "gatewayAddressEnv": "ISO20022_INTAKE_GATEWAY_MAINNET", + "gatewayAddressFallback": "0x66C89F91A4e830d87fcE4E5F86aFA71A96FbDa3d", + "rpcUrlEnv": "RPC_URL_138", + "privateKeyEnv": "PRIVATE_KEY", + "executeEnv": "SWIFT_LISTENER_GATEWAY_EXECUTE", + "dryRunDefault": true, + "autoExecuteWhenKeyPresent": true, + "chainId": 138 + } + } +} diff --git a/config/swift-mt-catalog.v1.json b/config/swift-mt-catalog.v1.json new file mode 100644 index 0000000..4d60597 --- /dev/null +++ b/config/swift-mt-catalog.v1.json @@ -0,0 +1,72 @@ +{ + "$schema": "OMNL SWIFT MT catalog — Central Bank, Office 24, Z Online Bank", + "version": "1.0.0", + "settlementOfficeId": 24, + "bic": "OMNLUS33", + "rails": { + "outbound": "POST /settlement/external-transfer (rail SWIFT)", + "inbound": "POST /settlement/swift/inbound", + "listener": "SWIFT listener webhook POST /inbound :8788" + }, + "messageTypes": [ + { + "mt": "MT103", + "name": "Single Customer Credit Transfer", + "use": "Z Bank wire, Office 24 outbound, correspondent payments", + "moneyLayers": ["M0", "M1", "M2", "M4"], + "portal": "/central-bank#z-settlement-protocols", + "settlementField": "swiftMessageKind: MT103" + }, + { + "mt": "MT102", + "name": "Multiple Customer Credit Transfer", + "use": "Bulk payroll, DLC/LS batch legs", + "moneyLayers": ["M1", "M2", "M3", "M4"], + "portal": "/central-bank#z-settlement-protocols" + }, + { + "mt": "MT202", + "name": "General Financial Institution Transfer", + "use": "SBLC cover payment, interbank settlement", + "moneyLayers": ["M4"], + "tradeFinance": ["SBLC"] + }, + { + "mt": "MT910", + "name": "Confirmation of Credit", + "use": "Credit advice to beneficiary bank", + "moneyLayers": ["M4"] + }, + { + "mt": "MT940", + "name": "Customer Statement", + "use": "End-of-day account statement (Fineract reconcile)", + "moneyLayers": ["M0", "M1", "M2"] + }, + { + "mt": "MT942", + "name": "Interim Statement", + "use": "Intraday statement / liquidity monitoring", + "moneyLayers": ["M0", "M1"] + }, + { + "mt": "MT950", + "name": "Statement Message", + "use": "Legacy statement (Fineract GL export)", + "moneyLayers": ["M0", "M1", "M2"] + } + ], + "iso20022": [ + { "type": "pacs.008", "swiftFin": "MT103", "use": "FI-to-FI customer credit" }, + { "type": "pacs.009", "swiftFin": "MT202", "use": "FI-to-FI institution transfer" }, + { "type": "camt.054", "swiftFin": "MT910", "use": "Credit notification" }, + { "type": "camt.053", "swiftFin": "MT940", "use": "Account statement" }, + { "type": "camt.052", "swiftFin": "MT942", "use": "Account report" } + ], + "tradeFinance": { + "SBLC": { "swiftMessages": ["MT103", "MT202"], "endpoint": "POST /settlement/trade-finance/SBLC" }, + "DLC": { "swiftMessages": ["MT103", "MT102"], "endpoint": "POST /settlement/trade-finance/DLC" }, + "BG": { "swiftMessages": ["MT103"], "endpoint": "POST /settlement/trade-finance/BG" }, + "LS": { "swiftMessages": ["MT102", "MT103"], "endpoint": "POST /settlement/trade-finance/LS" } + } +} diff --git a/docs/deployment/DEPLOYMENT_ISSUES_AND_FIXES.md b/docs/deployment/DEPLOYMENT_ISSUES_AND_FIXES.md index 42d98e3..e00ebeb 100644 --- a/docs/deployment/DEPLOYMENT_ISSUES_AND_FIXES.md +++ b/docs/deployment/DEPLOYMENT_ISSUES_AND_FIXES.md @@ -143,7 +143,6 @@ forge script script/DeployTransactionMirror.s.sol \ 3. **RPC Providers**: - Alchemy: https://www.alchemy.com/ - Infura: https://www.infura.io/ - - QuickNode: https://www.quicknode.com/ 4. **Verification**: Contracts will be automatically verified on Etherscan if `ETHERSCAN_API_KEY` is set --- diff --git a/docs/deployment/INFURA_RPC_ISSUE.md b/docs/deployment/INFURA_RPC_ISSUE.md index c3683a3..77cd7a2 100644 --- a/docs/deployment/INFURA_RPC_ISSUE.md +++ b/docs/deployment/INFURA_RPC_ISSUE.md @@ -46,9 +46,6 @@ Switch to Alchemy or another provider: # Alchemy ETHEREUM_MAINNET_RPC=https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY -# QuickNode -ETHEREUM_MAINNET_RPC=https://your-endpoint.quiknode.pro/YOUR_API_KEY - # Public RPC (not recommended for production) ETHEREUM_MAINNET_RPC=https://eth.llamarpc.com ``` diff --git a/docs/deployment/INFURA_SETTINGS_FIX.md b/docs/deployment/INFURA_SETTINGS_FIX.md index 7a32473..bbfb32f 100644 --- a/docs/deployment/INFURA_SETTINGS_FIX.md +++ b/docs/deployment/INFURA_SETTINGS_FIX.md @@ -62,11 +62,6 @@ Update `.env` line 18 with alternative provider: ETHEREUM_MAINNET_RPC=https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY ``` -**QuickNode**: -```bash -ETHEREUM_MAINNET_RPC=https://your-endpoint.quiknode.pro/YOUR_API_KEY -``` - **Public RPC** (not recommended for production): ```bash ETHEREUM_MAINNET_RPC=https://eth.llamarpc.com diff --git a/frontend-dapp/index.html b/frontend-dapp/index.html index 73345a6..5227525 100644 --- a/frontend-dapp/index.html +++ b/frontend-dapp/index.html @@ -3,10 +3,13 @@ - - OMNL Mission Control - Chain 138 + + + + + DBIS — Chain 138
-
OMNL Mission Control
-
Loading dashboard...
+
DBIS
+
Loading…
diff --git a/frontend-dapp/package.json b/frontend-dapp/package.json index b81e00d..314fc9f 100644 --- a/frontend-dapp/package.json +++ b/frontend-dapp/package.json @@ -3,8 +3,11 @@ "version": "1.0.0", "type": "module", "scripts": { + "predev": "node scripts/sync-omnl-consoles.mjs", "dev": "vite", + "prebuild": "node scripts/sync-omnl-consoles.mjs", "build": "node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build", + "serve:portal": "node scripts/portal-serve.mjs", "build:check": "tsc && NODE_OPTIONS='--max-old-space-size=4096' vite build", "preview": "vite preview", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", @@ -13,6 +16,9 @@ "test:coverage": "vitest --coverage" }, "dependencies": { + "@emotion/react": "^11.14.0", + "@emotion/styled": "^11.14.1", + "@lit/reactive-element": "^2.1.2", "@safe-global/api-kit": "^4.0.1", "@safe-global/protocol-kit": "^1.3.0", "@tanstack/react-query": "^5.90.21", @@ -22,6 +28,9 @@ "@walletconnect/ethereum-provider": "^2.23.5", "autoprefixer": "^10.4.24", "ethers": "^5.8.0", + "lit": "^3.3.3", + "lit-element": "^4.2.2", + "lit-html": "^3.3.3", "postcss": "^8.5.6", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -47,6 +56,7 @@ "eslint-plugin-react-refresh": "^0.4.26", "identity-obj-proxy": "^3.0.0", "jsdom": "^23.2.0", + "serve": "^14.2.6", "ts-jest": "^29.4.6", "typescript": "^5.9.3", "vite": "^5.4.21", diff --git a/frontend-dapp/src/App.tsx b/frontend-dapp/src/App.tsx index e9e451e..65fc3a2 100644 --- a/frontend-dapp/src/App.tsx +++ b/frontend-dapp/src/App.tsx @@ -1,4 +1,4 @@ -import { BrowserRouter, Routes, Route } from 'react-router-dom' +import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom' import { WagmiProvider } from 'wagmi' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { ThirdwebProvider } from '@thirdweb-dev/react' @@ -14,8 +14,8 @@ import ReservePage from './pages/ReservePage' import HistoryPage from './pages/HistoryPage' import AdminPanel from './pages/AdminPanel' import DocsPage from './pages/DocsPage' -import WalletsDemoPage from './pages/WalletsDemoPage' import HubPage from './pages/HubPage' +import WalletsDemoPage from './pages/WalletsDemoPage' import Layout from './components/layout/Layout' import OmnlProductLayout from './components/layout/OmnlProductLayout' import ToastProvider from './components/ui/ToastProvider' @@ -63,7 +63,6 @@ function App() { } > - } /> } /> } /> } /> @@ -71,6 +70,7 @@ function App() { } /> } /> + } /> diff --git a/frontend-dapp/src/components/admin/AdminDashboard.tsx b/frontend-dapp/src/components/admin/AdminDashboard.tsx index de7936f..f159a5a 100644 --- a/frontend-dapp/src/components/admin/AdminDashboard.tsx +++ b/frontend-dapp/src/components/admin/AdminDashboard.tsx @@ -99,7 +99,7 @@ export default function AdminDashboard() { }, [publicClient, address]) return ( -
+
diff --git a/frontend-dapp/src/components/admin/AuditLogViewer.tsx b/frontend-dapp/src/components/admin/AuditLogViewer.tsx index 7e301a0..eda9694 100644 --- a/frontend-dapp/src/components/admin/AuditLogViewer.tsx +++ b/frontend-dapp/src/components/admin/AuditLogViewer.tsx @@ -73,7 +73,7 @@ export default function AuditLogViewer() { value={searchTerm} onChange={(e) => setSearchTerm(e.target.value)} placeholder="Search logs..." - className="w-full px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-blue-500" + className="w-full px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-green-500" />
{(['all', 'success', 'failure'] as const).map((f) => ( diff --git a/frontend-dapp/src/components/admin/FunctionPermissions.tsx b/frontend-dapp/src/components/admin/FunctionPermissions.tsx index b33af3d..26e9f49 100644 --- a/frontend-dapp/src/components/admin/FunctionPermissions.tsx +++ b/frontend-dapp/src/components/admin/FunctionPermissions.tsx @@ -147,7 +147,7 @@ export default function FunctionPermissions() { setSelectedRole(e.target.value)} - className="w-full px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white focus:outline-none focus:border-blue-500" + className="w-full px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white focus:outline-none focus:border-green-500" > {roles.map((role) => ( diff --git a/frontend-dapp/src/components/admin/TwoWayBridgeAdmin.tsx b/frontend-dapp/src/components/admin/TwoWayBridgeAdmin.tsx index b7e4ec3..80c1637 100644 --- a/frontend-dapp/src/components/admin/TwoWayBridgeAdmin.tsx +++ b/frontend-dapp/src/components/admin/TwoWayBridgeAdmin.tsx @@ -200,7 +200,7 @@ export default function TwoWayBridgeAdmin() { value={newAdmin} onChange={(e) => setNewAdmin(e.target.value)} placeholder="0x..." - className="flex-1 px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-blue-500" + className="flex-1 px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-green-500" />
@@ -129,7 +129,7 @@ export default function WalletBackup() { value={backupPassword} onChange={(e) => setBackupPassword(e.target.value)} placeholder="Enter password" - className="w-full px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-blue-500" + className="w-full px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-green-500" />
@@ -132,7 +132,7 @@ export default function WalletDeployment() { value={newOwner} onChange={(e) => setNewOwner(e.target.value)} placeholder="0x..." - className="flex-1 px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-blue-500 font-mono text-sm" + className="flex-1 px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-green-500 font-mono text-sm" />
@@ -173,7 +173,7 @@ export default function WalletDeploymentEnhanced() { value={newOwner} onChange={(e) => setNewOwner(e.target.value)} placeholder="0x..." - className="flex-1 px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-blue-500 font-mono text-sm" + className="flex-1 px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-green-500 font-mono text-sm" /> diff --git a/frontend-dapp/src/components/icons/NasaIcon.tsx b/frontend-dapp/src/components/icons/NasaIcon.tsx index e587240..7f8a424 100644 --- a/frontend-dapp/src/components/icons/NasaIcon.tsx +++ b/frontend-dapp/src/components/icons/NasaIcon.tsx @@ -23,7 +23,12 @@ export type NasaIconName = | 'globe' | 'money' | 'rail' - | 'admin'; + | 'admin' + | 'dashboard' + | 'code' + | 'shield' + | 'terminal' + | 'plus'; type Props = SVGProps & { name: NasaIconName; @@ -170,6 +175,39 @@ const paths: Record = { ), + dashboard: ( + <> + + + + + + ), + code: ( + <> + + + + ), + shield: ( + <> + + + + ), + terminal: ( + <> + + + + + ), + plus: ( + <> + + + + ), }; export default function NasaIcon({ name, size = 18, className = '', ...props }: Props) { diff --git a/frontend-dapp/src/components/layout/Layout.tsx b/frontend-dapp/src/components/layout/Layout.tsx index d55e4c6..88b6412 100644 --- a/frontend-dapp/src/components/layout/Layout.tsx +++ b/frontend-dapp/src/components/layout/Layout.tsx @@ -1,88 +1,96 @@ -import { Link, useLocation } from 'react-router-dom' -import { useRef } from 'react' +import { Link, Outlet, useLocation } from 'react-router-dom' +import { useRef, useState } from 'react' import WalletConnect from '../wallet/WalletConnect' import WalletDisconnectNotice from '../wallet/WalletDisconnectNotice' import { defaultFrontendExplorerUrl } from '../../config/networks' +import MobileNavDrawer from './MobileNavDrawer' +import MobileBottomNav from './MobileBottomNav' -interface LayoutProps { - children: React.ReactNode -} - -export default function Layout({ children }: LayoutProps) { +export default function Layout() { const location = useLocation() const userInitiatedDisconnectRef = useRef(false) + const [menuOpen, setMenuOpen] = useState(false) const isActive = (path: string) => location.pathname === path + const navItems = [ + { to: '/hub', label: 'DBIS Dashboard', active: isActive('/hub') }, + { to: '/bridge', label: 'Bridge', active: isActive('/bridge') }, + { to: '/swap', label: 'Swap', active: isActive('/swap') }, + { to: '/reserve', label: 'Reserve', active: isActive('/reserve') }, + { to: '/history', label: 'History', active: isActive('/history') }, + { to: '/wallets', label: 'Wallets', active: isActive('/wallets') }, + { to: '/admin', label: 'Admin', active: isActive('/admin') }, + { to: '/docs', label: 'Developers', active: isActive('/docs') }, + { to: '/central-bank', label: 'Z Online Bank', active: isActive('/central-bank') }, + { to: '/office-24', label: 'O24 Central Bank', active: isActive('/office-24') }, + { to: '/trade', label: 'DBIS Trade', active: isActive('/trade') }, + { href: defaultFrontendExplorerUrl, label: 'Explorer' }, + ] + return ( -
+
-