Skip to content
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
17 changes: 17 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<claude-mem-context>
# Memory Context

# [terminal] recent context, 2026-04-30 1:58pm EDT

Legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖️decision
Format: ID TIME TYPE TITLE
Fetch details: get_observations([IDs]) | Search: mem-search skill

Stats: 2 obs (810t read) | 25,698t work | 97% savings

### Apr 30, 2026
37 1:56p 🔵 TradingView volume indicator feature flags already present in constants
38 1:57p 🔵 Volume indicator intentionally disabled in TradingView chart via CHART_DISABLED_FEATURES

Access 26k tokens of past work via get_observations([IDs]) or mem-search skill.
</claude-mem-context>
1 change: 1 addition & 0 deletions src/components/trade/chart/datafeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export function createDatafeed(): IBasicDataFeed {
minmov: CHART_DATAFEED_CONFIG.MIN_MOVEMENT,
has_intraday: true,
supported_resolutions: SUPPORTED_RESOLUTIONS,
visible_plots_set: "ohlcv",
volume_precision: CHART_DATAFEED_CONFIG.VOLUME_PRECISION,
data_status: CHART_DATAFEED_CONFIG.DATA_STATUS,
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/trade/chart/token-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const marketScopes: { value: MarketScope; label: string }[] = [
{ value: "all", label: "All" },
{ value: "perp", label: "Perp" },
{ value: "spot", label: "Spot" },
{ value: "hip3", label: "HIP-3" },
{ value: "hip3", label: "TradFi" },
];

function getSzDecimals(market: MarketRow): number {
Expand Down
10 changes: 10 additions & 0 deletions src/components/trade/chart/tradingview-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
import { createDatafeed } from "./datafeed";
import { buildChartOverrides, generateChartCssUrl, getLoadingScreenColors, getToolbarBgColor } from "./theme-colors";

const VOLUME_STUDY_NAME = "Volume";

interface Props {
symbol?: string;
interval?: string;
Expand Down Expand Up @@ -86,6 +88,14 @@ export function TradingViewChart({

widgetRef.current.onChartReady(() => {
chartReadyRef.current = true;

const chart = widgetRef.current?.activeChart();
if (!chart) return;

const hasVolumeStudy = chart.getAllStudies().some((study) => study.name === VOLUME_STUDY_NAME);
if (!hasVolumeStudy) {
void chart.createStudy(VOLUME_STUDY_NAME, false, false, undefined, undefined, { disableUndo: true });
}
});
} catch (error) {
console.error("Error initializing TradingView widget:", error);
Expand Down
4 changes: 2 additions & 2 deletions src/components/trade/components/global-modals.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Suspense } from "react";
import { createLazyComponent } from "@/lib/lazy";

const DepositModal = createLazyComponent(() => import("../tradebox/deposit-modal"), "DepositModal");
// const DepositModal = createLazyComponent(() => import("../tradebox/deposit-modal"), "DepositModal");
Comment thread
priom marked this conversation as resolved.
const FaucetModal = createLazyComponent(() => import("../tradebox/faucet-modal"), "FaucetModal");
const GlobalSettingsDialog = createLazyComponent(() => import("./global-settings-dialog"), "GlobalSettingsDialog");
const SpotSwapModal = createLazyComponent(() => import("./spot-swap-modal"), "SpotSwapModal");
Expand All @@ -12,7 +12,7 @@ const AcrossBridgeModal = createLazyComponent(() => import("../tradebox/across-b
export function GlobalModals() {
return (
<Suspense fallback={null}>
<DepositModal />
{/* <DepositModal /> */}
<FaucetModal />
<GlobalSettingsDialog />
<SpotSwapModal />
Expand Down
10 changes: 4 additions & 6 deletions src/components/trade/header/top-nav.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
import { ArrowsLeftRightIcon, DownloadSimpleIcon, DropIcon, GearIcon, TrophyIcon } from "@phosphor-icons/react";
import { ArrowsLeftRightIcon, DropIcon, GearIcon, TrophyIcon } from "@phosphor-icons/react";
import { useConnection } from "wagmi";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/cn";
import { useExchangeScope } from "@/providers/exchange-scope";
import {
useAcrossBridgeModalActions,
useDepositModalActions,
useFaucetModalActions,
usePointsModalActions,
useSettingsDialogActions,
Expand All @@ -32,7 +31,6 @@ function getScopeAccentClass(scope: string): string {
}

export function TopNav() {
const { open: openDepositModal } = useDepositModalActions();
const { open: openFaucetModal } = useFaucetModalActions();
const { open: openPointsModal } = usePointsModalActions();
const { open: openSettingsDialog } = useSettingsDialogActions();
Expand Down Expand Up @@ -81,7 +79,7 @@ export function TopNav() {
<Trans>Faucet</Trans>
</Button>
)}
{!isTestnet && (
{/* {!isTestnet && (
<Button
variant="outlined"
onClick={() => openDepositModal("deposit")}
Expand All @@ -90,15 +88,15 @@ export function TopNav() {
<DownloadSimpleIcon className="size-4" />
<Trans>Deposit</Trans>
</Button>
)}
)} */}
{!isTestnet && (
<Button
variant="outlined"
onClick={openAcrossBridge}
className="h-6 px-2 text-xs font-medium rounded-xs bg-fill-100 border border-border-300 text-text-950 hover:border-border-500 transition-colors inline-flex items-center gap-1 shadow-xs"
>
<ArrowsLeftRightIcon className="size-4" />
<Trans>Bridge</Trans>
<Trans>Deposit</Trans>
</Button>
)}
</>
Expand Down
2 changes: 1 addition & 1 deletion src/components/trade/header/user-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function UserMenu() {
return (
<Button size="md" variant="outlined" onClick={() => !authenticated && login()}>
<WalletIcon className="size-4" />
<Trans>Connect Wallet</Trans>
<Trans>Login</Trans>
</Button>
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/trade/mobile/mobile-account-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function MobileAccountView({ className }: MobileAccountViewProps) {
<WalletIcon className="size-10 text-text-600" />
</div>
<div className="text-center space-y-2">
<h2 className="text-lg font-semibold">Connect Wallet</h2>
<h2 className="text-lg font-semibold">Login</h2>
<p className="text-sm text-text-600 max-w-xs">
Connect your wallet to view your account, positions, and start trading.
</p>
Expand All @@ -99,7 +99,7 @@ export function MobileAccountView({ className }: MobileAccountViewProps) {
"min-h-[48px]",
)}
>
Connect Wallet
Login
</Button>
</div>
<MobileBottomNavSpacer />
Expand Down Expand Up @@ -145,7 +145,7 @@ export function MobileAccountView({ className }: MobileAccountViewProps) {
"transition-colors rounded-xs hover:bg-transparent",
"min-h-[44px] min-w-[44px] flex items-center justify-center",
)}
aria-label="Disconnect wallet"
aria-label="Logout"
>
<SignOutIcon className="size-5" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/trade/tradebox/account-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export function AccountPanel() {
</TabsList>

{!isConnected ? (
<div className="text-2xs text-text-600 text-center py-4">{t`Connect wallet to view account`}</div>
<div className="text-2xs text-text-600 text-center py-4">{t`Login to view account`}</div>
) : (
<div className="p-2 overflow-y-auto">
<TabsContentGroup>
Expand Down
6 changes: 4 additions & 2 deletions src/components/trade/tradebox/across-bridge-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useEffect, useMemo, useState } from "react";
import type { Address } from "viem";
import { formatUnits, parseUnits } from "viem";
import { useConnection } from "wagmi";
import { arbitrum, base, mainnet } from "wagmi/chains";
import { arbitrum, base, mainnet, polygon } from "wagmi/chains";
import { Button } from "@/components/ui/button";
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog";
import { InfoRow, InfoRowGroup } from "@/components/ui/info-row";
Expand All @@ -28,9 +28,11 @@ const COUNTERFACTUAL_CHAINS = [
{ id: mainnet.id, name: "Ethereum", shortName: "ETH" },
{ id: arbitrum.id, name: "Arbitrum", shortName: "ARB" },
{ id: base.id, name: "Base", shortName: "BASE" },
{ id: polygon.id, name: "Polygon", shortName: "POLY" },
] as const;

const POPULAR_SYMBOLS = new Set(["USDC", "USDT", "USDT0", "ETH", "WETH", "WBTC", "DAI", "cbBTC"]);
// const POPULAR_SYMBOLS = new Set(["USDC", "USDT", "USDT0", "ETH", "WETH", "WBTC", "DAI", "cbBTC"]);
const POPULAR_SYMBOLS = new Set(["USDT", "USDT0"]);
Comment thread
priom marked this conversation as resolved.

const INTEGRATOR_ID = (import.meta.env.VITE_ACROSS_INTEGRATOR_ID ?? "0xdead") as `0x${string}`;
const ACROSS_API_KEY = import.meta.env.VITE_ACROSS_API_KEY as string | undefined;
Expand Down
13 changes: 6 additions & 7 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export const TWAP_MINUTES_MAX = 1440;
export const SCALE_LEVELS_MIN = 2;
export const SCALE_LEVELS_MAX = 20;

export const DEFAULT_MAX_LEVERAGE = 50;
export const DEFAULT_MAX_LEVERAGE = 5;
Comment thread
priom marked this conversation as resolved.
export const MARKET_LEVERAGE_HARD_MAX = 100;
export const DEFAULT_MARKET_ORDER_SLIPPAGE_PERCENT = 2.5;
export const DEFAULT_MARKET_ORDER_SLIPPAGE_PERCENT = 1.0;
export const MARKET_ORDER_SLIPPAGE_MIN_PERCENT = 0.1;
export const MARKET_ORDER_SLIPPAGE_MAX_PERCENT = 100;
export const DEFAULT_LEVERAGE_BY_MODE = { cross: 10, isolated: 10 } as const;
Expand Down Expand Up @@ -186,7 +186,6 @@ export const CHART_DISABLED_FEATURES = [
"display_market_status",
"popup_hints",
"header_saveload",
"create_volume_indicator_by_default",
"volume_force_overlay",
"show_logo_on_all_charts",
"caption_buttons_text_if_possible",
Expand Down Expand Up @@ -282,7 +281,7 @@ export const UI_TEXT = {
USER_MENU: {
COPY_ADDRESS: "Copy Address",
CONNECTING: "Connecting...",
CONNECT_WALLET: "Connect Wallet",
CONNECT_WALLET: "Login",
ADD_FUNDS: "Add funds",
DISCONNECT: "Disconnect",
},
Expand Down Expand Up @@ -367,7 +366,7 @@ export const UI_TEXT = {
PNL_LABEL: "PNL",
TAB_PERPS: "Perps",
TAB_SPOT: "Spot",
CONNECT: "Connect wallet to view account",
CONNECT: "Login to view account",
LOADING: "Loading...",
BALANCE_LABEL: "Balance",
UNREALIZED_LABEL: "Unrealized PNL",
Expand Down Expand Up @@ -507,7 +506,7 @@ export const UI_TEXT = {
HELP_TEXT: "Bridge USDC from Arbitrum or other chains to your Hyperliquid account.",
},
WALLET_DIALOG: {
TITLE: "Connect Wallet",
TITLE: "Login",
EMPTY: "No wallets found",
},
ORDER_ENTRY: {
Expand All @@ -522,7 +521,7 @@ export const UI_TEXT = {
ERROR_SIZE: "Enter size",
ERROR_MIN_NOTIONAL: "Min order value $10",
ERROR_EXCEEDS_MAX: "Exceeds max size",
BUTTON_CONNECT: "Connect Wallet",
BUTTON_CONNECT: "Login",
BUTTON_SWITCHING: "Switching...",
BUTTON_SWITCH_CHAIN: "Switch to Arbitrum",
BUTTON_DEPOSIT: "Deposit",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/trade/use-button-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function useButtonContent(input: ButtonContentInput): ButtonContent {
return useMemo<ButtonContent>(() => {
if (!input.isConnected) {
return {
text: t`Connect Wallet`,
text: t`Login`,
action: input.onConnectWallet,
disabled: false,
variant: "cyan",
Expand Down
22 changes: 11 additions & 11 deletions src/locales/ar/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ msgstr "الرصيد"
#~ msgstr "مسار التنقل"

#: src/components/trade/header/top-nav.tsx
msgid "Bridge"
msgstr ""
#~ msgid "Bridge"
#~ msgstr ""

#: src/components/trade/order-entry/deposit-modal.tsx
#~ msgid "Bridge USDC from Arbitrum or other chains to your Hyperliquid account."
Expand Down Expand Up @@ -373,15 +373,6 @@ msgstr ""
#~ msgid "Connect a wallet to manage positions."
#~ msgstr "قم بتوصيل المحفظة لإدارة المراكز."

#: src/components/trade/header/user-menu.tsx
#: src/lib/trade/use-button-content.ts
msgid "Connect Wallet"
msgstr "ربط المحفظة"

#: src/components/trade/tradebox/account-panel.tsx
msgid "Connect wallet to view account"
msgstr "اربط المحفظة لعرض الحساب"

#: src/components/trade/tradebox/faucet-modal.tsx
msgid "Connect your wallet to claim USDH"
msgstr ""
Expand Down Expand Up @@ -1047,6 +1038,15 @@ msgstr "جاري تحميل المحفظة..."
msgid "Loading..."
msgstr "جارٍ التحميل..."

#: src/components/trade/header/user-menu.tsx
#: src/lib/trade/use-button-content.ts
msgid "Login"
msgstr "ربط المحفظة"

#: src/components/trade/tradebox/account-panel.tsx
msgid "Login to view account"
msgstr "اربط المحفظة لعرض الحساب"

#: src/components/trade/positions/position-limit-close-modal.tsx
#: src/components/trade/positions/position-tpsl-modal.tsx
#: src/components/trade/positions/positions-tab.tsx
Expand Down
22 changes: 11 additions & 11 deletions src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ msgstr "Balance"
#~ msgstr "Breadcrumb"

#: src/components/trade/header/top-nav.tsx
msgid "Bridge"
msgstr "Bridge"
#~ msgid "Bridge"
#~ msgstr "Bridge"

#: src/components/trade/order-entry/deposit-modal.tsx
#~ msgid "Bridge USDC from Arbitrum or other chains to your Hyperliquid account."
Expand Down Expand Up @@ -374,15 +374,6 @@ msgstr "Confirm in wallet"
#~ msgid "Connect a wallet to manage positions."
#~ msgstr "Connect a wallet to manage positions."

#: src/components/trade/header/user-menu.tsx
#: src/lib/trade/use-button-content.ts
msgid "Connect Wallet"
msgstr "Connect Wallet"

#: src/components/trade/tradebox/account-panel.tsx
msgid "Connect wallet to view account"
msgstr "Connect wallet to view account"

#: src/components/trade/tradebox/faucet-modal.tsx
msgid "Connect your wallet to claim USDH"
msgstr "Connect your wallet to claim USDH"
Expand Down Expand Up @@ -1053,6 +1044,15 @@ msgstr "Loading wallet..."
msgid "Loading..."
msgstr "Loading..."

#: src/components/trade/header/user-menu.tsx
#: src/lib/trade/use-button-content.ts
msgid "Login"
msgstr "Login"

#: src/components/trade/tradebox/account-panel.tsx
msgid "Login to view account"
msgstr "Login to view account"

#: src/components/trade/positions/position-limit-close-modal.tsx
#: src/components/trade/positions/position-tpsl-modal.tsx
#: src/components/trade/positions/positions-tab.tsx
Expand Down
22 changes: 11 additions & 11 deletions src/locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ msgstr "Saldo"
#~ msgstr "Ruta de navegación"

#: src/components/trade/header/top-nav.tsx
msgid "Bridge"
msgstr ""
#~ msgid "Bridge"
#~ msgstr ""

#: src/components/trade/order-entry/deposit-modal.tsx
#~ msgid "Bridge USDC from Arbitrum or other chains to your Hyperliquid account."
Expand Down Expand Up @@ -373,15 +373,6 @@ msgstr ""
#~ msgid "Connect a wallet to manage positions."
#~ msgstr "Conecta una billetera para gestionar posiciones."

#: src/components/trade/header/user-menu.tsx
#: src/lib/trade/use-button-content.ts
msgid "Connect Wallet"
msgstr "Conectar billetera"

#: src/components/trade/tradebox/account-panel.tsx
msgid "Connect wallet to view account"
msgstr "Conecta billetera para ver cuenta"

#: src/components/trade/tradebox/faucet-modal.tsx
msgid "Connect your wallet to claim USDH"
msgstr ""
Expand Down Expand Up @@ -1047,6 +1038,15 @@ msgstr "Cargando billetera..."
msgid "Loading..."
msgstr "Cargando..."

#: src/components/trade/header/user-menu.tsx
#: src/lib/trade/use-button-content.ts
msgid "Login"
msgstr "Conectar billetera"

#: src/components/trade/tradebox/account-panel.tsx
msgid "Login to view account"
msgstr "Conecta billetera para ver cuenta"

#: src/components/trade/positions/position-limit-close-modal.tsx
#: src/components/trade/positions/position-tpsl-modal.tsx
#: src/components/trade/positions/positions-tab.tsx
Expand Down
Loading
Loading