Token Allowance

If I do the Moralis transfer, it handles the approve for me right ? So I don’t have to do the usually a 2 step process, right ?
Cause I was reading and wondering why would I check if its Allowance, when I can just transfer ?

Also, my transfer code looks kinda unstable, can you tell me if this looks solid to you let result = await (Moralis as any).transfer(options);

you don’t need to get any allowances in case you transfer your own tokens

ok I will ask about the code if there is a typescript category

If you are using typescript you need to also add the Web3 class, example: Moralis.Web3.Transfer()

Im getting an error with
that code (but I can’t believe the Godlike support and how fast you respond)
code---------------------


  let options = {
    type: "erc20",
    tokenId: "",
    amount: Moralis.Units.Token(100, 18), 
    receiver: eth2,
    contractAddress: "0x294e1BFd460053C77B991A3ed22482060b54278A"}
  
    let result = await Moralis.Web3.transfer(options);

error : ----------------------------
let options: {
type: string;
tokenId: string;
amount: string;
receiver: string;
contractAddress: string;
}
Argument of type ‘{ type: string; tokenId: string; amount: string; receiver: string; contractAddress: string; }’ is not assignable to parameter of type ‘TransferOptions’.
Types of property ‘type’ are incompatible.

do I just have to make a type in @types ?
for the options ? Also
it doesn’t seem to work as I answered the first thread. But I tried it again on the account method and it also doesn’t work but also doesn’t work like it does work in transfer . I get this error
Types of property ‘chain’ are incompatible.
Type ‘string’ is not assignable to type ‘“ropsten” | “eth” | “0x1” | “0x3” | “rinkeby” | “0x4” | “goerli” | “0x5” | “kovan” | “0x2a” | “polygon” | “0x89” | “mumbai” | “0x13881” | “bsc” | “0x38” | “bsc testnet” | “0x61” | … 4 more … | undefined’.ts(2345)

I keep getting that error ,can you shed any light on why or what I could try ?

it doesn’t seem to work as I answered the first thread. But I tried it again on the account method and it also doesn’t work but also doesn’t work like it does work in transfer . I get this error
Types of property ‘chain’ are incompatible.
Type ‘string’ is not assignable to type ‘“ropsten” | “eth” | “0x1” | “0x3” | “rinkeby” | “0x4” | “goerli” | “0x5” | “kovan” | “0x2a” | “polygon” | “0x89” | “mumbai” | “0x13881” | “bsc” | “0x38” | “bsc testnet” | “0x61” | … 4 more … | undefined’.ts(2345)

I keep getting that error ,can you shed any light on why or what I could try ?

Did you set the chain parameter?