Skip to content

Commit

Permalink
fix(xswap modal to widget): moved from xswap deprecated modal to widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Torof committed Nov 8, 2024
1 parent 4a8c07e commit 126bca6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 113 deletions.
5 changes: 2 additions & 3 deletions src/app/app/[tab]/AppTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui";
import { SwitchAppTabProvider } from "@/contexts/SwitchAppTabContext";
import { useSwitchAppTab } from "@/hooks/useSwitchAppTab";
import { FC } from "react";
import { twMerge } from "tailwind-merge";
import { AppPreMining } from "@/components/app/pre-mining/AppPreMining";
import { SessionProvider } from "next-auth/react";
import { AppStaking } from "@/components/app/staking/AppStaking";
import { XPayButton } from "@/components/app/xswap/XswapModal";
import { XSwapWidget } from "@/components/app/xswap/XswapWidget";
import Link from "next/link";
import { AppAffiliate } from "@/components/app/affiliate/AppAffiliate";
import { AppSwap } from "@/components/app/swap/AppSwap";
Expand Down Expand Up @@ -66,7 +65,7 @@ const _AppTabs: FC = () => {
<TabsTrigger value="dashboard">Dashboard</TabsTrigger>
<TabsTrigger value="affiliate">Affiliate Program</TabsTrigger>
<TabsTrigger value="swap">Swap</TabsTrigger>
<XPayButton />
<XSwapWidget />
</TabsList>
<div className="[&_>_*]:animate-fadeAndMoveIn [&_>_*]:[animation-duration:300ms] sm:px-5 max-w-[100vw]">
<SessionProvider>
Expand Down
110 changes: 0 additions & 110 deletions src/components/app/xswap/XswapModal.tsx

This file was deleted.

14 changes: 14 additions & 0 deletions src/components/app/xswap/XswapWidget.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { dstChain, dstToken } from '@/constants/xswap';
import { TxWidget } from '@xswap-link/sdk';

export const XSwapWidget = () => {
return(
<TxWidget
integratorId={process.env.NEXT_PUBLIC_INTEGRATOR_ID || ""}
dstChain={dstChain}
dstToken={dstToken}
lightTheme={true}
defaultWalletPicker={true}
/>
)
}

0 comments on commit 126bca6

Please sign in to comment.