Skip to content

Commit 9b079c1

Browse files
committed
cleanup
1 parent db48fac commit 9b079c1

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

packages/grant-explorer/src/features/round/DonateToGitcoinDialog.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,13 @@ export function DonateToGitcoinDialog(props: Props) {
3232

3333
const selectedChain = chains.find((c) => c.id === chainId);
3434

35-
// Get the selected token details
3635
const tokenDetails = selectedChain?.tokens.find(
3736
(t) => t.address === selectedToken
3837
);
3938

4039
const isNativeToken = selectedToken.toLowerCase() === NATIVE.toLowerCase();
4140
const gitcoinAddress = "0x5645bF145C3f1E974D0D7FB91bf3c68592ab5012"; // todo: Replace with actual Gitcoin address
4241

43-
// For ERC20 transfers
4442
const { data: simulateData } = useSimulateContract({
4543
address: selectedToken as `0x${string}`,
4644
abi: [
@@ -65,7 +63,6 @@ export function DonateToGitcoinDialog(props: Props) {
6563
const { writeContract, isPending, data: writeHash } = useWriteContract();
6664
const { switchChain } = useSwitchChain();
6765

68-
// Add this hook to watch the transaction
6966
const {
7067
isSuccess: isTransactionSuccess,
7168
isError: isTransactionError,
@@ -96,7 +93,6 @@ export function DonateToGitcoinDialog(props: Props) {
9693
}
9794
};
9895

99-
// Update status based on transaction state
10096
React.useEffect(() => {
10197
if (isTransactionSuccess && transactionReceipt) {
10298
setStatus("success");
@@ -114,7 +110,6 @@ export function DonateToGitcoinDialog(props: Props) {
114110
};
115111

116112
const closeModal = () => {
117-
// Reset all states
118113
setSelectedToken("");
119114
setAmount("");
120115
setTxHash(undefined);
@@ -198,7 +193,6 @@ export function DonateToGitcoinDialog(props: Props) {
198193
Donate to Gitcoin
199194
</Dialog.Title>
200195

201-
{/* Chain Selection */}
202196
<div>
203197
<label className="block text-sm font-medium text-gray-700">
204198
Network
@@ -216,7 +210,6 @@ export function DonateToGitcoinDialog(props: Props) {
216210
</select>
217211
</div>
218212

219-
{/* Token Selection */}
220213
<div>
221214
<label className="block text-sm font-medium text-gray-700">
222215
Token
@@ -237,7 +230,6 @@ export function DonateToGitcoinDialog(props: Props) {
237230
</select>
238231
</div>
239232

240-
{/* Amount Input */}
241233
<div>
242234
<label className="block text-sm font-medium text-gray-700">
243235
Amount
@@ -251,7 +243,6 @@ export function DonateToGitcoinDialog(props: Props) {
251243
/>
252244
</div>
253245

254-
{/* Donate Button */}
255246
<Button
256247
type="button"
257248
onClick={handleDonate}
@@ -276,13 +267,10 @@ function DialogWrapper({
276267
closeModal: () => void;
277268
children: JSX.Element;
278269
}) {
279-
// useAccount chainId
280270
const { chainId } = useAccount();
281271
const chains = getChains();
282272
const selectedChain = chains.find((c) => c.id === chainId);
283273

284-
console.log(selectedChain);
285-
286274
return (
287275
<Transition appear show={isOpen} as={Fragment}>
288276
<Dialog as="div" className="relative z-10" onClose={closeModal}>

0 commit comments

Comments
 (0)