Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions frontend/app/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ export default function AdminPage() {
const res = await authFetch(url)

const e = await res.json()
console.log(e)
setEvents(e)
}
catch {
Expand Down Expand Up @@ -342,7 +341,6 @@ export default function AdminPage() {
setIsProcessing(true)
try {
//Token conversion call goes here
console.log("Token Conversion")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a placeholder for future work? Otherwise, doesn't make sense to leave the try.

} catch (error) {
toast({
title: "Conversion Failed",
Expand Down Expand Up @@ -407,7 +405,6 @@ export default function AdminPage() {
setIsConvertingToPaypal(true)
try {
// PayPal offload called here
console.log("PayPal offload")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above - is this a place holder for future work? If so prefix with comment with TODO 😄

} catch (error) {
toast({
title: "PayPal Conversion Failed",
Expand Down
7 changes: 4 additions & 3 deletions frontend/app/settings/merchant-approval/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ export default function MerchantApprovalPage() {
script.async = true;
script.defer = true;
document.head.appendChild(script);
console.log("Script appended")
}
}

useEffect(() => {
if (status === "unauthenticated") {
login()
router.replace("/settings/merchant-approval")
}
router.push("/settings/merchant-approval")
addGoogleScript()
}, [])
}, [status])

if (status === "loading") {
return (
Expand Down
1 change: 0 additions & 1 deletion frontend/app/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions frontend/components/dashboard/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion frontend/components/locations/list-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 0 additions & 4 deletions frontend/components/merchant/google_place_finder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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,
Expand All @@ -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)
Expand All @@ -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");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange to leave the positive case here; should just have the single negative case.

} else {
//@ts-ignore
containerRef.current.appendChild(placeAutocomplete)
Expand Down
8 changes: 2 additions & 6 deletions frontend/context/AppProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down Expand Up @@ -185,7 +183,7 @@ export default function AppProvider({ children }: { children: ReactNode }) {
}

const _resetAppState = async () => {
replace("/")
router.replace("/")
setUser(null)
setStatus("unauthenticated")
setWallets([])
Expand Down Expand Up @@ -448,12 +446,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
Expand Down
1 change: 0 additions & 1 deletion frontend/context/LocationProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 0 additions & 1 deletion frontend/hooks/use-toast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ function useToast() {

const toastFunction = React.useCallback(({ title, description, variant = "default" }: ToastProps) => {
// Mock toast implementation
console.log(`Toast: ${title} - ${description} (${variant})`)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prob makes sense to leave the log here if this is intended to be default / mock impl.

}, [])

return {
Expand Down
3 changes: 1 addition & 2 deletions frontend/lib/wallets/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down Expand Up @@ -221,4 +220,4 @@ export const generateWalletHashV4FromV3 = async (
const encoded = btoa(`${account}|${accountFactory}|${encryptedPrivateKey}`);

return `v4-${encoded}`;
};
};