diff --git a/.gitignore b/.gitignore index 5ef6a52..dd146b5 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,6 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +# Sentry Config File +.env.sentry-build-plugin diff --git a/.vscode/mcp.json b/.vscode/mcp.json new file mode 100644 index 0000000..bea3b3d --- /dev/null +++ b/.vscode/mcp.json @@ -0,0 +1,8 @@ +{ + "servers": { + "Sentry": { + "url": "https://mcp.sentry.dev/mcp/velo-7b/javascript-nextjs", + "type": "http" + } + } +} \ No newline at end of file diff --git a/components/dashboard/mobile-bottom-nav.tsx b/components/dashboard/mobile-bottom-nav.tsx index d1b6f9c..716442a 100644 --- a/components/dashboard/mobile-bottom-nav.tsx +++ b/components/dashboard/mobile-bottom-nav.tsx @@ -22,7 +22,7 @@ export function MobileBottomNav({ activeTab, setActiveTab }: MobileBottomNavProp return (
-
+
{navItems.map((item, index) => ( @@ -129,7 +129,7 @@ export function StatsCards({
-
+
@@ -144,7 +144,7 @@ export function StatsCards({ -------
) : ( -

+

{stat.value}

)} diff --git a/components/dashboard/tabs/dashboard.tsx b/components/dashboard/tabs/dashboard.tsx index 5878cfc..59d23ed 100644 --- a/components/dashboard/tabs/dashboard.tsx +++ b/components/dashboard/tabs/dashboard.tsx @@ -51,19 +51,20 @@ export default function DashboardHome({ activeTab }: DashboardProps) { /> {/* Quick Actions */} - +
+ {" "} +
{/* Main Content Grid */}
+ +
-
- {" "} -
{/* Bottom CTA */} diff --git a/components/dashboard/tabs/send-funds.tsx b/components/dashboard/tabs/send-funds.tsx index 31673d6..c60f55d 100644 --- a/components/dashboard/tabs/send-funds.tsx +++ b/components/dashboard/tabs/send-funds.tsx @@ -121,9 +121,9 @@ export default function SendFunds() { }, [addresses, selectedToken]); const currentNetwork = useMemo(() => { - if (!addresses) return "mainnet"; + if (!addresses) return "testnet"; const addressInfo = addresses.find((addr) => addr.chain === selectedToken); - return addressInfo?.network || "mainnet"; + return addressInfo?.network || "testnet"; }, [addresses, selectedToken]); // Check if selected token has a wallet diff --git a/components/dashboard/wallet-overview.tsx b/components/dashboard/wallet-overview.tsx index 1671cf1..850512e 100644 --- a/components/dashboard/wallet-overview.tsx +++ b/components/dashboard/wallet-overview.tsx @@ -103,7 +103,7 @@ export function WalletOverview({ return ( - + {/* Wallet Overview @@ -115,13 +115,13 @@ export function WalletOverview({ Manage - + */} - + {walletData?.map((wallet, index) => (
@@ -142,12 +142,12 @@ export function WalletOverview({
-

+ {/*

{wallet.chain}

{shortenAddress(wallet.address as `0x${string}`, 6)} -

+

*/} {walletData.length === 0 ? ( ) : ( @@ -174,51 +174,13 @@ export function WalletOverview({

)} -
- - -
)}
))} - {/* Total Balance Summary */} - {breakdown.length > 0 && ( -
-
- Total Value: - - {formatNGN( - breakdown.reduce((sum, item) => sum + item.ngnValue, 0) - )} - -
-
- )} + ); diff --git a/components/hooks/useTokenBalance.ts b/components/hooks/useTokenBalance.ts index cf43067..d4738db 100644 --- a/components/hooks/useTokenBalance.ts +++ b/components/hooks/useTokenBalance.ts @@ -79,10 +79,10 @@ export function useTokenBalance() { const getWalletNetwork = useCallback( (chain: string): string => { - if (!addresses || !Array.isArray(addresses)) return "mainnet"; + if (!addresses || !Array.isArray(addresses)) return "testnet"; const key = normalizeChain(chain); const addressInfo = addresses.find((addr) => normalizeChain(addr.chain) === key); - return addressInfo?.network || "mainnet"; + return addressInfo?.network || "testnet"; }, [addresses, normalizeChain] ); @@ -156,7 +156,7 @@ export function useTokenBalance() { name: getTokenName(chainKey), symbol: entry.symbol || getTokenSymbol(chainKey), address: entry.address || "", - network: entry.network || "mainnet", + network: entry.network || "testnet", balance: typeof entry.balance === "number" ? entry.balance : 0, ngnValue: entry.ngnValue || 0, hasWallet: !!entry.address, @@ -176,7 +176,7 @@ export function useTokenBalance() { name: getTokenName(chain), symbol: match.symbol || getTokenSymbol(chain), address: match.address || "", - network: match.network || "mainnet", + network: match.network || "testnet", balance: parseFloat(match.balance || "0") || 0, ngnValue: 0, hasWallet: !!match.address, diff --git a/lib/api-client.ts b/lib/api-client.ts index 00ba79a..649448a 100644 --- a/lib/api-client.ts +++ b/lib/api-client.ts @@ -375,7 +375,7 @@ class ApiClient { // Wallet methods async getWalletAddresses(): Promise { return this.request<{ addresses: WalletAddress[] }>( - "/wallet/addresses/mainnet", + "/wallet/addresses/testnet", { method: "GET" }, { // Increase TTL to reduce repeated slow calls - addresses rarely change @@ -387,7 +387,7 @@ class ApiClient { async getWalletBalances(): Promise { return this.request<{ balances: WalletBalance[] }>( - "/wallet/balances/mainnet", + "/wallet/balances/testnet", { method: "GET" }, { // Increase balance TTL so UI doesn't hammer slow backend; balances @@ -405,7 +405,7 @@ class ApiClient { }); // Invalidate balance cache after sending transaction - this.cache.invalidateCache(["/wallet/balances/mainnet"]); + this.cache.invalidateCache(["/wallet/balances/testnet"]); return result; } @@ -668,7 +668,7 @@ class ApiClient { async checkDeploy(): Promise { return this.request( - "/checkdeploy/balances/mainnet/deploy", + "/checkdeploy/balances/testnet/deploy", { method: "GET", }, diff --git a/next.config.ts b/next.config.ts index 112ebaa..c2c699e 100644 --- a/next.config.ts +++ b/next.config.ts @@ -12,3 +12,4 @@ const nextConfig = { } module.exports = nextConfig + diff --git a/package-lock.json b/package-lock.json index 8fb4bbe..f17e75f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2862,6 +2862,17 @@ "node": ">=12.4.0" } }, + "node_modules/@opentelemetry/api": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", + "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/@phosphor-icons/webcomponents": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@phosphor-icons/webcomponents/-/webcomponents-2.1.5.tgz", @@ -10117,9 +10128,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001750", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001750.tgz", - "integrity": "sha512-cuom0g5sdX6rw00qOoLNSFCJ9/mYIsuSOA+yzpDw8eopiFqcVwQvZHqov0vmEighRxX++cfC0Vg1G+1Iy/mSpQ==", + "version": "1.0.30001755", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001755.tgz", + "integrity": "sha512-44V+Jm6ctPj7R52Na4TLi3Zri4dWUljJd+RDm+j8LtNCc/ihLCT+X1TzoOAkRETEWqjuLnh9581Tl80FvK7jVA==", "funding": [ { "type": "opencollective",