From 2f15c6872c7aa3ecdeecbade6fcba0912fe0b6ca Mon Sep 17 00:00:00 2001 From: 0xshora <112358132134.fibon@gmail.com> Date: Thu, 4 Jul 2024 19:15:34 +0200 Subject: [PATCH] chore: add commitment error to see logs. --- .../NewProposalPopupForMain/NewProposalPopupForMain.tsx | 5 ++++- .../NewProposalPopupForMain/ProposalListForMain.tsx | 1 + src/components/ProposalList/ProposalItem.tsx | 1 + src/hooks/useDojoInteractHandler.ts | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/NewProposalPopupForMain/NewProposalPopupForMain.tsx b/src/components/NewProposalPopupForMain/NewProposalPopupForMain.tsx index 6a62a80..5e4e8f6 100644 --- a/src/components/NewProposalPopupForMain/NewProposalPopupForMain.tsx +++ b/src/components/NewProposalPopupForMain/NewProposalPopupForMain.tsx @@ -68,7 +68,10 @@ const NewProposalPopupForMain: React.FC = () => { ).then(() => { setIsCreatingNewProposal(false); // toastProposalAdded('Proposal Added'); // should be broadcast for everyone. - }).catch(e => toastContractError(e)) + }).catch((e) => { + console.error("handleSubmit error: ", e) + toastContractError(e) + }) } }; diff --git a/src/components/NewProposalPopupForMain/ProposalListForMain.tsx b/src/components/NewProposalPopupForMain/ProposalListForMain.tsx index c8dd00d..2cd3c10 100644 --- a/src/components/NewProposalPopupForMain/ProposalListForMain.tsx +++ b/src/components/NewProposalPopupForMain/ProposalListForMain.tsx @@ -92,6 +92,7 @@ const ProposalListForMain: React.FC = ({ headerHeight, ) .then(() => setSelectedProposal(null)) .catch((e) => { + console.error("handleVoteProposal error: ", e) toastContractError(e) }) } diff --git a/src/components/ProposalList/ProposalItem.tsx b/src/components/ProposalList/ProposalItem.tsx index 6a06cde..f041e75 100644 --- a/src/components/ProposalList/ProposalItem.tsx +++ b/src/components/ProposalList/ProposalItem.tsx @@ -127,6 +127,7 @@ const ProposalItem: React.FC = ({ proposal, onStartVote, filter, sear ) .then(() => console.log('activateProposal')) .catch((e) => { + console.error("handleActivateProposal error: ", e) toastContractError(e) }) } diff --git a/src/hooks/useDojoInteractHandler.ts b/src/hooks/useDojoInteractHandler.ts index 35660a2..a97a8ba 100644 --- a/src/hooks/useDojoInteractHandler.ts +++ b/src/hooks/useDojoInteractHandler.ts @@ -73,7 +73,7 @@ export const useDojoInteractHandler = (pixelStore: PixelStore, gameData: IPixela // Do something with the UI? }) .catch(e => { - console.error(e) + console.error("dojocall error", e) toastContractError(e) }) setClickedCell(undefined)