diff --git a/env.d.ts b/env.d.ts index 5f31f642..cd066f8a 100644 --- a/env.d.ts +++ b/env.d.ts @@ -17,6 +17,7 @@ declare namespace NodeJS { readonly SKIP_API_KEY?: string; readonly ALLOWED_LIST_EDGE_CONFIG?: string; readonly NEXT_PUBLIC_COSMOS_DOMAIN?: string; + readonly NEXT_PUBLIC_SHOW_LEDGER_MAINNET?: string; } } diff --git a/src/components/pages/cosmos.tsx b/src/components/pages/cosmos.tsx index 0c5e0832..960ec564 100644 --- a/src/components/pages/cosmos.tsx +++ b/src/components/pages/cosmos.tsx @@ -19,6 +19,8 @@ export function CosmosPage() { const theme = useTheme(); const [queryParamsString, setQueryParamsString] = useState(); + const showLedgerMainnet = process.env.NEXT_PUBLIC_SHOW_LEDGER_MAINNET === "true"; + const onClickedShareButton = () => { if (queryParamsString) { navigator.clipboard.writeText(`${window.location.origin}?${queryParamsString}`); @@ -118,6 +120,16 @@ export function CosmosPage() { settings={{ useUnlimitedApproval: true, }} + filterOut={{ + source: { + ...(showLedgerMainnet ? {} : { "ledger-mainnet-1": undefined }), + }, + destination: { + "pacific-1": ["ibc/6C00E4AA0CC7618370F81F7378638AE6C48EFF8C9203CE1C2357012B440EBDB7"], + "1329": ["0xB75D0B03c06A926e488e2659DF1A861F860bD3d1"], + ...(showLedgerMainnet ? {} : { "ledger-mainnet-1": undefined }), + }, + }} disableShadowDom ibcEurekaHighlightedAssets={process.env.NEXT_PUBLIC_IBC_EUREKA_ASSETS?.split(",")} assetSymbolsSortedToTop={process.env.NEXT_PUBLIC_ASSET_SYMBOLS_SORTED_TO_TOP?.split(",")} diff --git a/src/components/pages/skip.tsx b/src/components/pages/skip.tsx index d396cb0f..ddb2e47e 100644 --- a/src/components/pages/skip.tsx +++ b/src/components/pages/skip.tsx @@ -18,6 +18,8 @@ export function SkipPage() { const theme = useTheme(); const [queryParamsString, setQueryParamsString] = useState(); + const showLedgerMainnet = process.env.NEXT_PUBLIC_SHOW_LEDGER_MAINNET === "true"; + const onClickedShareButton = () => { if (queryParamsString) { navigator.clipboard.writeText(`${window.location.origin}?${queryParamsString}`); @@ -93,9 +95,13 @@ export function SkipPage() { useUnlimitedApproval: true, }} filterOut={{ + source: { + ...(showLedgerMainnet ? {} : { "ledger-mainnet-1": undefined }), + }, destination: { "pacific-1": ["ibc/6C00E4AA0CC7618370F81F7378638AE6C48EFF8C9203CE1C2357012B440EBDB7"], "1329": ["0xB75D0B03c06A926e488e2659DF1A861F860bD3d1"], + ...(showLedgerMainnet ? {} : { "ledger-mainnet-1": undefined }), }, }} />