[SOLVED] Send Mumbai Matic

async function transfer() {

options = {

    type: "native",

    amount: Moralis.Units.ETH("0.01"),

    receiver: "0x...",

  };

await Moralis.transfer(options);

}

Hello I am trying to send Matic from the Mumbai testnet as indicated above.

Here is my errror
Uncaught (in promise) Error: Internal JSON-RPC error.
at c (errors.js:118:12)
at Object.internal (errors.js:28:28)
at u.t.sendAsync (baseControllers.esm.js:525:27)
at async Proxy.t.request (baseControllers.esm.js:554:5)

I AM GUESSING that Eth is not a valid value for Mumbai Polygon or that this should be sent as an erc20 transfer not a native transfer, Any help is appreciated.

The code seems fine. Are you on the correct chain on metamask?

I am using web3Auth to login

Are you passing in the chainid for mumbai?

1 Like

I may have tried it, but it is worth trying again.

Set the correct chainId when authenticating as mentioned here: Web3Auth.io - Moralis

2 Likes

That was it, I needed to include the chainId “0x13881” in the authenticate process. Thanks!

Thanks a lot for the help!