# HopeSwap Approve USDT Error

## HopeSwap Approve USDT Error

When users operate on HopeSwap, the following exceptions may occur when they need to approve USDT.

<figure><img src="https://285576528-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F56LPGHUCjDtUfn1QgxEV%2Fuploads%2FUFtV50rZCnQLpZ3lZF5S%2Fimage.png?alt=media&#x26;token=5f017da5-7b1a-4085-96b4-644fa99d61fc" alt=""><figcaption><p>Error</p></figcaption></figure>

## Error Cause

The problems mainly occur in the situation of insufficient authorization of USDT, so it is best to use the method of full authorization in the use of authorization.

The USDT approval operation mandates that the initial authorization amount should be set to 0. Any non-zero authorization that continues will result in an error being reported by the contract.

## Solutions

**(1) Revoke your USDT Approve in HopeSwap (Recommended)**

1. Enter the [USDT Write Contract](https://etherscan.io/address/0xdac17f958d2ee523a2206206994597c13d831ec7#writeContract).
2. Connect your Wallet.<br>

   <figure><img src="https://285576528-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F56LPGHUCjDtUfn1QgxEV%2Fuploads%2FRpkXiobCNMyRnACI0Lc0%2Fimage.png?alt=media&#x26;token=1d5f729d-65b5-45d8-b36e-ba00564e1646" alt=""><figcaption></figcaption></figure>
3. Choose the "approve" method.
4. "*spender" fill in HopeSwap Router address:* `0x219Bd2d1449F3813c01204EE455D11B41D5051e9`\
   "\_value" fill in 0<br>

   <figure><img src="https://285576528-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F56LPGHUCjDtUfn1QgxEV%2Fuploads%2FtY2CX4efl4vYADCVzWiH%2Fimage.png?alt=media&#x26;token=4c9e93be-4eec-4afb-b063-46831c20eca5" alt=""><figcaption></figcaption></figure>

**(2) Using up the remaining amount of USDT**

1. Enter the [USDT browser](https://etherscan.io/address/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract).
2. Choose the "allowance" method.<br>

   <figure><img src="https://285576528-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F56LPGHUCjDtUfn1QgxEV%2Fuploads%2FqRMZgfiCOe93xkgajm7Y%2Fimage.png?alt=media&#x26;token=60ea3111-669c-49e5-91ca-1a316bc1a1d8" alt=""><figcaption></figcaption></figure>
3. "\_onwer" fill in your own address;\
   "\_spender" fill in HopeSwap Router address: `0x219Bd2d1449F3813c01204EE455D11B41D5051e9`

   <figure><img src="https://285576528-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F56LPGHUCjDtUfn1QgxEV%2Fuploads%2FxLpQXYlwsQTf6gN6W0pg%2Fimage.png?alt=media&#x26;token=eecf239e-27f5-4666-a594-e0d2368d5073" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Example: The queried 18357027, and the actual remaining amount is 18.357027 USDT since the data has six decimal places.
{% endhint %}

4. Use up the rest balance of the last authorized and re-authorize USDT in HopeSwap.

**(3) Use a new wallet address in HopeSwap.**

## How to avoid this problem

You are suggested to use the "***Default Value***" when setting the approval amount for USDT to avoid future approval failures.
