From d38dd60596e53a77a4def7f6b0fd849350a0ac59 Mon Sep 17 00:00:00 2001 From: tali-creator Date: Thu, 4 Dec 2025 04:45:42 +0100 Subject: [PATCH 1/3] refactored code base --- components/hooks/usePurchaseFlow.ts | 4 ++-- components/hooks/useTokenBalance.ts | 6 +++--- components/text.tsx | 2 +- lib/api-client.ts | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/components/hooks/usePurchaseFlow.ts b/components/hooks/usePurchaseFlow.ts index 2c2efe0..945985b 100644 --- a/components/hooks/usePurchaseFlow.ts +++ b/components/hooks/usePurchaseFlow.ts @@ -288,11 +288,11 @@ export function usePurchaseFlow({ type }: { type: "airtime" | "data" | "electric // Current network for selected token const currentNetwork = useMemo(() => { - if (!addresses) return "testnet"; + if (!addresses) return "mainnet"; const addressInfo = addresses.find( (addr) => (addr.chain || "").toLowerCase() === selectedToken.toLowerCase() ); - return addressInfo?.network || "testnet"; + return addressInfo?.network || "mainnet"; }, [addresses, selectedToken]); // Required crypto amount diff --git a/components/hooks/useTokenBalance.ts b/components/hooks/useTokenBalance.ts index 63ea4fa..e083d29 100644 --- a/components/hooks/useTokenBalance.ts +++ b/components/hooks/useTokenBalance.ts @@ -78,7 +78,7 @@ export function useTokenBalance() { name: getTokenName(chainKey), symbol, address: addr.address, - network: addr.network || 'testnet', + network: addr.network || 'mainnet', balance: 0, // Will be updated from balances ngnValue: 0, hasWallet: true, @@ -115,7 +115,7 @@ export function useTokenBalance() { name: getTokenName(chainKey), symbol, address: bal.address || '', - network: bal.network || 'testnet', + network: bal.network || 'mainnet', balance, ngnValue, hasWallet: !!bal.address, @@ -210,7 +210,7 @@ export function useTokenBalance() { ); const getWalletNetwork = useCallback((chain: string): string => - getTokenByChain(chain)?.network || 'testnet', + getTokenByChain(chain)?.network || 'mainnet', [getTokenByChain] ); diff --git a/components/text.tsx b/components/text.tsx index ea61cf4..fc4de4a 100644 --- a/components/text.tsx +++ b/components/text.tsx @@ -89,7 +89,7 @@ const DebugWalletAPI = () => { const testWalletBalancesEndpoint = async (token: string) => { try { const response = await fetch( - 'https://velo-node-backend.onrender.com/wallet/balances/testnet', + 'https://velo-node-backend.onrender.com/wallet/balances/mainnet', { method: 'GET', headers: { diff --git a/lib/api-client.ts b/lib/api-client.ts index d412738..a79e968 100644 --- a/lib/api-client.ts +++ b/lib/api-client.ts @@ -441,7 +441,7 @@ class ApiClient { // Wallet methods async getWalletAddresses(): Promise { return this.request<{ addresses: WalletAddress[] }>( - "/wallet/addresses/testnet", + "/wallet/addresses/mainnet", { method: "GET" }, { // Increase TTL to reduce repeated slow calls - addresses rarely change @@ -453,7 +453,7 @@ class ApiClient { async getWalletBalances(): Promise { return this.request<{ balances: WalletBalance[] }>( - "/wallet/balances/testnet", + "/wallet/balances/mainnet", { method: "GET" }, { // Increase balance TTL so UI doesn't hammer slow backend; balances @@ -471,7 +471,7 @@ class ApiClient { }); // Invalidate balance cache after sending transaction - this.cache.invalidateCache(["/wallet/balances/testnet"]); + this.cache.invalidateCache(["/wallet/balances/mainnet"]); return result; } @@ -734,7 +734,7 @@ class ApiClient { async checkDeploy(): Promise { return this.request( - "/checkdeploy/balances/testnet/deploy", + "/checkdeploy/balances/mainnet/deploy", { method: "GET", }, From 06589cab7ce7edca6adbe7343744be5d07ab18f6 Mon Sep 17 00:00:00 2001 From: tali-creator Date: Thu, 4 Dec 2025 04:51:46 +0100 Subject: [PATCH 2/3] refactored code base --- app/dashboard/layout.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/dashboard/layout.tsx b/app/dashboard/layout.tsx index 79cc6a3..3d64f77 100644 --- a/app/dashboard/layout.tsx +++ b/app/dashboard/layout.tsx @@ -42,11 +42,11 @@ export default function RootLayout({ return ( -
+
-
+
From e0759b9f3f661bdc1ad27152e0b137e0fb571b1e Mon Sep 17 00:00:00 2001 From: tali-creator Date: Thu, 4 Dec 2025 04:53:43 +0100 Subject: [PATCH 3/3] refactored code base --- components/dashboard/top-nav.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/dashboard/top-nav.tsx b/components/dashboard/top-nav.tsx index 4861d4c..9d8df49 100644 --- a/components/dashboard/top-nav.tsx +++ b/components/dashboard/top-nav.tsx @@ -38,8 +38,8 @@ export function TopNav() { // const isHelp = tabTitle === "Help"; return ( -
-
+
+
{/* Actions */}