Skip to content

Commit

Permalink
feat: x_swap_bridge: integrating bridge and swap with xswap widget
Browse files Browse the repository at this point in the history
  • Loading branch information
painiteleo authored and painiteleo committed Jul 12, 2024
1 parent f87a5de commit a2123ed
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ export const env = createEnv({
server: {
TWITTER_CLIENT_ID: z.string().optional(),
TWITTER_CLIENT_SECRET: z.string().optional(),
IPINFO_TOKEN: z.string(),
SCORECHAIN_API_KEY: z.string(),
AML_ALERT_WEBHOOK: z.string().url(),
IPINFO_TOKEN: z.string().optional(),
SCORECHAIN_API_KEY: z.string().optional(),
AML_ALERT_WEBHOOK: z.string().url().optional(),
},
client: {
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: z.string(),
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"@radix-ui/react-toast": "^1.1.5",
"@radix-ui/react-tooltip": "^1.0.7",
"@rainbow-me/rainbowkit": "^2",
"@swing.xyz/ui": "^0.54.2",
"@t3-oss/env-nextjs": "^0",
"@tanstack/react-query": "^5.20.2",
"@tanstack/react-table": "^8.11.2",
Expand Down
6 changes: 6 additions & 0 deletions src/app/app/[tab]/AppTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { AppPreMining } from "@/components/app/pre-mining/AppPreMining";
import { SessionProvider } from "next-auth/react";
import { AppStaking } from "@/components/app/staking/AppStaking";
import Link from "next/link";
import "@swing.xyz/ui/theme.css";
import { AppBridge } from "@/components/app/bridge/AppBridge";

interface Props {
defaultTab: string;
Expand Down Expand Up @@ -72,6 +74,7 @@ const _AppTabs: FC = () => {
Pre-Mining
</TabsTrigger>
<TabsTrigger value="dashboard">Dashboard</TabsTrigger>
<TabsTrigger value="bridge">Swap</TabsTrigger>
</TabsList>
<div className="[&_>_*]:animate-fadeAndMoveIn [&_>_*]:[animation-duration:300ms] sm:px-5 max-w-[100vw]">
<SessionProvider>
Expand All @@ -90,6 +93,9 @@ const _AppTabs: FC = () => {
<TabsContent value="dashboard">
<AppDashboard />
</TabsContent>
<TabsContent value="bridge">
<AppBridge />
</TabsContent>
</SessionProvider>
</div>
</Tabs>
Expand Down
6 changes: 6 additions & 0 deletions src/components/app/bridge/AppBridge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import "@swing.xyz/ui/theme.css";
import { Swap } from "@swing.xyz/ui";

export function AppBridge() {
return <Swap projectId="swing-bridge" environment="production" />;
}

0 comments on commit a2123ed

Please sign in to comment.