diff --git a/src/utils/sdk.ts b/src/utils/sdk.ts index b8b26a1bd..b78c2aeec 100644 --- a/src/utils/sdk.ts +++ b/src/utils/sdk.ts @@ -13,6 +13,7 @@ export { getCurrentTime } from "@across-protocol/sdk/dist/esm/utils/TimeUtils"; export { isBridgedUsdc } from "@across-protocol/sdk/dist/esm/utils/TokenUtils"; export { BRIDGED_USDC_SYMBOLS } from "@across-protocol/sdk/dist/esm/constants"; export { getNativeTokenSymbol } from "@across-protocol/sdk/dist/esm/utils/NetworkUtils"; +export { compareAddressesSimple } from "@across-protocol/sdk/dist/esm/utils/AddressUtils"; export function getUpdateV3DepositTypedData( depositId: number, diff --git a/src/utils/url.ts b/src/utils/url.ts index 12fe07011..8f5653d89 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -3,17 +3,20 @@ export function getBridgeUrlWithQueryParams({ toChainId, inputTokenSymbol, outputTokenSymbol, + externalProjectId, }: { fromChainId: number; toChainId: number; inputTokenSymbol: string; outputTokenSymbol?: string; + externalProjectId?: string; }) { const cleanParams = Object.entries({ from: fromChainId.toString(), to: toChainId.toString(), inputToken: inputTokenSymbol, outputToken: outputTokenSymbol, + externalProjectId, }).reduce((acc, [key, value]) => { if (value) { return { ...acc, [key]: value }; diff --git a/src/views/Bridge/Bridge.tsx b/src/views/Bridge/Bridge.tsx index c6f3baa23..ebb325945 100644 --- a/src/views/Bridge/Bridge.tsx +++ b/src/views/Bridge/Bridge.tsx @@ -40,7 +40,6 @@ const Bridge = () => { handleSetNewSlippage, isQuoteLoading, } = useBridge(); - return ( <> {toAccount && ( diff --git a/src/views/Bridge/components/BridgeForm.tsx b/src/views/Bridge/components/BridgeForm.tsx index 45c518514..20064eb61 100644 --- a/src/views/Bridge/components/BridgeForm.tsx +++ b/src/views/Bridge/components/BridgeForm.tsx @@ -219,7 +219,7 @@ const BridgeForm = ({ /> - {toAccount && ( + {toAccount && selectedRoute.externalProjectId !== "hyper-liquid" && ( ( @@ -15,15 +16,19 @@ type DepositStatusAnimatedIconsParams = { status: DepositStatus; fromChainId: number; toChainId: number; + externalProjectId?: string; }; const DepositStatusAnimatedIcons = ({ status, fromChainId, toChainId, + externalProjectId, }: DepositStatusAnimatedIconsParams) => { const GrayscaleLogoFromChain = getChainInfo(fromChainId).grayscaleLogoSvg; - const GrayscaleLogoToChain = getChainInfo(toChainId).grayscaleLogoSvg; + const GrayscaleLogoToChain = externalProjectId + ? externConfigs[externalProjectId].grayscaleLogoSvg + : getChainInfo(toChainId).grayscaleLogoSvg; return ( <> diff --git a/src/views/DepositStatus/components/DepositStatusLowerCard.tsx b/src/views/DepositStatus/components/DepositStatusLowerCard.tsx index 6f3c3e8ac..aeccc8936 100644 --- a/src/views/DepositStatus/components/DepositStatusLowerCard.tsx +++ b/src/views/DepositStatus/components/DepositStatusLowerCard.tsx @@ -20,6 +20,7 @@ import { EarnByLpAndStakingCard } from "./EarnByLpAndStakingCard"; type Props = { fromChainId: number; toChainId: number; + externalProjectId?: string; inputTokenSymbol: string; outputTokenSymbol: string; fromBridgePagePayload?: FromBridgePagePayload; @@ -28,6 +29,7 @@ type Props = { export function DepositStatusLowerCard({ fromChainId, toChainId, + externalProjectId, inputTokenSymbol, outputTokenSymbol, fromBridgePagePayload, @@ -103,6 +105,7 @@ export function DepositStatusLowerCard({ toChainId, inputTokenSymbol: baseToken.symbol, outputTokenSymbol, + externalProjectId, }) ) } diff --git a/src/views/DepositStatus/components/DepositStatusUpperCard.tsx b/src/views/DepositStatus/components/DepositStatusUpperCard.tsx index b9c1e40b9..e7ad8ad71 100644 --- a/src/views/DepositStatus/components/DepositStatusUpperCard.tsx +++ b/src/views/DepositStatus/components/DepositStatusUpperCard.tsx @@ -22,6 +22,7 @@ type Props = { depositTxHash: string; fromChainId: number; toChainId: number; + externalProjectId?: string; inputTokenSymbol: string; outputTokenSymbol?: string; fromBridgePagePayload?: FromBridgePagePayload; @@ -31,9 +32,10 @@ export function DepositStatusUpperCard({ depositTxHash, fromChainId, toChainId, - fromBridgePagePayload, + externalProjectId, inputTokenSymbol, outputTokenSymbol, + fromBridgePagePayload, }: Props) { const { depositQuery, fillQuery } = useDepositTracking( depositTxHash, @@ -94,6 +96,7 @@ export function DepositStatusUpperCard({ status={status} toChainId={toChainId} fromChainId={fromChainId} + externalProjectId={externalProjectId} /> {status === "filled" ? (