Skip to content

Commit

Permalink
fix: remove debug logs
Browse files Browse the repository at this point in the history
no issue
  • Loading branch information
pociej committed May 14, 2024
1 parent 31370fd commit be36ab0
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 34 deletions.
2 changes: 0 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { SWRConfig } from "swr";
import { Home } from "components/home";
import { UserProvider } from "components/providers/userProvider";
import { FileUploaderProvider } from "components/providers/fileUploader";
import { formatEther } from "viem";

console.log("DUPA");
function App() {
return (
//@ts-ignore
Expand Down
8 changes: 0 additions & 8 deletions frontend/src/components/Uploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,10 @@ export const FileUploader = () => {
style={{
backgroundColor: "#0000005b",
}}
// style={{
// border: "2px dashed #aaa",
// padding: "20px",
// marginBottom: "20px",
// borderRadius: "5px",

// }}
>
Drag & Drop files here or{" "}
<Button
onClick={() => {
console.log("WRTD");
fileInputRef.current?.click();
}}
className="ml-4 bg-golemblue-transparent border-none text-white"
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/createDepositForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export const CreateDepositForm = ({ isVisible }: { isVisible: boolean }) => {
<Button
onClick={async () => {
const { nonce } = await createDeposit();
console.log("nonce", nonce);
setNonce(nonce);
}}
className="bg-primary !text-white border-none text-lg font-light "
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/components/providers/userProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ export const UserProvider = ({ children }: PropsWithChildren<{}>) => {

//track allocation
useEffect(() => {
console.log("user.currentDeposit", user.currentActivity);
if (user.currentDeposit) {
if (userData?.currentAllocation.id) {
dispatch({
Expand All @@ -237,7 +236,6 @@ export const UserProvider = ({ children }: PropsWithChildren<{}>) => {
},
});
} else {
console.log("no allocation");
dispatch({
kind: UserAction.HAS_NO_ALLOCATION,
payload: { currentAllocation: null },
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Config<Chains extends Chain[]> = {
};

export const config: Config<[typeof holesky]> = {
supportedChains: [holesky, polygon] as const,
supportedChains: [holesky] as const,
projectId: "20bd2ed396d80502980b6d2a3fb425f4",
depositContractAddress: {
[holesky.id]: "0xA3D86ebF4FAC94114526f4D09C3fA093898347a6",
Expand Down
1 change: 0 additions & 1 deletion frontend/src/hooks/depositContract/useDeposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function useCreateDeposit() {
return {
createDeposit: async () => {
const nonce = Math.floor(Math.random() * 1000000);
console.log("c", config.depositContractAddress[chainId], requestorData);
await writeContractAsync({
address: config.depositContractAddress[chainId],
abi: abi,
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/hooks/useScanResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ export const useScanResults = () => {
const { removeFile } = useFileUploader();
const { data, error } = useSWRSubscription("scanResult", (key, { next }) => {
const eventSource = new WebSocket(
`${import.meta.env.VITE_BACKEND_URL.replace('http','ws')}/scan-result`
`${import.meta.env.VITE_BACKEND_URL.replace("http", "ws")}/scan-result`
);

eventSource.addEventListener('message',(event) => {
console.log("event",event);

eventSource.addEventListener("message", (event) => {
const file = JSON.parse(event.data);
const newResults = R.uniqWith(
// @ts-ignore
Expand Down
1 change: 0 additions & 1 deletion frontend/src/hooks/useTopUpAllocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const useTopUpAllocation = () => {
const { trigger, isMutating } = useSWRMutation(
`${import.meta.env.VITE_BACKEND_URL}/top-up-allocation`,
(url, { arg: amount }: { arg: number }) => {
console.log("url", url, "amount", amount);
return axios.put(url, { amount });
}
);
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/hooks/useUploadFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ async function processFile(
},

onUploadProgress: (progressEvent) => {
console.log("progressEvent", progressEvent);

if (!progressEvent.total) return;

const progress = Math.round(
Expand Down
12 changes: 0 additions & 12 deletions frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
window.process = {
env: {
NODE_ENV: "dessvelopment",
},
};

console.log("process.env.NODE_ENV", process);

import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import "./index.css";
import "./utils/axios";

// // @ts-ignore

console.log("VITE_BACKEND_URL", import.meta.env.VITE_BACKEND_URL);

ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App />
Expand Down

0 comments on commit be36ab0

Please sign in to comment.