diff --git a/package.json b/package.json index 10d3888be..3c8e4038e 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "dependencies": { "@ariakit/react": "^0.4.12", "@elysiajs/eden": "^1.1.3", - "@merkl/api": "^0.10.103", + "@merkl/api": "0.10.396", "@radix-ui/colors": "^3.0.0", "@radix-ui/react-accordion": "^1.2.1", "@radix-ui/react-avatar": "^1.1.0", diff --git a/src/components/dapp/TransactionButton.tsx b/src/components/dapp/TransactionButton.tsx index 8f03f26b8..2395c5923 100644 --- a/src/components/dapp/TransactionButton.tsx +++ b/src/components/dapp/TransactionButton.tsx @@ -1,7 +1,7 @@ import { type ReactNode, useCallback, useState } from "react"; import { getTransactionReceipt } from "viem/actions"; import type { ResolvedRegister, UseSendTransactionReturnType } from "wagmi"; -import { Hash, type IconProps } from "../.."; +import { Hash, type IconProps, WalletButton } from "../.."; import { useWalletContext } from "../../context/Wallet.context"; import Button, { type ButtonProps } from "../primitives/Button"; import Icon from "../primitives/Icon"; @@ -14,6 +14,7 @@ type WagmiTx = Parameters void }; name?: ReactNode; iconProps?: IconProps; onExecute?: (hash: string) => void; @@ -24,6 +25,7 @@ export type TransactionButtonProps = ButtonProps & { export default function TransactionButton({ tx, name, + error, children, onExecute, onSuccess, @@ -156,6 +158,14 @@ export default function TransactionButton({ } ); + + if (!user) return ; + if (error) + return ( + + ); return (