diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/ContractOverviewPage.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/ContractOverviewPage.tsx index 4713bd6835b..9c304637b1f 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/ContractOverviewPage.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/ContractOverviewPage.tsx @@ -53,7 +53,7 @@ export const ContractOverviewPage: React.FC = ({ text: "View asset page", icon: , target: "_blank", - link: `https://thirdweb.com/${chainSlug}/${contract.address}`, + link: `/${chainSlug}/${contract.address}`, }} trackingCategory="erc20-contract" trackingLabel="view-asset-page" diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx index 8b09007e007..c7d254e5a82 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx @@ -122,8 +122,8 @@ export function ClaimTokenCardUI(props: { } async function sendAndConfirm() { - const receipt = await sendClaimTx.mutateAsync(transaction); - await waitForReceipt(receipt); + const result = await sendClaimTx.mutateAsync(transaction); + await waitForReceipt(result); } setStepsUI({ @@ -286,6 +286,7 @@ export function ClaimTokenCardUI(props: { {account ? ( { diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenPriceData.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenPriceData.ts index 4d750aa52ec..a3966a81057 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenPriceData.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenPriceData.ts @@ -51,5 +51,6 @@ export function useTokenPriceData(params: { } : { type: "no-data" as const }; }, + refetchInterval: 5000, }); } diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenTransfers.ts b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenTransfers.ts index aa78f59f227..a4afca3d8c2 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenTransfers.ts +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenTransfers.ts @@ -49,5 +49,6 @@ export function useTokenTransfers(params: { const data = json.data as TokenTransfersData[]; return data; }, + refetchInterval: 5000, }); } diff --git a/apps/dashboard/src/components/buttons/MismatchButton.tsx b/apps/dashboard/src/components/buttons/MismatchButton.tsx index ccd6e65976d..49738791678 100644 --- a/apps/dashboard/src/components/buttons/MismatchButton.tsx +++ b/apps/dashboard/src/components/buttons/MismatchButton.tsx @@ -80,13 +80,20 @@ type MistmatchButtonProps = React.ComponentProps & { txChainId: number; isLoggedIn: boolean; isPending: boolean; + checkBalance?: boolean; }; export const MismatchButton = forwardRef< HTMLButtonElement, MistmatchButtonProps >((props, ref) => { - const { txChainId, isLoggedIn, isPending, ...buttonProps } = props; + const { + txChainId, + isLoggedIn, + isPending, + checkBalance = true, + ...buttonProps + } = props; const account = useActiveAccount(); const wallet = useActiveWallet(); const activeWalletChain = useActiveWalletChain(); @@ -150,7 +157,8 @@ export const MismatchButton = forwardRef< } const isBalanceRequired = - wallet.id === "smart" ? false : !GAS_FREE_CHAINS.includes(txChainId); + checkBalance && + (wallet.id === "smart" ? false : !GAS_FREE_CHAINS.includes(txChainId)); const notEnoughBalance = (txChainBalance.data?.value || 0n) === 0n && isBalanceRequired; diff --git a/apps/dashboard/src/components/buttons/TransactionButton.tsx b/apps/dashboard/src/components/buttons/TransactionButton.tsx index fd3ad2c6036..6673d472dab 100644 --- a/apps/dashboard/src/components/buttons/TransactionButton.tsx +++ b/apps/dashboard/src/components/buttons/TransactionButton.tsx @@ -29,6 +29,7 @@ type TransactionButtonProps = Omit & { txChainID: number; variant?: "destructive" | "primary" | "default"; isLoggedIn: boolean; + checkBalance?: boolean; }; export const TransactionButton: React.FC = ({ @@ -38,6 +39,7 @@ export const TransactionButton: React.FC = ({ txChainID, variant, isLoggedIn, + checkBalance, ...restButtonProps }) => { const activeWallet = useActiveWallet(); @@ -68,6 +70,7 @@ export const TransactionButton: React.FC = ({ txChainId={txChainID} {...restButtonProps} disabled={disabled} + checkBalance={checkBalance} className={cn("relative overflow-hidden", restButtonProps.className)} style={{ paddingLeft: transactionCount