[SOLVED] useWeb3Transfer in the future?

I just upgrade from V1 to V2 but still using useWeb3Transfer for transfer ETH and Token ERC20.

Need upgrade code to V2 or still using code V1 for transfer native and token in the future?
Now I updated code to GetTokenBalance to V2.
I m confuse about function useWeb3Transfer now.


import React from "react";
import { useWeb3Transfer } from "react-moralis";
​
const TransferEth = () => {
  const { fetch, error, isFetching } = useWeb3Transfer({
    type: "native",
    amount: Moralis.Units.ETH(0.5),
    receiver: "0x0000000000000000000000000000000000000000",
  });

You can use ethers.js which is what moralis-v1 / react-moralis uses.

For React apps, you can use wagmi which has hooks to make things easier (similar to react-moralis).

1 Like

Moralis will remove useWeb3Transfer in the future ?

No it’s part of react-moralis - it will be available as long as you keep using that library with your self-hosted server.

1 Like

Thanks bro. I got it