diff --git a/next.config.ts b/next.config.ts
index 167a872..33502da 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -3,7 +3,15 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
images: {
- domains: ["pbs.twimg.com","vps.playpoolstudios.com", "api.duelfi.io"], // ✅ add Twitter's image domain
+ domains: ["pbs.twimg.com","vps.playpoolstudios.com", "api.duelfi.io", "validator.duelfi.io", "validatordev.duelfi.io"], // ✅ add Twitter's image domain
+ },
+ async rewrites() {
+ return [
+ {
+ source: '/api/:path*',
+ destination: 'https://api.duelfi.io/:path*',
+ },
+ ];
},
};
diff --git a/package.json b/package.json
index ff5a67d..57e4e28 100644
--- a/package.json
+++ b/package.json
@@ -3,9 +3,9 @@
"version": "0.1.0",
"private": true,
"scripts": {
- "dev": "next dev -p 3031",
+ "dev": "next dev -p 3030",
"build": "next build",
- "start": "next start -p 3031",
+ "start": "next start -p 3030",
"lint": "next lint"
},
"dependencies": {
diff --git a/src/components/GameModal.tsx b/src/components/GameModal.tsx
index 971171c..5017d65 100644
--- a/src/components/GameModal.tsx
+++ b/src/components/GameModal.tsx
@@ -10,7 +10,7 @@ import { createBet } from "@/shared/solana_helpers";
import { Game } from "@/types/Game";
import { connection, EXPLORER_TX_TEMPLATE } from "@/data/shared";
import { CONFIRMATION_THRESHOLD } from "@/shared/constants";
-
+import { fetchUserById, showNewGameNotification } from "@/shared/data_fetcher";
interface GameModalProps {
isOpen: boolean;
onClose: () => void;
@@ -64,6 +64,7 @@ export default function GameModal({ isOpen, onClose }: GameModalProps) {
setIsProcessing(true);
toast.loading("Creating Game");
try {
+ const ownerProfile = await fetchUserById(user?.id ?? "");
const tx = await createBet(wallet, user?.id ?? "", selectedPrice, selectedGame.id, false);
const url = EXPLORER_TX_TEMPLATE.replace("{address}", tx);
if (tx.length > 5) {
@@ -77,6 +78,8 @@ export default function GameModal({ isOpen, onClose }: GameModalProps) {
},
});
+ showNewGameNotification(ownerProfile?.username ?? "", selectedGame.name, selectedPrice.toString());
+
})
}
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index c1ff8c5..1a8024f 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -25,9 +25,8 @@ export default function Header() {
diff --git a/src/components/Leaderboard.tsx b/src/components/Leaderboard.tsx
index fdd2dc9..4df8ff2 100644
--- a/src/components/Leaderboard.tsx
+++ b/src/components/Leaderboard.tsx
@@ -22,7 +22,7 @@ export default function Leaderboard() {
useEffect(() => {
const fetchLeaderboard = async () => {
try {
- const response = await fetch("https://api.duelfi.io/v1/get_leaderboard.php");
+ const response = await fetch("/api/v1/get_leaderboard.php");
const data = await response.json();
setLeaderboardData(data);
} catch (error) {
diff --git a/src/components/PrivyButton.tsx b/src/components/PrivyButton.tsx
index 0d980f4..6f6a996 100644
--- a/src/components/PrivyButton.tsx
+++ b/src/components/PrivyButton.tsx
@@ -584,7 +584,11 @@ export default function PrivyButton() {
Connected Wallet
-
{solWallet}
+
+
+ {solWallet}
+ {solWallet.slice(0, 30)}...{solWallet.slice(-4)}
+
{wallets.some(wallet => wallet.type === "solana" && wallet.address === solWallet && wallet.connectorType === "embedded") && (