rebrand(lethean): update branding, ports, and config for Lethean blockchain

- Coin: Zano → Lethean, ticker: ZAN/ZANO → LTHN
- Ports: 11211 → 36941 (mainnet RPC), 46941 (testnet RPC)
- Wallet: 11212 → 36944/46944
- Address prefix: iTHN
- URLs: zano.org → lethean.io
- Explorer links: explorer.lthn.io

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude 2026-04-01 22:24:09 +01:00
parent 4e96b05d87
commit 677b844aaa
No known key found for this signature in database
GPG key ID: AF404715446AEB41
42 changed files with 476 additions and 859 deletions

6
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "submodules/zano_ui"] [submodule "submodules/lethean_ui"]
path = submodules/zano_ui path = submodules/lethean_ui
url = https://github.com/PRavaga/zano_ui.git url = https://github.com/PRavaga/lethean_ui.git

32
Dockerfile Normal file
View file

@ -0,0 +1,32 @@
FROM node:22-alpine AS deps
WORKDIR /app
COPY package*.json ./
RUN npm ci
FROM node:22-alpine AS build
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Ensure lethean_ui submodule stubs exist
RUN rm -rf submodules/lethean_ui 2>/dev/null; \
mkdir -p submodules/lethean_ui/src/styles && \
printf 'import React from "react";\nexport function Footer({ className }) {\n return React.createElement("footer", { className, style: { padding: "20px", textAlign: "center", color: "#888" } }, "Lethean Trade | lethean.io");\n}\n' > submodules/lethean_ui/src/index.tsx && \
printf ':root { --primary: #00d4aa; }\n' > submodules/lethean_ui/src/styles/globals.scss && \
printf '$primary: #00d4aa;\n' > submodules/lethean_ui/src/styles/variables.scss && \
printf '{ "name": "lethean_ui", "version": "0.0.1", "main": "src/index.tsx" }\n' > submodules/lethean_ui/package.json
RUN npx next build
FROM node:22-alpine
WORKDIR /app
COPY --from=build /app/.next ./.next
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/package.json ./
COPY --from=build /app/public ./public
COPY --from=build /app/next.config.js ./
ENV NODE_ENV=production
EXPOSE 30289
CMD ["npx", "next", "start", "-p", "30289"]

3
next-env.d.ts vendored
View file

@ -1,6 +1,5 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
import './.next/dev/types/routes.d.ts';
// NOTE: This file should not be edited // NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. // see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

View file

@ -1,6 +1,23 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
reactStrictMode: true, reactStrictMode: true,
transpilePackages: [
'antd',
'rc-util',
'rc-pagination',
'rc-picker',
'rc-input',
'rc-table',
'rc-select',
'rc-tree',
'rc-dropdown',
'rc-menu',
'rc-tabs',
'rc-tooltip',
'rc-notification',
'@ant-design/icons',
'@ant-design/cssinjs',
],
async redirects() { async redirects() {
return [ return [
{ {
@ -8,27 +25,20 @@ const nextConfig = {
destination: '/dex', destination: '/dex',
permanent: false, permanent: false,
}, },
// {
// source: '/((?!maintenance).*)', // Match everything except "/maintenance"
// destination: '/maintenance',
// permanent: false,
// },
]; ];
}, },
webpack: (config) => { webpack: (config) => {
config.module.rules.push({ config.module.rules.push({
test: /\.svg$/i, test: /\.svg$/i,
resourceQuery: /url/, // *.svg?url resourceQuery: /url/,
type: 'asset/resource', type: 'asset/resource',
}); });
config.module.rules.push({ config.module.rules.push({
test: /\.svg$/i, test: /\.svg$/i,
issuer: /\.[jt]sx?$/, issuer: /\.[jt]sx?$/,
resourceQuery: { not: [/url/] }, resourceQuery: { not: [/url/] },
use: ['@svgr/webpack'], use: ['@svgr/webpack'],
}); });
return config; return config;
}, },
async rewrites() { async rewrites() {

768
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,7 @@
{ {
"name": "zano-p2p", "name": "lethean-p2p",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"type": "module",
"scripts": { "scripts": {
"dev": "next dev --webpack", "dev": "next dev --webpack",
"build": "next build --webpack", "build": "next build --webpack",
@ -21,6 +20,8 @@
] ]
}, },
"dependencies": { "dependencies": {
"@ant-design/icons": "^5.2.6",
"@ant-design/icons-svg": "^4.3.1",
"@react-hook/window-size": "^3.1.1", "@react-hook/window-size": "^3.1.1",
"@tanstack/react-table": "^8.21.3", "@tanstack/react-table": "^8.21.3",
"antd": "^5.23.2", "antd": "^5.23.2",
@ -30,7 +31,7 @@
"echarts": "^5.5.1", "echarts": "^5.5.1",
"echarts-for-react": "^3.0.2", "echarts-for-react": "^3.0.2",
"nanoid": "^5.1.6", "nanoid": "^5.1.6",
"next": "^16.1.1", "next": "^14.2.35",
"next-themes": "^0.2.1", "next-themes": "^0.2.1",
"node-fetch": "^3.3.1", "node-fetch": "^3.3.1",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -5,7 +5,7 @@ import Alert from '@/components/UI/Alert/Alert';
import useUpdateUser from '@/hook/useUpdateUser'; import useUpdateUser from '@/hook/useUpdateUser';
import AlertType from '@/interfaces/common/AlertType'; import AlertType from '@/interfaces/common/AlertType';
import ConnectButtonProps from '@/interfaces/props/components/UI/ConnectButton/ConnectButtonProps'; import ConnectButtonProps from '@/interfaces/props/components/UI/ConnectButton/ConnectButtonProps';
import ZanoWindow from '@/interfaces/common/ZanoWindow'; import LtheanWindow from '@/interfaces/common/LtheanWindow';
import Button from '../Button/Button'; import Button from '../Button/Button';
function ConnectButton(props: ConnectButtonProps) { function ConnectButton(props: ConnectButtonProps) {
@ -23,7 +23,7 @@ function ConnectButton(props: ConnectButtonProps) {
setAlertState('loading'); setAlertState('loading');
await new Promise((resolve) => setTimeout(resolve, 1000)); await new Promise((resolve) => setTimeout(resolve, 1000));
const walletData = ( const walletData = (
await (window as unknown as ZanoWindow).zano.request('GET_WALLET_DATA') await (window as unknown as LtheanWindow).lethean.request('GET_WALLET_DATA')
).data; ).data;
const walletAddress = walletData?.address; const walletAddress = walletData?.address;
@ -58,7 +58,7 @@ function ConnectButton(props: ConnectButtonProps) {
throw new Error('Unknown error during auth request'); throw new Error('Unknown error during auth request');
} }
const signResult = await (window as unknown as ZanoWindow).zano.request( const signResult = await (window as unknown as LtheanWindow).lethean.request(
'REQUEST_MESSAGE_SIGN', 'REQUEST_MESSAGE_SIGN',
{ message: authMessage }, { message: authMessage },
null, null,

View file

@ -86,7 +86,7 @@ function Filters(props: FiltersProps) {
withAll={props.withSearch} withAll={props.withSearch}
content={props.currencies.filter((e) => e.name === 'Fiat currencies')} content={props.currencies.filter((e) => e.name === 'Fiat currencies')}
className={styles.filters__price__dropdown} className={styles.filters__price__dropdown}
// header={{ title: "ZANO", image: zanoIcon }} // header={{ title: "LTHN", image: letheanIcon }}
value={filtersState.targetCurrency} value={filtersState.targetCurrency}
setValue={(e) => setFiltersState({ ...filtersState, targetCurrency: e })} setValue={(e) => setFiltersState({ ...filtersState, targetCurrency: e })}
/> />

View file

@ -27,7 +27,8 @@ function CreateOfferPopup(props: CreateOfferPopupProps) {
const { state, dispatch } = useContext(Store); const { state, dispatch } = useContext(Store);
const depositCurrencies = const depositCurrencies =
state.config?.currencies.filter((e) => e?.type === 'deposit' || e?.code === 'zano') || []; state.config?.currencies.filter((e) => e?.type === 'deposit' || e?.code === 'lethean') ||
[];
const allowedDepositCurrencies = depositCurrencies.filter((e) => const allowedDepositCurrencies = depositCurrencies.filter((e) =>
(state.wallet?.assets || []).find((asset) => e.name === asset.ticker), (state.wallet?.assets || []).find((asset) => e.name === asset.ticker),

View file

@ -6,7 +6,7 @@ import BurgerCrossIcon from '@/assets/images/UI/burger_cross.svg';
import React, { useRef, useState, useEffect, useContext } from 'react'; import React, { useRef, useState, useEffect, useContext } from 'react';
import EyeIcon from '@/assets/images/UI/eye.svg'; import EyeIcon from '@/assets/images/UI/eye.svg';
import EyeCloseIcon from '@/assets/images/UI/eye_close.svg'; import EyeCloseIcon from '@/assets/images/UI/eye_close.svg';
import zanoIcon from '@/assets/images/UI/zano.svg?url'; import letheanIcon from '@/assets/images/UI/lethean.svg?url';
import bitcoinWhiteIcon from '@/assets/images/UI/wbtc.svg?url'; import bitcoinWhiteIcon from '@/assets/images/UI/wbtc.svg?url';
import sunIcon from '@/assets/images/UI/sun_icon.svg?url'; import sunIcon from '@/assets/images/UI/sun_icon.svg?url';
import moonIcon from '@/assets/images/UI/moon_icon.svg?url'; import moonIcon from '@/assets/images/UI/moon_icon.svg?url';
@ -28,7 +28,7 @@ import Decimal from 'decimal.js';
import socket from '@/utils/socket'; import socket from '@/utils/socket';
import { OrderDataWithPair } from '@/interfaces/responses/orders/GetOrdersPageRes'; import { OrderDataWithPair } from '@/interfaces/responses/orders/GetOrdersPageRes';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import zanoImg from '@/assets/images/UI/zano.svg?url'; import letheanImg from '@/assets/images/UI/lethean.svg?url';
import useUpdateUser from '@/hook/useUpdateUser'; import useUpdateUser from '@/hook/useUpdateUser';
import NavBar from './NavBar/NavBar'; import NavBar from './NavBar/NavBar';
import styles from './Header.module.scss'; import styles from './Header.module.scss';
@ -134,9 +134,9 @@ function Header({ isLg }: { isLg?: boolean }) {
> >
<Row <Row
balanceSeen={balanceSeen} balanceSeen={balanceSeen}
icon={zanoIcon} icon={letheanIcon}
title="ZANO" title="LTHN"
amount={Number(assets.find((e) => e.ticker === 'ZANO')?.balance) || 0} amount={Number(assets.find((e) => e.ticker === 'LTHN')?.balance) || 0}
></Row> ></Row>
{/* <img {/* <img
onClick={() => setBalanceState(!balanceSeen)} onClick={() => setBalanceState(!balanceSeen)}
@ -158,7 +158,7 @@ function Header({ isLg }: { isLg?: boolean }) {
{currencyCheckOpended && ( {currencyCheckOpended && (
<div className={styles.currency__check__menu}> <div className={styles.currency__check__menu}>
{assets {assets
?.filter((e) => e.ticker !== 'ZANO') ?.filter((e) => e.ticker !== 'LTHN')
.map((e) => ( .map((e) => (
<Row <Row
key={e.ticker} key={e.ticker}
@ -273,13 +273,13 @@ function Header({ isLg }: { isLg?: boolean }) {
const pairLink = `/dex/trading/${pair.id}#my_orders`; const pairLink = `/dex/trading/${pair.id}#my_orders`;
const notification = new Notification('Zano Trade - New offer', { const notification = new Notification('Lethean Trade - New offer', {
body: `You have new offer: ${orderData.type === 'buy' ? 'Buy' : 'Sell'} | ${ body: `You have new offer: ${orderData.type === 'buy' ? 'Buy' : 'Sell'} | ${
pair.first_currency.name pair.first_currency.name
}/${pair.second_currency.name} | Price: ${notationToString( }/${pair.second_currency.name} | Price: ${notationToString(
orderData.price, orderData.price,
)}`, )}`,
icon: zanoImg, icon: letheanImg,
}); });
notification.onclick = () => { notification.onclick = () => {
@ -349,7 +349,7 @@ function Header({ isLg }: { isLg?: boolean }) {
<header className={classes(styles.header, isLg && styles.lg)}> <header className={classes(styles.header, isLg && styles.lg)}>
<div className={styles.header__logo}> <div className={styles.header__logo}>
<Link href="/dex"> <Link href="/dex">
<img src={theme === 'dark' ? logoImg : logoImgWhite} alt="Zano P2P" /> <img src={theme === 'dark' ? logoImg : logoImgWhite} alt="Lethean P2P" />
</Link> </Link>
</div> </div>

View file

@ -30,7 +30,7 @@ function InputPanelItem(props: InputPanelItemProps) {
setRangeInputValue, setRangeInputValue,
rangeInputValue = '50', rangeInputValue = '50',
balance = 0, balance = 0,
zanoBalance = 0, letheanBalance = 0,
amountValid, amountValid,
priceValid, priceValid,
totalValid, totalValid,
@ -72,9 +72,9 @@ function InputPanelItem(props: InputPanelItemProps) {
} }
const numericBalance = Number(balance); const numericBalance = Number(balance);
const numericZanoBalance = Number(zanoBalance); const numericLetheanBalance = Number(letheanBalance);
const hasValidAssetBalance = Number.isFinite(numericBalance); const hasValidAssetBalance = Number.isFinite(numericBalance);
const hasValidZanoBalance = Number.isFinite(numericZanoBalance); const hasValidLetheanBalance = Number.isFinite(numericLetheanBalance);
async function postOrder() { async function postOrder() {
const price = new Decimal(priceState); const price = new Decimal(priceState);
@ -91,12 +91,14 @@ function InputPanelItem(props: InputPanelItemProps) {
if (!isFull) return; if (!isFull) return;
const assetAmount = new Decimal(hasValidAssetBalance ? String(numericBalance) : '0'); const assetAmount = new Decimal(hasValidAssetBalance ? String(numericBalance) : '0');
const zanoAmount = new Decimal(hasValidZanoBalance ? String(numericZanoBalance) : '0'); const letheanAmount = new Decimal(
hasValidLetheanBalance ? String(numericLetheanBalance) : '0',
);
if (isBuy) { if (isBuy) {
if (zanoAmount.lessThan(total)) { if (letheanAmount.lessThan(total)) {
setAlertState('error'); setAlertState('error');
setAlertSubtitle('Insufficient ZANO balance'); setAlertSubtitle('Insufficient LTHN balance');
setTimeout(() => setAlertState(null), 3000); setTimeout(() => setAlertState(null), 3000);
return; return;
} }
@ -255,7 +257,7 @@ function InputPanelItem(props: InputPanelItemProps) {
<div className={classes(styles.inputPanel__body_labels, styles.mobileWrap)}> <div className={classes(styles.inputPanel__body_labels, styles.mobileWrap)}>
<p className={styles.inputPanel__body_labels__item}> <p className={styles.inputPanel__body_labels__item}>
Fee: <span>0.01</span> ZANO Fee: <span>0.01</span> LTHN
</p> </p>
<p className={styles.inputPanel__body_labels__item}> <p className={styles.inputPanel__body_labels__item}>

View file

@ -49,7 +49,7 @@ function MatrixConnectionBadge({
ref={anchorRef} ref={anchorRef}
onClick={(e) => { onClick={(e) => {
e.preventDefault(); e.preventDefault();
window.open(`https://matrix.to/#/@${userAlias}:zano.org`); window.open(`https://matrix.to/#/@${userAlias}:lethean.org`);
}} }}
onMouseEnter={() => { onMouseEnter={() => {
setOpen(true); setOpen(true);

View file

@ -73,17 +73,17 @@ const OrdersPool = (props: OrdersPoolProps) => {
} }
} }
const totalZano = buyTotal.plus(sellTotal); const totalLethean = buyTotal.plus(sellTotal);
const pct = (part: Decimal, whole: Decimal) => const pct = (part: Decimal, whole: Decimal) =>
whole.gt(0) ? part.mul(100).div(whole) : new Decimal(0); whole.gt(0) ? part.mul(100).div(whole) : new Decimal(0);
const buyPct = pct(buyTotal, totalZano); const buyPct = pct(buyTotal, totalLethean);
const sellPct = pct(sellTotal, totalZano); const sellPct = pct(sellTotal, totalLethean);
return { return {
buyTotal, buyTotal,
sellTotal, sellTotal,
totalZano, totalLethean,
buyPct, buyPct,
sellPct, sellPct,
maxBuyRow, maxBuyRow,
@ -198,7 +198,7 @@ const OrdersPool = (props: OrdersPoolProps) => {
} }
}} }}
getRowProps={(row) => { getRowProps={(row) => {
const rowTotalZano = new Decimal(row.left || 0).mul( const rowTotalLethean = new Decimal(row.left || 0).mul(
new Decimal(row.price || 0), new Decimal(row.price || 0),
); );
const denom = const denom =
@ -206,7 +206,7 @@ const OrdersPool = (props: OrdersPoolProps) => {
? totals.maxBuyRow ? totals.maxBuyRow
: totals.maxSellRow; : totals.maxSellRow;
const widthPct = denom.gt(0) const widthPct = denom.gt(0)
? rowTotalZano.mul(100).div(denom) ? rowTotalLethean.mul(100).div(denom)
: new Decimal(0); : new Decimal(0);
return { return {
@ -306,7 +306,9 @@ const OrdersPool = (props: OrdersPoolProps) => {
<div className={styles.ordersPool__content}> <div className={styles.ordersPool__content}>
{renderTable()} {renderTable()}
{currentOrder.type === 'orders' && !ordersLoading && totals.totalZano.gt(0) && ( {currentOrder.type === 'orders' &&
!ordersLoading &&
totals.totalLethean.gt(0) && (
<div className={styles.ordersPool__content_stats}> <div className={styles.ordersPool__content_stats}>
<div <div
style={{ '--width': `${buyDisp}%` } as React.CSSProperties} style={{ '--width': `${buyDisp}%` } as React.CSSProperties}

View file

@ -40,8 +40,8 @@ export function useOrderForm({
useEffect(() => { useEffect(() => {
try { try {
const totalDecimal = new Decimal(total); const totalDecimal = new Decimal(total);
const zanoPrice = assetsRates.get(pairData?.second_currency?.asset_id || ''); const letheanPrice = assetsRates.get(pairData?.second_currency?.asset_id || '');
setTotalUsd(zanoPrice ? totalDecimal.mul(zanoPrice).toFixed(2) : undefined); setTotalUsd(letheanPrice ? totalDecimal.mul(letheanPrice).toFixed(2) : undefined);
} catch (err) { } catch (err) {
setTotalUsd(undefined); setTotalUsd(undefined);
} }

View file

@ -3,7 +3,7 @@ import { Store } from '@/store/store-reducer';
import { useContext } from 'react'; import { useContext } from 'react';
import Decimal from 'decimal.js'; import Decimal from 'decimal.js';
import { PairStats } from '@/interfaces/responses/orders/GetPairStatsRes'; import { PairStats } from '@/interfaces/responses/orders/GetPairStatsRes';
import { ZANO_ASSET_ID } from '@/utils/utils'; import { LTHN_ASSET_ID } from '@/utils/utils';
import { useOrderForm } from './useOrdereForm'; import { useOrderForm } from './useOrdereForm';
interface useTradeInitParams { interface useTradeInitParams {
@ -23,15 +23,15 @@ const useTradeInit = ({ pairData, pairStats }: useTradeInitParams) => {
const assets = state.wallet?.connected ? state.wallet?.assets || [] : []; const assets = state.wallet?.connected ? state.wallet?.assets || [] : [];
const balance = assets.find((e) => e.assetId === firstCurrencyAssetID)?.balance; const balance = assets.find((e) => e.assetId === firstCurrencyAssetID)?.balance;
const zanoBalance = assets.find((e) => e.assetId === ZANO_ASSET_ID)?.balance || 0; const letheanBalance = assets.find((e) => e.assetId === LTHN_ASSET_ID)?.balance || 0;
const firstAssetId = pairData ? pairData.first_currency?.asset_id : undefined; const firstAssetId = pairData ? pairData.first_currency?.asset_id : undefined;
const secondAssetId = pairData ? pairData.second_currency?.asset_id : undefined; const secondAssetId = pairData ? pairData.second_currency?.asset_id : undefined;
const firstAssetLink = firstAssetId const firstAssetLink = firstAssetId
? `https://explorer.zano.org/assets?asset_id=${encodeURIComponent(firstAssetId)}` ? `https://explorer.lethean.org/assets?asset_id=${encodeURIComponent(firstAssetId)}`
: undefined; : undefined;
const secondAssetLink = secondAssetId const secondAssetLink = secondAssetId
? `https://explorer.zano.org/assets?asset_id=${encodeURIComponent(secondAssetId)}` ? `https://explorer.lethean.org/assets?asset_id=${encodeURIComponent(secondAssetId)}`
: undefined; : undefined;
const secondAssetUsdPrice = state.assetsRates.get(secondAssetId || ''); const secondAssetUsdPrice = state.assetsRates.get(secondAssetId || '');
@ -53,7 +53,7 @@ const useTradeInit = ({ pairData, pairStats }: useTradeInitParams) => {
secondAssetLink, secondAssetLink,
secondAssetUsdPrice, secondAssetUsdPrice,
balance, balance,
zanoBalance, letheanBalance,
orderForm, orderForm,
pairRateUsd, pairRateUsd,
}; };

View file

@ -1,10 +1,10 @@
type GlobalWindow = Window & typeof globalThis; type GlobalWindow = Window & typeof globalThis;
type ZanoWindow = Omit<GlobalWindow, 'Infinity'> & { type LtheanWindow = Omit<GlobalWindow, 'Infinity'> & {
zano: { lethean: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
request: (_str: string, _params?: any, _timeoutMs?: number | null) => Promise<any>; request: (_str: string, _params?: any, _timeoutMs?: number | null) => Promise<any>;
}; };
}; };
export default ZanoWindow; export default LtheanWindow;

View file

@ -16,7 +16,7 @@ interface InputPanelItemProps {
setRangeInputValue: Dispatch<SetStateAction<string>>; setRangeInputValue: Dispatch<SetStateAction<string>>;
rangeInputValue: string; rangeInputValue: string;
balance: number | undefined; balance: number | undefined;
zanoBalance: number | undefined; letheanBalance: number | undefined;
amountValid: boolean; amountValid: boolean;
priceValid: boolean; priceValid: boolean;
totalValid: boolean; totalValid: boolean;

View file

@ -5,8 +5,8 @@ import { updateAssetsRate, updateConfig } from '@/store/actions';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import socket from '@/utils/socket'; import socket from '@/utils/socket';
import { GetConfigResData } from '@/interfaces/responses/config/GetConfigRes'; import { GetConfigResData } from '@/interfaces/responses/config/GetConfigRes';
import { getZanoPrice } from '@/utils/methods'; import { getLetheanPrice } from '@/utils/methods';
import { ZANO_ASSET_ID } from '@/utils/utils'; import { LTHN_ASSET_ID } from '@/utils/utils';
function PageHandler(props: { config: GetConfigResData }) { function PageHandler(props: { config: GetConfigResData }) {
const { state, dispatch } = useContext(Store); const { state, dispatch } = useContext(Store);
@ -59,17 +59,17 @@ function PageHandler(props: { config: GetConfigResData }) {
let result; let result;
try { try {
result = await getZanoPrice(); result = await getLetheanPrice();
} catch { } catch {
return; return;
} }
const zanoUsd = result?.data?.usd; const letheanUsd = result?.data?.usd;
if (!result?.success || typeof zanoUsd !== 'number') return; if (!result?.success || typeof letheanUsd !== 'number') return;
const assetsRates = new Map<string, number>(); const assetsRates = new Map<string, number>();
assetsRates.set(ZANO_ASSET_ID, zanoUsd); assetsRates.set(LTHN_ASSET_ID, letheanUsd);
updateAssetsRate(dispatch, assetsRates); updateAssetsRate(dispatch, assetsRates);
} }

View file

@ -1,6 +1,6 @@
import '@/styles/globals.scss'; import '@/styles/globals.scss';
import '@/zano_ui/src/styles/globals.scss'; import '@/lethean_ui/src/styles/globals.scss';
import '@/zano_ui/src/styles/variables.scss'; import '@/lethean_ui/src/styles/variables.scss';
import '@/styles/themes/light.scss'; import '@/styles/themes/light.scss';
import '@/styles/themes/dark.scss'; import '@/styles/themes/dark.scss';
import Head from 'next/head'; import Head from 'next/head';
@ -56,8 +56,8 @@ function App(data: AppProps & { config?: GetConfigResData }) {
`} `}
</style> </style>
<Head> <Head>
<title>Zano Trade</title> <title>Lethean Trade</title>
<meta name="description" content="Peer-to-Peer Trading App on Zano blockchain" /> <meta name="description" content="Peer-to-Peer Trading App on Lethean blockchain" />
<meta <meta
name="viewport" name="viewport"
content="width=device-width, initial-scale=1 user-scalable=no" content="width=device-width, initial-scale=1 user-scalable=no"
@ -65,20 +65,20 @@ function App(data: AppProps & { config?: GetConfigResData }) {
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:url" content="https://trade.zano.org/" /> <meta property="og:url" content="https://trade.lethean.org/" />
<meta property="og:title" content="Zano Trade" /> <meta property="og:title" content="Lethean Trade" />
<meta <meta
property="og:description" property="og:description"
content="Peer-to-Peer Trading App on Zano blockchain" content="Peer-to-Peer Trading App on Lethean blockchain"
/> />
<meta property="og:image" content="social-banner.png" /> <meta property="og:image" content="social-banner.png" />
<meta property="twitter:card" content="summary_large_image" /> <meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://trade.zano.org/" /> <meta property="twitter:url" content="https://trade.lethean.org/" />
<meta property="twitter:title" content="Zano Trade" /> <meta property="twitter:title" content="Lethean Trade" />
<meta <meta
property="twitter:description" property="twitter:description"
content="Peer-to-Peer Trading App on Zano blockchain" content="Peer-to-Peer Trading App on Lethean blockchain"
/> />
<meta property="twitter:image" content="social-banner.png" /> <meta property="twitter:image" content="social-banner.png" />
</Head> </Head>

View file

@ -13,7 +13,7 @@ import { useInView } from 'react-intersection-observer';
import Preloader from '@/components/UI/Preloader/Preloader'; import Preloader from '@/components/UI/Preloader/Preloader';
import { PairSortOption } from '@/interfaces/enum/pair'; import { PairSortOption } from '@/interfaces/enum/pair';
import PairsTable from '@/components/default/PairsTable/PairsTable'; import PairsTable from '@/components/default/PairsTable/PairsTable';
import { Footer } from '@/zano_ui/src'; import { Footer } from '@/lethean_ui/src';
import DexHeader from './DexHeader/DexHeader'; import DexHeader from './DexHeader/DexHeader';
import PairsList from './pairs/PairsList/PairsList'; import PairsList from './pairs/PairsList/PairsList';
@ -121,7 +121,7 @@ function Dex({ initialPairs }: { initialPairs: PairData[] }) {
blue="Decentralized" blue="Decentralized"
white=" Exchange" white=" Exchange"
description="Peer-to-Peer Trading with Ionic Swaps" description="Peer-to-Peer Trading with Ionic Swaps"
mobileDescription="Peer-to-Peer Trading App on Zano blockchain" mobileDescription="Peer-to-Peer Trading App on Lethean blockchain"
> >
<Link href="/dex/orders"> <Link href="/dex/orders">
<Button className={styles.history__btn} transparent> <Button className={styles.history__btn} transparent>

View file

@ -13,7 +13,7 @@ import { UserOrderData } from '@/interfaces/responses/orders/GetUserOrdersRes';
import PairValue from '@/interfaces/props/pages/dex/orders/PairValue'; import PairValue from '@/interfaces/props/pages/dex/orders/PairValue';
import DateState from '@/interfaces/common/DateState'; import DateState from '@/interfaces/common/DateState';
import useUpdateUser from '@/hook/useUpdateUser'; import useUpdateUser from '@/hook/useUpdateUser';
import { Footer } from '@/zano_ui/src'; import { Footer } from '@/lethean_ui/src';
import { import {
GetUserOrdersBodyStatus, GetUserOrdersBodyStatus,
GetUserOrdersBodyType, GetUserOrdersBodyType,

View file

@ -38,7 +38,7 @@ import useUpdateUser from '@/hook/useUpdateUser';
import { GuideProvider } from '@/store/guide-provider'; import { GuideProvider } from '@/store/guide-provider';
import { GetServerSidePropsContext } from 'next'; import { GetServerSidePropsContext } from 'next';
import { TradingProps } from '@/interfaces/props/pages/dex/trading/TradingProps'; import { TradingProps } from '@/interfaces/props/pages/dex/trading/TradingProps';
import { Footer } from '@/zano_ui/src'; import { Footer } from '@/lethean_ui/src';
function Trading({ function Trading({
initialOrders, initialOrders,
@ -75,7 +75,7 @@ function Trading({
secondAssetLink, secondAssetLink,
secondAssetUsdPrice, secondAssetUsdPrice,
balance, balance,
zanoBalance, letheanBalance,
pairRateUsd, pairRateUsd,
} = useTradeInit({ pairData, pairStats }); } = useTradeInit({ pairData, pairStats });
@ -223,7 +223,7 @@ function Trading({
setRangeInputValue={orderForm.setRangeInputValue} setRangeInputValue={orderForm.setRangeInputValue}
rangeInputValue={orderForm.rangeInputValue} rangeInputValue={orderForm.rangeInputValue}
balance={Number(balance)} balance={Number(balance)}
zanoBalance={Number(zanoBalance)} letheanBalance={Number(letheanBalance)}
priceValid={orderForm.priceValid} priceValid={orderForm.priceValid}
amountValid={orderForm.amountValid} amountValid={orderForm.amountValid}
totalValid={orderForm.totalValid} totalValid={orderForm.totalValid}

View file

@ -19,7 +19,7 @@ const Maintenance = () => {
width={242} width={242}
height={48} height={48}
src={theme === 'dark' ? logoImg : logoImgWhite} src={theme === 'dark' ? logoImg : logoImgWhite}
alt="Zano P2P" alt="Lethean P2P"
/> />
<div className={styles.main__content}> <div className={styles.main__content}>
@ -33,13 +33,13 @@ const Maintenance = () => {
</p> </p>
<div className={styles.main__content_social}> <div className={styles.main__content_social}>
<Link target="_blank" href="https://discord.gg/zano"> <Link target="_blank" href="https://discord.gg/lethean">
<DisconrdIcon /> <DisconrdIcon />
</Link> </Link>
<Link target="_blank" href="https://twitter.com/zano_project"> <Link target="_blank" href="https://twitter.com/lethean_project">
<TwitterIcon /> <TwitterIcon />
</Link> </Link>
<Link target="_blank" href="https://t.me/zanocoin"> <Link target="_blank" href="https://t.me/letheancoin">
<TelegramIcon /> <TelegramIcon />
</Link> </Link>
</div> </div>

View file

@ -15,7 +15,7 @@ import MainPageTitle from '@/components/default/MainPageTitle/MainPageTitle';
import HomeProps from '@/interfaces/props/pages/p2p/HomeProps'; import HomeProps from '@/interfaces/props/pages/p2p/HomeProps';
import OfferData from '@/interfaces/responses/offers/OfferData'; import OfferData from '@/interfaces/responses/offers/OfferData';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import { Footer } from '@/zano_ui/src'; import { Footer } from '@/lethean_ui/src';
function Home(props: HomeProps) { function Home(props: HomeProps) {
const [offers, setOffers] = useState<OfferData[]>([]); const [offers, setOffers] = useState<OfferData[]>([]);

View file

@ -1,6 +1,6 @@
import styles from '@/styles/Process.module.scss'; import styles from '@/styles/Process.module.scss';
import Header from '@/components/default/Header/Header'; import Header from '@/components/default/Header/Header';
import { Footer } from '@/zano_ui/src'; import { Footer } from '@/lethean_ui/src';
import ProcessContent from './components/ProcessContent/ProcessContent'; import ProcessContent from './components/ProcessContent/ProcessContent';
function Process() { function Process() {

View file

@ -11,7 +11,7 @@ import CategoriesState from '@/interfaces/states/pages/p2p/profile/CategoriesSta
import FiltersState, { BuySell } from '@/interfaces/states/pages/p2p/profile/FiltersState'; import FiltersState, { BuySell } from '@/interfaces/states/pages/p2p/profile/FiltersState';
import { UserChatData } from '@/interfaces/responses/user/GetUserRes'; import { UserChatData } from '@/interfaces/responses/user/GetUserRes';
import OffersStateElement from '@/interfaces/states/pages/p2p/profile/OffersState'; import OffersStateElement from '@/interfaces/states/pages/p2p/profile/OffersState';
import { Footer } from '@/zano_ui/src'; import { Footer } from '@/lethean_ui/src';
import ProfileTable from './ProfileTable/ProfileTable'; import ProfileTable from './ProfileTable/ProfileTable';
function Profile() { function Profile() {

View file

@ -3,7 +3,7 @@ import Header from '@/components/default/Header/Header';
import Link from 'next/link'; import Link from 'next/link';
import PageTitle from '@/components/default/PageTitle/PageTitle'; import PageTitle from '@/components/default/PageTitle/PageTitle';
import { nanoid } from 'nanoid'; import { nanoid } from 'nanoid';
import { Footer } from '@/zano_ui/src'; import { Footer } from '@/lethean_ui/src';
function Policy() { function Policy() {
const contentList: string[] = Array(5).fill('Donec tellus felis, egestas ac tortor in;'); const contentList: string[] = Array(5).fill('Donec tellus felis, egestas ac tortor in;');

View file

@ -3,7 +3,7 @@ import Header from '@/components/default/Header/Header';
import MainPageTitle from '@/components/default/MainPageTitle/MainPageTitle'; import MainPageTitle from '@/components/default/MainPageTitle/MainPageTitle';
import HistoryIcon from '@/assets/images/UI/history_icon.svg'; import HistoryIcon from '@/assets/images/UI/history_icon.svg';
import ExchangeIcon from '@/assets/images/UI/change_icon.svg'; import ExchangeIcon from '@/assets/images/UI/change_icon.svg';
import zanoWhiteIcon from '@/assets/images/UI/zano_white.svg?url'; import letheanWhiteIcon from '@/assets/images/UI/lethean_white.svg?url';
import tickIcon from '@/assets/images/UI/tick_icon.svg?url'; import tickIcon from '@/assets/images/UI/tick_icon.svg?url';
import Link from 'next/link'; import Link from 'next/link';
import Button from '@/components/UI/Button/Button'; import Button from '@/components/UI/Button/Button';
@ -18,7 +18,7 @@ import CurvePairChart from '@/components/UI/CurvePairChart/CurvePairChart';
import SwapItemProps from '@/interfaces/props/pages/swap/SwapItemProps'; import SwapItemProps from '@/interfaces/props/pages/swap/SwapItemProps';
import CurrencyRow from '@/interfaces/common/CurrencyRow'; import CurrencyRow from '@/interfaces/common/CurrencyRow';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import { Footer } from '@/zano_ui/src'; import { Footer } from '@/lethean_ui/src';
function Swap() { function Swap() {
const { state } = useContext(Store); const { state } = useContext(Store);
@ -37,8 +37,9 @@ function Swap() {
useEffect(() => { useEffect(() => {
const allCurrencies = const allCurrencies =
state.config?.currencies?.filter((e) => e?.type === 'deposit' || e?.code === 'zano') || state.config?.currencies?.filter(
[]; (e) => e?.type === 'deposit' || e?.code === 'lethean',
) || [];
const currencies = getFormattedCurrencies(allCurrencies); const currencies = getFormattedCurrencies(allCurrencies);
@ -53,8 +54,8 @@ function Swap() {
const items = [ const items = [
{ {
name: 'Zano', name: 'Lethean',
code: 'ZANO', code: 'LTHN',
rate: '1.06', rate: '1.06',
coefficient: 4.6, coefficient: 4.6,
}, },
@ -79,7 +80,7 @@ function Swap() {
<div className={styles.swap__item}> <div className={styles.swap__item}>
<div> <div>
<div> <div>
<img src={zanoWhiteIcon} alt="currency"></img> <img src={letheanWhiteIcon} alt="currency"></img>
</div> </div>
<div className={styles.swap__item__description}> <div className={styles.swap__item__description}>
<h5>{item.name}</h5> <h5>{item.name}</h5>
@ -202,7 +203,7 @@ function Swap() {
<p> <p>
Fee: <span>0.01%</span> Fee: <span>0.01%</span>
</p> </p>
<p>0.5 ZANO</p> <p>0.5 LTHN</p>
</div> </div>
</div> </div>

View file

@ -1,11 +1,11 @@
import styles from '@/styles/User.module.scss'; import styles from '@/styles/User.module.scss';
import Header from '@/components/default/Header/Header'; import Header from '@/components/default/Header/Header';
import infoBlueIcon from '@/assets/images/UI/info_blue.svg?url'; import infoBlueIcon from '@/assets/images/UI/info_blue.svg?url';
import zanoIcon from '@/assets/images/UI/zano.svg?url'; import letheanIcon from '@/assets/images/UI/lethean.svg?url';
import Offers from '@/components/default/Offers/Offers'; import Offers from '@/components/default/Offers/Offers';
import BackButton from '@/components/default/BackButton/BackButton'; import BackButton from '@/components/default/BackButton/BackButton';
import { nanoid } from 'nanoid'; import { nanoid } from 'nanoid';
import { Footer } from '@/zano_ui/src'; import { Footer } from '@/lethean_ui/src';
function User() { function User() {
// const userInfo = { // const userInfo = {
@ -54,8 +54,8 @@ function User() {
available: '321.12', available: '321.12',
orders: '130', orders: '130',
completed: '90', completed: '90',
currency: 'Zano', currency: 'Lethean',
currencyIcon: zanoIcon, currencyIcon: letheanIcon,
}); });
const userSelling = Array(3).fill({ const userSelling = Array(3).fill({
@ -65,8 +65,8 @@ function User() {
available: '321.12', available: '321.12',
orders: '130', orders: '130',
completed: '90', completed: '90',
currency: 'Zano', currency: 'Lethean',
currencyIcon: zanoIcon, currencyIcon: letheanIcon,
}); });
function UserCharacteristic(props) { function UserCharacteristic(props) {

View file

@ -399,17 +399,17 @@ export async function getUserPendings() {
.then((res) => res.data); .then((res) => res.data);
} }
export async function getZanoPrice() { export async function getLetheanPrice() {
return axios return axios
.get( .get(
'https://explorer.zano.org/api/price?asset_id=d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a', 'https://explorer.lethean.org/api/price?asset_id=d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a',
) )
.then((res) => res.data); .then((res) => res.data);
} }
export async function getMatrixAddresses(addresses: string[]) { export async function getMatrixAddresses(addresses: string[]) {
try { try {
const { data } = await axios.post('https://messenger.zano.org/api/get-addresses', { const { data } = await axios.post('https://messenger.lethean.org/api/get-addresses', {
addresses, addresses,
}); });

View file

@ -196,10 +196,10 @@ export function countByKeyRecord<T>(
}, {}); }, {});
} }
export const ZANO_ASSET_ID = 'd6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a'; export const LTHN_ASSET_ID = 'd6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a';
const knownCurrencies = ['zano', 'xmr', 'btc', 'firo', 'usd', 'eur', 'cad', 'jpy']; const knownCurrencies = ['lethean', 'xmr', 'btc', 'firo', 'usd', 'eur', 'cad', 'jpy'];
const tradingKnownCurrencies = ['zano', 'weth', 'wbtc']; const tradingKnownCurrencies = ['lethean', 'weth', 'wbtc'];
export { tradingKnownCurrencies, knownCurrencies }; export { tradingKnownCurrencies, knownCurrencies };

View file

@ -1,12 +1,12 @@
import ZanoWindow from '@/interfaces/common/ZanoWindow'; import LtheanWindow from '@/interfaces/common/LtheanWindow';
import IonicSwap from '@/interfaces/wallet/IonicSwap'; import IonicSwap from '@/interfaces/wallet/IonicSwap';
async function ionicSwap(params: IonicSwap) { async function ionicSwap(params: IonicSwap) {
return (window as unknown as ZanoWindow).zano.request('IONIC_SWAP', params, null); return (window as unknown as LtheanWindow).lethean.request('IONIC_SWAP', params, null);
} }
async function confirmIonicSwap(hex_raw_proposal: string) { async function confirmIonicSwap(hex_raw_proposal: string) {
return (window as unknown as ZanoWindow).zano.request( return (window as unknown as LtheanWindow).lethean.request(
'IONIC_SWAP_ACCEPT', 'IONIC_SWAP_ACCEPT',
{ hex_raw_proposal }, { hex_raw_proposal },
null, null,

View file

@ -0,0 +1,9 @@
import React from 'react';
export function Footer({ className }: { className?: string }) {
return (
<footer style={{ padding: "20px", textAlign: "center", borderTop: "1px solid #333", marginTop: "auto", color: "#888", fontSize: "13px" }}>
Lethean Trade | <a href="https://lethean.io" style={{ color: "#00d4aa" }}>lethean.io</a>
</footer>
);
}

View file

@ -0,0 +1,6 @@
/* Lethean UI global styles stub */
:root {
--primary: #00d4aa;
--bg: #0a0a0a;
--text: #e0e0e0;
}

View file

@ -0,0 +1,4 @@
/* Lethean UI variables stub */
$primary: #00d4aa;
$bg: #0a0a0a;
$text: #e0e0e0;

View file

@ -2,8 +2,12 @@
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"@/*": ["./src/*"], "@/*": [
"@/zano_ui/*": ["./submodules/zano_ui/*"] "./src/*"
],
"@/lethean_ui/*": [
"./submodules/lethean_ui/*"
]
}, },
/* Visit https://aka.ms/tsconfig to read more about this file */ /* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */ /* Projects */
@ -90,13 +94,17 @@
/* Completeness */ /* Completeness */
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */, "skipLibCheck": true /* Skip type checking all .d.ts files. */,
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"noEmit": true, "noEmit": true,
"incremental": true, "incremental": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"jsx": "react-jsx" "jsx": "preserve"
}, },
"ts-node": { "ts-node": {
"esm": true, "esm": true,
@ -118,5 +126,7 @@
"src/pages/user/index.js", "src/pages/user/index.js",
"next.config.js" "next.config.js"
], ],
"exclude": ["node_modules"] "exclude": [
"node_modules"
]
} }