From 7851b38e72ac7409b77ff35b1b8fc23d2405595b Mon Sep 17 00:00:00 2001 From: "DESKTOP-APEQLA2\\NOSEL" Date: Fri, 21 Jun 2024 15:04:56 +0700 Subject: [PATCH] update --- src/app/get-aura/deposit-aura/deposit.tsx | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/app/get-aura/deposit-aura/deposit.tsx b/src/app/get-aura/deposit-aura/deposit.tsx index a9d98ef..49b8079 100644 --- a/src/app/get-aura/deposit-aura/deposit.tsx +++ b/src/app/get-aura/deposit-aura/deposit.tsx @@ -11,15 +11,13 @@ import { useBalance, useWaitForTransactionReceipt, BaseError, - useReconnect, } from "wagmi"; import TableHistory from "../table-history/table"; -import { stringToHex, parseEther, parseUnits, formatUnits } from "viem"; +import { stringToHex, parseEther, formatUnits } from "viem"; import { useForm, Controller } from "react-hook-form"; import axios, { AxiosRequestConfig, AxiosResponse } from "axios"; import { useEffect, useState } from "react"; import { toast } from "react-toastify"; -import { redirect } from "next/navigation"; interface TableItemProps { txTime: string; @@ -51,9 +49,7 @@ function Deposit() { formState: { errors }, } = useForm(); - const { address, isConnected, isConnecting, isDisconnected, isReconnecting } = - useAccount(); - // const test = "0x7c698F755Cf38b71dEef73B77E0F1438EecA99F2"; + const { address, isConnected } = useAccount(); const balance = useBalance({ address: address, }); @@ -132,22 +128,10 @@ function Deposit() { getActivityHistory(address?.toLowerCase() || ""); } }, [address]); - const { reconnect } = useReconnect(); - - useEffect(() => { - if (!isConnected) { - reconnect(); - console.log('-----------reconnect') - } - }, [isConnected]); - - // if (isDisconnected) { - // redirect("/get-aura"); - // } return (
- {!isConnected && ( + {isConnected && (
Let’s deposit some AURA to your desired CEX below: