From 79e9ee685fc698e429107b0f43c96eb847f47c32 Mon Sep 17 00:00:00 2001 From: Satyam Mishra Date: Mon, 8 Sep 2025 15:43:39 +0530 Subject: [PATCH 1/2] fix: fix tip transactions failing due to divvi --- .../create-listing-dialog/listing-progress.tsx | 12 +++++++----- .../PurchaseFlow/payment-progress/store.ts | 12 +++++++----- .../minting-progress-dialog/minting-progress.tsx | 12 +++++++----- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/app/components/create-listing-dialog/listing-progress.tsx b/app/components/create-listing-dialog/listing-progress.tsx index ef00e115..f00c78d2 100644 --- a/app/components/create-listing-dialog/listing-progress.tsx +++ b/app/components/create-listing-dialog/listing-progress.tsx @@ -24,7 +24,7 @@ import { } from "lucide-react"; import Link from "next/link"; import React, { useEffect, useRef, useState } from "react"; -import { createWalletClient, custom, formatEther } from "viem"; +import { createWalletClient, custom, erc20Abi, formatEther } from "viem"; import { celo } from "viem/chains"; import { useAccount, usePublicClient } from "wagmi"; @@ -309,11 +309,13 @@ const ListingProgress = ({ ), }); const [account] = await walletClient.getAddresses(); - const txhash = await walletClient.sendTransaction({ + const txhash = await walletClient.writeContract({ account, - to: GAINFOREST_TIP_ADDRESS, - value: GAINFOREST_TIP_AMOUNT, - data: `0x${DIVVI_DATA_SUFFIX}`, + address: "0x471EcE3750Da237f93B8E339c536989b8978a438", // Celo CELO token address + abi: erc20Abi, + functionName: "transfer", + args: [GAINFOREST_TIP_ADDRESS, GAINFOREST_TIP_AMOUNT], + dataSuffix: `0x${DIVVI_DATA_SUFFIX}`, }); if (txhash) { diff --git a/app/hypercert/[hypercertId]/components/PurchaseFlow/payment-progress/store.ts b/app/hypercert/[hypercertId]/components/PurchaseFlow/payment-progress/store.ts index b662f9b9..f98b499a 100644 --- a/app/hypercert/[hypercertId]/components/PurchaseFlow/payment-progress/store.ts +++ b/app/hypercert/[hypercertId]/components/PurchaseFlow/payment-progress/store.ts @@ -17,7 +17,7 @@ import { Loader2, type LucideProps, } from "lucide-react"; -import { createWalletClient, custom, formatEther } from "viem"; +import { createWalletClient, custom, erc20Abi, formatEther } from "viem"; import { celo } from "viem/chains"; import { create } from "zustand"; @@ -247,11 +247,13 @@ const usePaymentProgressStore = create< ), }); const [account] = await walletClient.getAddresses(); - const txhash = await walletClient.sendTransaction({ + const txhash = await walletClient.writeContract({ account, - to: GAINFOREST_TIP_ADDRESS, - value: GAINFOREST_TIP_AMOUNT, - data: `0x${DIVVI_DATA_SUFFIX}`, + address: "0x471EcE3750Da237f93B8E339c536989b8978a438", // Celo CELO token address + abi: erc20Abi, + functionName: "transfer", + args: [GAINFOREST_TIP_ADDRESS, GAINFOREST_TIP_AMOUNT], + dataSuffix: `0x${DIVVI_DATA_SUFFIX}`, }); // We don't wait for confirmation as per requirements submitReferral({ diff --git a/app/submit/components/minting-progress-dialog/minting-progress.tsx b/app/submit/components/minting-progress-dialog/minting-progress.tsx index b4ddf9c8..0b3c3927 100644 --- a/app/submit/components/minting-progress-dialog/minting-progress.tsx +++ b/app/submit/components/minting-progress-dialog/minting-progress.tsx @@ -25,7 +25,7 @@ import { } from "lucide-react"; import Link from "next/link"; import React, { useEffect, useRef, useState } from "react"; -import { createWalletClient, custom, formatEther } from "viem"; +import { createWalletClient, custom, erc20Abi, formatEther } from "viem"; import { celo } from "viem/chains"; import { useAccount, usePublicClient } from "wagmi"; import type { MintingFormValues } from "../hypercert-form"; @@ -314,11 +314,13 @@ const MintingProgress = ({ ), }); const [account] = await walletClient.getAddresses(); - const txhash = await walletClient.sendTransaction({ + const txhash = await walletClient.writeContract({ account, - to: GAINFOREST_TIP_ADDRESS, - value: GAINFOREST_TIP_AMOUNT, - data: `0x${DIVVI_DATA_SUFFIX}`, + address: "0x471EcE3750Da237f93B8E339c536989b8978a438", // Celo CELO token address + abi: erc20Abi, + functionName: "transfer", + args: [GAINFOREST_TIP_ADDRESS, GAINFOREST_TIP_AMOUNT], + dataSuffix: `0x${DIVVI_DATA_SUFFIX}`, }); if (txhash) { From ec1e5a5b6a10cdaeeef8c744b059d9d4778c1542 Mon Sep 17 00:00:00 2001 From: Satyam Mishra Date: Mon, 22 Sep 2025 19:30:15 +0530 Subject: [PATCH 2/2] fix: remove the announcemtn banner --- app/page.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 2604bcb0..09b33b08 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -11,12 +11,12 @@ export default async function Home() { return (
- - {/* ⚠️ + {/* + ⚠️

Service notice: Stablecoin purchases on Ecocertain are down. We're working on a fix. -

*/} +

🎉

Announcement: Ecocertain Reward Round 0 has ended! Payouts @@ -28,7 +28,7 @@ export default async function Home() { Learn more.

-
+
*/}