Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sonln99 committed Jun 21, 2024
1 parent 3fe87b3 commit 7851b38
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions src/app/get-aura/deposit-aura/deposit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
});
Expand Down Expand Up @@ -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 (
<div className="main-container sub-container flex flex-col">
{!isConnected && (
{isConnected && (
<div className="flex flex-col">
<div className="introduce-title">
Let’s deposit some AURA to your desired CEX below:
Expand Down

0 comments on commit 7851b38

Please sign in to comment.