diff --git a/apps/connect/src/env/token-bridge.mainnet.ts b/apps/connect/src/env/token-bridge.mainnet.ts index fed6065e2..3a9cfcb81 100644 --- a/apps/connect/src/env/token-bridge.mainnet.ts +++ b/apps/connect/src/env/token-bridge.mainnet.ts @@ -10,7 +10,7 @@ import { Env, MAINNET_RPCS } from "./common"; export const ENV: Env = { ...ENV_BASE, wormholeConnectConfig: mergeDeep( - ENV_BASE.wormholeConnectConfig as WormholeConnectConfig, + ENV_BASE.wormholeConnectConfig, { rpcs: MAINNET_RPCS, moreNetworks: { diff --git a/apps/connect/src/env/token-bridge.ts b/apps/connect/src/env/token-bridge.ts index 8cbea89d3..720e30251 100644 --- a/apps/connect/src/env/token-bridge.ts +++ b/apps/connect/src/env/token-bridge.ts @@ -38,7 +38,7 @@ export const MORE = { export const ENV: Env = { PUBLIC_URL, navBar: [ - { label: "Home", active: true, href: `${PUBLIC_URL}/` }, + { label: "Bridge", active: true, href: `${PUBLIC_URL}/` }, { label: "Staking", href: "https://www.tally.xyz/gov/wormhole", diff --git a/apps/connect/src/env/usdc-bridge.mainnet.ts b/apps/connect/src/env/usdc-bridge.mainnet.ts index bcfe083ef..41fd8255d 100644 --- a/apps/connect/src/env/usdc-bridge.mainnet.ts +++ b/apps/connect/src/env/usdc-bridge.mainnet.ts @@ -6,7 +6,7 @@ import { Env, MAINNET_RPCS } from "./common"; export const ENV: Env = { ...ENV_BASE, wormholeConnectConfig: mergeDeep( - ENV_BASE.wormholeConnectConfig as WormholeConnectConfig, + ENV_BASE.wormholeConnectConfig, { rpcs: MAINNET_RPCS, chains: [ diff --git a/apps/connect/src/env/usdc-bridge.testnet.ts b/apps/connect/src/env/usdc-bridge.testnet.ts index 2366771bb..fffe62558 100644 --- a/apps/connect/src/env/usdc-bridge.testnet.ts +++ b/apps/connect/src/env/usdc-bridge.testnet.ts @@ -6,7 +6,7 @@ import { Env } from "./common"; export const ENV: Env = { ...ENV_BASE, wormholeConnectConfig: mergeDeep( - ENV_BASE.wormholeConnectConfig as WormholeConnectConfig, + ENV_BASE.wormholeConnectConfig, { chains: [ "Sepolia", diff --git a/apps/connect/src/env/usdc-bridge.ts b/apps/connect/src/env/usdc-bridge.ts index d0988899a..d945b8145 100644 --- a/apps/connect/src/env/usdc-bridge.ts +++ b/apps/connect/src/env/usdc-bridge.ts @@ -22,7 +22,7 @@ export const ENV: Env = { ], redirects: undefined, wormholeConnectConfig: { - ...(wormholeConnectConfigCommon as WormholeConnectConfig), + ...wormholeConnectConfigCommon, useRedesign: true, pageHeader: { text: "USDC Transfer", diff --git a/apps/connect/src/hooks/useConnectConfig.ts b/apps/connect/src/hooks/useConnectConfig.ts index b33d4db0b..0eea5a81c 100644 --- a/apps/connect/src/hooks/useConnectConfig.ts +++ b/apps/connect/src/hooks/useConnectConfig.ts @@ -17,7 +17,7 @@ import { validateTransfer } from "../utils/transferVerification"; import { getSortedChains } from "../utils/getSortedChains"; const defaultConfig: WormholeConnectConfig = { - ...(ENV.wormholeConnectConfig as WormholeConnectConfig), + ...ENV.wormholeConnectConfig, eventHandler: (e: WormholeConnectEvent) => { if (isPreview || isProduction) { // Send the event to Mixpanel @@ -70,7 +70,7 @@ export const useConnectConfig = () => { useEffect(() => { const controller = new AbortController(); getSortedChains( - (ENV.wormholeConnectConfig as WormholeConnectConfig).chains as Chain[], + ENV.wormholeConnectConfig.chains as Chain[], controller.signal ).then((chains) => !!chains && setNetworks(chains)); return () => controller.abort(); diff --git a/apps/connect/src/hooks/useFormatAssetParam.test.ts b/apps/connect/src/hooks/useFormatAssetParam.test.ts index 81c0d340d..4193bd518 100644 --- a/apps/connect/src/hooks/useFormatAssetParam.test.ts +++ b/apps/connect/src/hooks/useFormatAssetParam.test.ts @@ -8,7 +8,7 @@ describe("useFormatAssetParam", () => { }); it("should NOT get a formatted asset when key does NOT have an exact match", () => { - const { result } = renderHook(() => useFormatAssetParam("ETH")); + const { result } = renderHook(() => useFormatAssetParam("eth")); expect(result.current).toEqual("ETH"); }); diff --git a/apps/connect/src/hooks/useFormatAssetParam.ts b/apps/connect/src/hooks/useFormatAssetParam.ts index a33d331b4..a3829e70e 100644 --- a/apps/connect/src/hooks/useFormatAssetParam.ts +++ b/apps/connect/src/hooks/useFormatAssetParam.ts @@ -1,8 +1,7 @@ import { ENV } from "@env"; import { MAINNET, - TESTNET, - WormholeConnectConfig, + TESTNET } from "@wormhole-foundation/wormhole-connect"; import { useMemo } from "react"; @@ -11,7 +10,7 @@ const tokensList = function getFormatedAsset(asset: string | null): string | null { const allTokens = { ...tokensList, - ...(ENV.wormholeConnectConfig as WormholeConnectConfig)?.tokensConfig, + ...(ENV.wormholeConnectConfig?.tokensConfig), }; if (allTokens && asset) { const tokenParam = Object.values(allTokens).find((config) => diff --git a/apps/connect/src/hooks/useQueryParams.test.ts b/apps/connect/src/hooks/useQueryParams.test.ts index 83b6ff750..151893124 100644 --- a/apps/connect/src/hooks/useQueryParams.test.ts +++ b/apps/connect/src/hooks/useQueryParams.test.ts @@ -28,7 +28,7 @@ describe("useQueryParams", () => { it("should get QS when query contains all expected attrs after a hash #", () => { rewriteHref( - "https://portalbridge.com/#/?sourceChain=Bsc&targetChain=Arbitrum&requiredNetwork=Arbitrum&txHash=txHash&asset=asset&route=bridge" + "https://portalbridge.com/#/?sourceChain=bsc&targetChain=arbitrum&requiredNetwork=arbitrum&txHash=txHash&asset=asset&route=bridge" ); const { result } = renderHook(() => useQueryParams()); expect(result.current).toEqual({ @@ -43,7 +43,7 @@ describe("useQueryParams", () => { it("should get QS when query contains all expected attrs when there is no hash", () => { rewriteHref( - "https://portalbridge.com/?sourceChain=Bsc&targetChain=Arbitrum&requiredNetwork=Arbitrum&txHash=txHash&asset=asset&route=bridge" + "https://portalbridge.com/?sourceChain=bsc&targetChain=arbitrum&requiredNetwork=arbitrum&txHash=txHash&asset=asset&route=bridge" ); const { result } = renderHook(() => useQueryParams()); expect(result.current).toEqual({