Skip to content

Commit

Permalink
merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
vihsonic committed Dec 12, 2024
2 parents 0f1f7c9 + 3534152 commit f06120f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
7 changes: 6 additions & 1 deletion src/app/BridgeSwap/ApproveToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,24 @@ import CustomTooltip, {
CustomTooltipWithQuestion,
} from "@/components/tooltip/CustomTooltip";
import QuestionIcon from "assets/icons/question.svg";
import { useInOutNetwork } from "@/hooks/network";
import { BRIDGE_VERSION } from "@/staging/constants/legacyTitan";
import { LegacyTitanBridgeVersionEnum } from "@/staging/types/legacyTitan";

export default function ApproveToken() {
const { inToken } = useInOutTokens();
const { isApproved, callApprove, isLoading, isRevokeForUSDT } = useApprove();
const { isNotSupportForBridge } = useBridgeSupport();
const { isTONatPair } = useIsTon();
const { mode } = useGetMode();
const { inNetwork, outNetwork } = useInOutNetwork();
const { isConnected } = useAccount();
const { isBalanceOver, isInputZero } = useInputBalanceCheck();
const { confirmedApproveTransaction, confirmedRevokeTransaction } =
useTransaction();
const [, setIsDrawerOpen] = useRecoilState(accountDrawerStatus);

const isL2 = inNetwork?.layer === "L2" || outNetwork?.layer === "L2";
if (isL2 && BRIDGE_VERSION === LegacyTitanBridgeVersionEnum.V10) return null;
if (
(isApproved ||
isNotSupportForBridge ||
Expand Down
6 changes: 5 additions & 1 deletion src/app/BridgeSwap/TransactionDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import { useAccount } from "wagmi";
import useMediaView from "@/hooks/mediaView/useMediaView";
import useIsTon from "@/hooks/token/useIsTon";
import { useGetMarketPrice } from "@/hooks/price/useGetMarketPrice";
import { LegacyTitanBridgeVersionEnum } from "@/staging/types/legacyTitan";
import { BRIDGE_VERSION } from "@/staging/constants/legacyTitan";

const DivisionLine = () => {
return <Box w={"100%"} h={"1px"} bgColor={"#2E313A"} my={"14px"}></Box>;
Expand Down Expand Up @@ -584,6 +586,8 @@ export default function TransactionDetail(props: {
isOnConfirm?: boolean;
isMobile?: boolean;
}) {
const { inNetwork, outNetwork } = useInOutNetwork();
const isL2 = inNetwork?.layer === "L2" || outNetwork?.layer === "L2";
const { isOnConfirm, isMobile } = props;
const { isOpen } = useConfirm();

Expand All @@ -607,7 +611,7 @@ export default function TransactionDetail(props: {
mode === "Unwrap" ||
mode === "ETH-Wrap" ||
mode === "ETH-Unwrap";

if (isL2 && BRIDGE_VERSION === LegacyTitanBridgeVersionEnum.V10) return null;
if (
!isReady ||
isNotSupportForSwap ||
Expand Down
4 changes: 2 additions & 2 deletions src/types/token/supportedToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export const supportedTokens: SupportedTokens_T = [
tokenSymbol: "ETH",
address: {
MAINNET: "",
TITAN: TOKAMAK_CONTRACTS.WETH_ADDRESS,
TITAN: TOKAMAK_CONTRACTS.OVM_ETH,
SEPOLIA: "",
THANOS_SEPOLIA: THANOS_SEPOLIA_CONTRACTS.ETH_ADDRESS,
TITAN_SEPOLIA: TITAN_SEPOLIA_CONTRACTS.WETH_ADDRESS,
TITAN_SEPOLIA: TITAN_SEPOLIA_CONTRACTS.OVM_ETH,
},
decimals: 18,
isNativeCurrency: [
Expand Down

0 comments on commit f06120f

Please sign in to comment.