From 0321623f0a2641c087fba027de9fd67a7979fc28 Mon Sep 17 00:00:00 2001 From: Sanchez O'Leary Date: Thu, 8 Jan 2026 09:48:29 -0800 Subject: [PATCH 1/3] removed all unecessary console logs --- frontend/lib/wallets/parse.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/lib/wallets/parse.ts b/frontend/lib/wallets/parse.ts index 5a682b6..7d5f99e 100644 --- a/frontend/lib/wallets/parse.ts +++ b/frontend/lib/wallets/parse.ts @@ -47,7 +47,6 @@ export const parsePrivateKeyFromV4Hash = async ( ); const [account, accountFactory, encryptedPrivateKey] = decoded.split("|"); - console.log(account, accountFactory) if (!account || !accountFactory || !encryptedPrivateKey) { throw new Error("Invalid wallet format"); } @@ -221,4 +220,4 @@ export const generateWalletHashV4FromV3 = async ( const encoded = btoa(`${account}|${accountFactory}|${encryptedPrivateKey}`); return `v4-${encoded}`; -}; \ No newline at end of file +}; From 01d63bfff90b7d92deb6db71c8fa64307f4432c8 Mon Sep 17 00:00:00 2001 From: Sanchez O'Leary Date: Thu, 8 Jan 2026 09:49:01 -0800 Subject: [PATCH 2/3] removed all unecessary console logs --- frontend/app/admin/page.tsx | 3 --- frontend/app/settings/merchant-approval/page.tsx | 1 - frontend/app/settings/page.tsx | 1 - frontend/components/locations/list-view.tsx | 1 - frontend/components/merchant/google_place_finder.tsx | 4 ---- frontend/context/AppProvider.tsx | 2 -- frontend/hooks/use-toast.ts | 1 - 7 files changed, 13 deletions(-) diff --git a/frontend/app/admin/page.tsx b/frontend/app/admin/page.tsx index 7ee161a..acda311 100644 --- a/frontend/app/admin/page.tsx +++ b/frontend/app/admin/page.tsx @@ -201,7 +201,6 @@ export default function AdminPage() { const res = await authFetch(url) const e = await res.json() - console.log(e) setEvents(e) } catch { @@ -342,7 +341,6 @@ export default function AdminPage() { setIsProcessing(true) try { //Token conversion call goes here - console.log("Token Conversion") } catch (error) { toast({ title: "Conversion Failed", @@ -407,7 +405,6 @@ export default function AdminPage() { setIsConvertingToPaypal(true) try { // PayPal offload called here - console.log("PayPal offload") } catch (error) { toast({ title: "PayPal Conversion Failed", diff --git a/frontend/app/settings/merchant-approval/page.tsx b/frontend/app/settings/merchant-approval/page.tsx index 90ee258..1a38b3c 100644 --- a/frontend/app/settings/merchant-approval/page.tsx +++ b/frontend/app/settings/merchant-approval/page.tsx @@ -21,7 +21,6 @@ export default function MerchantApprovalPage() { script.async = true; script.defer = true; document.head.appendChild(script); - console.log("Script appended") } } diff --git a/frontend/app/settings/page.tsx b/frontend/app/settings/page.tsx index f559d29..fc5dd77 100644 --- a/frontend/app/settings/page.tsx +++ b/frontend/app/settings/page.tsx @@ -24,7 +24,6 @@ export default function SettingsPage() { const userRole = useMemo(() => user?.isAdmin ? "admin" : user?.isMerchant ? "merchant" : "user", [user]) const merchantStatus: MerchantStatus = useMemo(() => { - console.log(userLocations) if(userLocations.length == 0) return "none" if(userLocations.find((loc) => loc.approval)) return "approved" return "pending" diff --git a/frontend/components/locations/list-view.tsx b/frontend/components/locations/list-view.tsx index 46a8406..8da1c7b 100644 --- a/frontend/components/locations/list-view.tsx +++ b/frontend/components/locations/list-view.tsx @@ -36,7 +36,6 @@ export function ListView({ const [searchQuery, setSearchQuery] = useState("") const ITEMS_PER_PAGE = 5 const { mapLocationsStatus, locationTypes } = useLocation(); - console.log(locationTypes) // Filter merchants by type and search query const filteredLocations = locations?.filter( diff --git a/frontend/components/merchant/google_place_finder.tsx b/frontend/components/merchant/google_place_finder.tsx index 265b7a3..9436a27 100644 --- a/frontend/components/merchant/google_place_finder.tsx +++ b/frontend/components/merchant/google_place_finder.tsx @@ -18,7 +18,6 @@ export default function PlaceAutocomplete({ setGoogleSubLocation, setBusinessPho if (!containerRef.current) return; const importGoogleLibrary = async () => { - console.log("google maps imported") await google.maps.importLibrary("places") as google.maps.PlacesLibrary; } @@ -44,7 +43,6 @@ export default function PlaceAutocomplete({ setGoogleSubLocation, setBusinessPho ] }); const rawGoogleData = place.toJSON() - console.log(rawGoogleData) const googleDetails: GoogleSubLocation = { google_id: rawGoogleData.id, name: rawGoogleData.displayName, @@ -62,7 +60,6 @@ export default function PlaceAutocomplete({ setGoogleSubLocation, setBusinessPho maps_page: rawGoogleData.googleMapsURI, opening_hours: rawGoogleData.regularOpeningHours?.weekdayDescriptions || [], } - console.log(googleDetails) setGoogleSubLocation(googleDetails) if (typeof googleDetails.phone === "string") { setBusinessPhone(googleDetails.phone) @@ -78,7 +75,6 @@ export default function PlaceAutocomplete({ setGoogleSubLocation, setBusinessPho placeAutocomplete.className="text-black dark:text-white border rounded-md bg-secondary px-3 py-2" if (containerRef.current?.querySelector("gmp-place-autocomplete")) { - console.log("Element is already inside container"); } else { //@ts-ignore containerRef.current.appendChild(placeAutocomplete) diff --git a/frontend/context/AppProvider.tsx b/frontend/context/AppProvider.tsx index 3bbbdda..3bc50e6 100644 --- a/frontend/context/AppProvider.tsx +++ b/frontend/context/AppProvider.tsx @@ -448,12 +448,10 @@ export default function AppProvider({ children }: { children: ReactNode }) { const login = async () => { if(!privyReady) { setError("privy not ready") - console.log("Should be returning rn") return } if(!privyAuthenticated) { - console.log("got to privy login anyways") try { await privyLogin() // move user data implementation to helper functions called in useEffect instead of passing into login() for real auth diff --git a/frontend/hooks/use-toast.ts b/frontend/hooks/use-toast.ts index b6fce8b..c50ccc8 100644 --- a/frontend/hooks/use-toast.ts +++ b/frontend/hooks/use-toast.ts @@ -188,7 +188,6 @@ function useToast() { const toastFunction = React.useCallback(({ title, description, variant = "default" }: ToastProps) => { // Mock toast implementation - console.log(`Toast: ${title} - ${description} (${variant})`) }, []) return { From 0d4989d83ba41b06c618629188c5d98bd37c06b0 Mon Sep 17 00:00:00 2001 From: Sanchez O'Leary Date: Thu, 8 Jan 2026 11:49:11 -0800 Subject: [PATCH 3/3] small changes to fix privy error --- frontend/app/settings/merchant-approval/page.tsx | 6 ++++-- frontend/components/dashboard/sidebar.tsx | 1 + frontend/context/AppProvider.tsx | 6 ++---- frontend/context/LocationProvider.tsx | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/app/settings/merchant-approval/page.tsx b/frontend/app/settings/merchant-approval/page.tsx index 1a38b3c..00139f6 100644 --- a/frontend/app/settings/merchant-approval/page.tsx +++ b/frontend/app/settings/merchant-approval/page.tsx @@ -25,10 +25,12 @@ export default function MerchantApprovalPage() { } useEffect(() => { + if (status === "unauthenticated") { login() - router.replace("/settings/merchant-approval") + } + router.push("/settings/merchant-approval") addGoogleScript() - }, []) + }, [status]) if (status === "loading") { return ( diff --git a/frontend/components/dashboard/sidebar.tsx b/frontend/components/dashboard/sidebar.tsx index c3129b9..fe852c5 100644 --- a/frontend/components/dashboard/sidebar.tsx +++ b/frontend/components/dashboard/sidebar.tsx @@ -31,6 +31,7 @@ import { } from "@/components/ui/sidebar" import { ForwardRefExoticComponent, RefAttributes, useEffect, useMemo } from "react" import path from "path" +import { stat } from "fs" export function DashboardSidebar() { const router = useRouter() diff --git a/frontend/context/AppProvider.tsx b/frontend/context/AppProvider.tsx index 3bc50e6..48d7362 100644 --- a/frontend/context/AppProvider.tsx +++ b/frontend/context/AppProvider.tsx @@ -103,9 +103,7 @@ export default function AppProvider({ children }: { children: ReactNode }) { wallets: privyWallets, ready: walletsReady } = useWallets(); - const { - replace - } = useRouter() + const router = useRouter() const pathname = usePathname() @@ -185,7 +183,7 @@ export default function AppProvider({ children }: { children: ReactNode }) { } const _resetAppState = async () => { - replace("/") + router.replace("/") setUser(null) setStatus("unauthenticated") setWallets([]) diff --git a/frontend/context/LocationProvider.tsx b/frontend/context/LocationProvider.tsx index 2634b9c..605fe73 100644 --- a/frontend/context/LocationProvider.tsx +++ b/frontend/context/LocationProvider.tsx @@ -88,7 +88,6 @@ export default function LocationProvider({ children }: { children: ReactNode }) } const _updateLocationApproval = async (req: UpdateLocationApprovalRequest) => { - console.log(req) const res = await authFetch("/admin/locations", { method: "PUT", headers: {