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
12 changes: 7 additions & 5 deletions app/components/create-listing-dialog/listing-progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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({
Expand Down
8 changes: 4 additions & 4 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ export default async function Home() {
return (
<main className="flex flex-col gap-4 pt-4 pb-[64px] md:pb-0">
<div className="flex items-center justify-center">
<InfoBox variant="success" className="max-w-4xl">
{/* <span className="text-base">⚠️</span>
{/* <InfoBox variant="success" className="max-w-4xl">
<span className="text-base">⚠️</span>
<p className="text-sm">
<b>Service notice:</b> Stablecoin purchases on Ecocertain are down.
We're working on a fix.
</p> */}
</p>
<span className="text-base">🎉</span>
<p className="text-green-800 text-sm">
<b>Announcement:</b> Ecocertain Reward Round 0 has ended! Payouts
Expand All @@ -28,7 +28,7 @@ export default async function Home() {
Learn more.
</a>
</p>
</InfoBox>
</InfoBox> */}
</div>
<section className="flex flex-col items-center gap-4 p-8">
<div className="flex w-full flex-col items-center px-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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) {
Expand Down