diff --git a/apps/api/src/api/services/quote/core/squidrouter.ts b/apps/api/src/api/services/quote/core/squidrouter.ts index e6864782a..a9a6c98ea 100644 --- a/apps/api/src/api/services/quote/core/squidrouter.ts +++ b/apps/api/src/api/services/quote/core/squidrouter.ts @@ -64,8 +64,6 @@ export function getTokenDetailsForEvmDestination( }); } - console.log("Getting token details for:", finalOutputCurrency, "on network:", network); - const tokenDetails = getOnChainTokenDetails(network, finalOutputCurrency); if (!tokenDetails || !isEvmTokenDetails(tokenDetails)) { diff --git a/apps/frontend/package.json b/apps/frontend/package.json index 8786af498..fb638b03d 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -57,7 +57,6 @@ "react-hook-form": "^7.65.0", "react-i18next": "^15.4.1", "react-toastify": "^11.0.5", - "react-window": "^2.2.5", "stellar-sdk": "catalog:", "tailwind-merge": "^3.1.0", "tailwindcss": "^4.0.3", diff --git a/apps/frontend/src/constants/animations.ts b/apps/frontend/src/constants/animations.ts index 6fa3ee6fa..13110157b 100644 --- a/apps/frontend/src/constants/animations.ts +++ b/apps/frontend/src/constants/animations.ts @@ -16,8 +16,8 @@ export const easings = { * Duration guidelines for different interaction types */ export const durations = { - micro: 0.1, // 100ms - micro-interactions (hover states) fast: 0.15, // 150ms - tooltips, dropdowns + micro: 0.1, // 100ms - micro-interactions (hover states) normal: 0.2, // 200ms - standard UI animations slow: 0.3 // 300ms - modals, drawers, complex transitions }; diff --git a/apps/frontend/src/hooks/useOnchainTokenBalances.ts b/apps/frontend/src/hooks/useOnchainTokenBalances.ts index 4a5caeb4c..82ac0895f 100644 --- a/apps/frontend/src/hooks/useOnchainTokenBalances.ts +++ b/apps/frontend/src/hooks/useOnchainTokenBalances.ts @@ -17,19 +17,17 @@ import { } from "@vortexfi/shared"; import Big from "big.js"; import { useEffect, useMemo, useState } from "react"; -import { Abi, hexToBigInt } from "viem"; - -// Global cache to persist balances across hook instances and app lifecycle -const globalBalanceCache = new Map>(); - -import { useBalance, useReadContracts } from "wagmi"; +import { hexToBigInt } from "viem"; +import { useBalance } from "wagmi"; import { useNetwork } from "../contexts/network"; import { useAssetHubNode } from "../contexts/polkadotNode"; -import erc20ABI from "../contracts/ERC20"; import { multiplyByPowerOfTen } from "../helpers/contracts"; import { getEvmTokensForNetwork } from "../services/tokens"; import { useVortexAccount } from "./useVortexAccount"; +// Global cache to persist balances across hook instances and app lifecycle +const globalBalanceCache = new Map>(); + interface AlchemyTokenBalancesResponse { data: { tokens: { diff --git a/apps/frontend/src/hooks/useOnchainTokenBalancesSorted.ts b/apps/frontend/src/hooks/useOnchainTokenBalancesSorted.ts index f1ef30b2e..fe56047eb 100644 --- a/apps/frontend/src/hooks/useOnchainTokenBalancesSorted.ts +++ b/apps/frontend/src/hooks/useOnchainTokenBalancesSorted.ts @@ -16,7 +16,8 @@ export const useOnchainTokenBalancesSorted = (tokens: OnChainTokenDetails[]): On return bBalance - aBalance; } - return 1; + // Tie-breaker: sort by symbol alphabetically + return a.assetSymbol.localeCompare(b.assetSymbol); }); }, [tokenBalances]); }; diff --git a/package.json b/package.json index 0dcb61f92..8619a5ed5 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,7 @@ "dependencies": { "big.js": "^7.0.1", "husky": "^9.1.7", - "lint-staged": "^16.1.0", - "react-window": "^2.2.5" + "lint-staged": "^16.1.0" }, "devDependencies": { "@biomejs/biome": "2.0.0", diff --git a/packages/shared/.prettierignore b/packages/shared/.prettierignore index f4334f75d..3ae3156e4 100644 --- a/packages/shared/.prettierignore +++ b/packages/shared/.prettierignore @@ -1 +1 @@ -./packages/shared/src/tokens/index.ts \ No newline at end of file +src/tokens/index.ts \ No newline at end of file diff --git a/packages/shared/src/tokens/index.ts b/packages/shared/src/tokens/index.ts index 16bf03971..9e69bc526 100644 --- a/packages/shared/src/tokens/index.ts +++ b/packages/shared/src/tokens/index.ts @@ -8,8 +8,6 @@ export * from "./constants/misc"; // Constants // Configurations export * from "./evm/config"; -// Dynamic tokens - must be exported AFTER all dependencies (config, pendulum/config, etc.) -export * from "./evm/dynamicEvmTokens"; export * from "./moonbeam/config"; export * from "./pendulum/config"; export * from "./stellar/config"; @@ -26,3 +24,6 @@ export * from "./utils/helpers"; export * from "./utils/normalization"; // Utils export * from "./utils/typeGuards"; +// Dynamic tokens - must be exported AFTER all dependencies (config, pendulum/config, etc.) +export * from "./evm/dynamicEvmTokens"; +/* prettier-ignore-end */ diff --git a/packages/shared/src/tokens/types/evm.ts b/packages/shared/src/tokens/types/evm.ts index 0d0a69b30..7dea695f5 100644 --- a/packages/shared/src/tokens/types/evm.ts +++ b/packages/shared/src/tokens/types/evm.ts @@ -39,5 +39,5 @@ export interface EvmTokenDetails extends BaseTokenDetails { export interface EvmTokenDetailsWithBalance extends EvmTokenDetails { balance: string; - balanceUsd?: string; + balanceUsd: string; } diff --git a/packages/shared/src/tokens/utils/helpers.ts b/packages/shared/src/tokens/utils/helpers.ts index abd74f320..14ca9fa9e 100644 --- a/packages/shared/src/tokens/utils/helpers.ts +++ b/packages/shared/src/tokens/utils/helpers.ts @@ -10,7 +10,7 @@ import { getEvmTokenConfig } from "../evm/dynamicEvmTokens"; import { moonbeamTokenConfig } from "../moonbeam/config"; import { stellarTokenConfig } from "../stellar/config"; import { AssetHubToken, FiatToken, OnChainToken, RampCurrency } from "../types/base"; -import { EvmToken, EvmTokenDetails } from "../types/evm"; +import { EvmTokenDetails } from "../types/evm"; import { MoonbeamTokenDetails } from "../types/moonbeam"; import { PendulumTokenDetails } from "../types/pendulum"; import { StellarTokenDetails } from "../types/stellar";