Skip to content

Commit

Permalink
Merge branch 'dev' into plug-subgraph-protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
Corantin authored Oct 20, 2024
2 parents 78dad7c + 15f3145 commit 85b45d9
Show file tree
Hide file tree
Showing 104 changed files with 34,268 additions and 2,779 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { useMetadataIpfsFetch } from "@/hooks/useIpfsFetch";
import { useSubgraphQuery } from "@/hooks/useSubgraphQuery";
import { alloABI } from "@/src/generated";
import { PoolTypes, ProposalStatus } from "@/types";
import { abiWithErrors } from "@/utils/abi";

import { useErrorDetails } from "@/utils/getErrorName";
import { prettyTimestamp } from "@/utils/text";

Expand Down Expand Up @@ -121,7 +121,7 @@ export default function Page({
isError: isErrorDistribute,
} = useContractWriteWithConfirmations({
address: data?.allos[0]?.id as Address,
abi: abiWithErrors(alloABI),
abi: alloABI,
functionName: "distribute",
contractName: "Allo",
fallbackErrorMessage: "Error executing proposal, please report a bug.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ export default function Page({
poolId={poolId}
ipfsResult={ipfsResult}
isEnabled={isEnabled}
chainId={chain}
/>
{isEnabled && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@ export default function Page({
<div className="flex flex-1 flex-col gap-2">
<div>
<h2>{communityName}</h2>
<EthAddress icon={false} address={communityAddr as Address} />
<EthAddress
icon={false}
address={communityAddr as Address}
label="Community address"
/>
</div>
<div className="flex flex-col gap-2">
<Statistic
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(app)/gardens/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default function Page() {
return (
<>
<div className="flex flex-col items-center justify-center gap-8 relative">
<header className="flex flex-col items-center gap-8 2xl:mt-20">
<header className="flex flex-col items-center gap-8">
<div className="flex items-center text-center">
<div className="relative flex-1">
<Image src={clouds1} alt="clouds" width={205} height={205} />
Expand Down
8 changes: 3 additions & 5 deletions apps/web/components/ActivatePoints.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import useCheckAllowList from "@/hooks/useCheckAllowList";
import { useContractWriteWithConfirmations } from "@/hooks/useContractWriteWithConfirmations";
import { ConditionObject, useDisableButtons } from "@/hooks/useDisableButtons";
import { cvStrategyABI } from "@/src/generated";
import { abiWithErrors } from "@/utils/abi";
import { useErrorDetails } from "@/utils/getErrorName";

type ActiveMemberProps = {
Expand All @@ -25,7 +24,6 @@ type ActiveMemberProps = {

export function ActivatePoints({
strategy,
communityAddress,
isMember,
isMemberActivated,
}: ActiveMemberProps) {
Expand All @@ -41,7 +39,7 @@ export function ActivatePoints({
chainId,
address: strategy.id as Address,
contractName: "CV Strategy",
abi: abiWithErrors(cvStrategyABI),
abi: cvStrategyABI,
functionName: "activatePoints",
fallbackErrorMessage: "Error activating points, please report a bug.",
onConfirmations: () => {
Expand All @@ -59,7 +57,7 @@ export function ActivatePoints({
const { write: writeDeactivatePoints, error: errorDeactivatePoints } =
useContractWriteWithConfirmations({
address: strategy.id as Address,
abi: abiWithErrors(cvStrategyABI),
abi: cvStrategyABI,
contractName: "CV Strategy",
functionName: "deactivatePoints",
fallbackErrorMessage: "Error deactivating points, please report a bug.",
Expand Down Expand Up @@ -118,7 +116,7 @@ export function ActivatePoints({
btnStyle={isMemberActivated ? "outline" : "filled"}
color={isMemberActivated ? "danger" : "primary"}
disabled={missmatchUrl || disableActiveBtn || !isAllowed}
tooltip={String(tooltipMessage)}
tooltip={tooltipMessage}
>
{isMemberActivated ? "Deactivate governance" : "Activate governance"}
</Button>
Expand Down
11 changes: 5 additions & 6 deletions apps/web/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ const btnStyles: BtnStyles = {

export function Button({
onClick,
className: styles,
className: styles = "",
disabled = false,
tooltip,
showToolTip = true,
tooltipClassName: tooltipStyles,
showToolTip = false,
tooltipClassName: tooltipStyles = "",
tooltipSide = "tooltip-top",
children,
btnStyle = "filled",
Expand All @@ -86,8 +86,7 @@ export function Button({
const buttonElement = (
<button
type={type}
className={`${btnStyles[btnStyle][disabled ? "disabled" : color]}
flex relative cursor-pointer justify-center rounded-lg px-6 py-4 transition-all ease-out disabled:cursor-not-allowed h-fit ${styles}`}
className={`${btnStyles[btnStyle][disabled ? "disabled" : color]} flex relative cursor-pointer justify-center rounded-lg px-6 py-4 transition-all ease-out disabled:cursor-not-allowed h-fit ${styles}`}
onClick={onClick}
disabled={disabled || isLoading}
>
Expand All @@ -105,7 +104,7 @@ export function Button({
return disabled || showToolTip ?
<div
className={`${tooltip ? "tooltip" : ""} ${tooltipSide} ${tooltipStyles}`}
data-tip={tooltip}
data-tip={tooltip ?? ""}
>
{buttonElement}
</div>
Expand Down
3 changes: 1 addition & 2 deletions apps/web/components/CancelButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useChainIdFromPath } from "@/hooks/useChainIdFromPath";
import { useContractWriteWithConfirmations } from "@/hooks/useContractWriteWithConfirmations";
import { MetadataV1 } from "@/hooks/useIpfsFetch";
import { cvStrategyABI } from "@/src/generated";
import { abiWithErrors } from "@/utils/abi";

type Props = {
proposalData: Maybe<
Expand All @@ -29,7 +28,7 @@ function CancelButton({ proposalData }: Props) {

const { write: writeCancel, isLoading } = useContractWriteWithConfirmations({
address: strategy.id as Address,
abi: abiWithErrors(cvStrategyABI),
abi: cvStrategyABI,
functionName: "cancelProposal",
contractName: "CV Strategy",
fallbackErrorMessage: "Error cancelling proposal, please report a bug.",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/CheckPassport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import { Button } from "./Button";
import { Skeleton } from "./Skeleton";
import { Modal } from "@/components";
import { isProd } from "@/configs/isProd";
import { usePubSubContext } from "@/contexts/pubsub.context";
import { useChainIdFromPath } from "@/hooks/useChainIdFromPath";
import { useSubgraphQuery } from "@/hooks/useSubgraphQuery";
import { CV_PASSPORT_THRESHOLD_SCALE } from "@/utils/numbers";
import { usePubSubContext } from "@/contexts/pubsub.context";

type SubmitPassportResponse = {
data: any;
Expand Down
Loading

0 comments on commit 85b45d9

Please sign in to comment.