diff --git a/app/src/pagePartials/bridge/bridgeForm/index.tsx b/app/src/pagePartials/bridge/bridgeForm/index.tsx index ea26394d..f10acacd 100644 --- a/app/src/pagePartials/bridge/bridgeForm/index.tsx +++ b/app/src/pagePartials/bridge/bridgeForm/index.tsx @@ -48,6 +48,7 @@ import { UnifiedBridgeButton } from './button/UnifiedBridgeButton' import { useRouter } from 'next/router' import { useSanitizedQuery } from '@/src/hooks/useSanitizedQuery' import { isBlockedToken } from '@/src/utils/blockedTokens' +import { XdaiWarning } from './warnings/xDaiWarning' const Title = styled.h2` align-items: center; @@ -253,8 +254,14 @@ const Main = () => { ? true : false - console.log('tokenIn', formState.token) - console.log('tokenOut', tokenOut) + // console.log('tokenIn', formState.token) + // console.log('tokenOut', tokenOut) + + const isXdai = + (formState.fromChainId === Chains.mainnet && + isSameString(formState.token?.address || '', '0x6B175474E89094C44Da98b954EedeAC495271d0F')) || + (formState.fromChainId === Chains.gnosis && + isSameString(formState.token?.address || '', '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee')) return ( @@ -296,6 +303,7 @@ const Main = () => { Transfer to + {isXdai && } {isUsdcEth && } {isUsdceGC && } {unwrapFirst && } @@ -306,7 +314,7 @@ const Main = () => { )} - {!unwrapFirst && !sendToExternalBridge && !isNotBridgedErc20 && ( + {!unwrapFirst && !sendToExternalBridge && !isNotBridgedErc20 && !isXdai && ( <> @@ -341,7 +349,8 @@ const Main = () => { formState.token && tokenOut && address && - walletChainId == formState.fromChainId && ( + walletChainId == formState.fromChainId && + !isXdai && ( { /> )} - + {!isXdai && ( + + )} diff --git a/app/src/pagePartials/bridge/bridgeForm/warnings/xDaiWarning.tsx b/app/src/pagePartials/bridge/bridgeForm/warnings/xDaiWarning.tsx new file mode 100644 index 00000000..e8a497a1 --- /dev/null +++ b/app/src/pagePartials/bridge/bridgeForm/warnings/xDaiWarning.tsx @@ -0,0 +1,49 @@ +import styled from 'styled-components' +import { Warning } from '@/src/components/assets/Warning' +import React from 'react' + +const Contents = styled.div` + display: flex; + align-items: center; + gap: calc(var(--theme-common-space) * 2); + min-height: 80px; + + .warning { + color: ${({ theme: { colors } }) => colors.warning}; + } +` + +const Text = styled.span` + color: ${({ theme: { colors } }) => colors.textColor}; + font-size: 1.6rem; + line-height: 1.4; +` + +const Link = styled.a` + color: ${({ theme: { colors } }) => colors.textColor}; +` + +export const XdaiWarning: React.FC = () => { + return ( + + + + We are currently working on resolving the UI issues. +
+ Thank you for your patience. In the meantime, you can still interact directly with the smart + contract to relay DAI and xDAI via the xDAI Bridge. For the contract address, please refer + to{' '} + + documentation + {' '} + page +
+
+ ) +}