useOneInchSwap from react-moralis

“chain”: “bsc”,
“fromTokenAddress”: “0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee”,
“toTokenAddress”: “0x55d398326f99059ff775485246999027b3197955”,
“amount”: “0.001”,
“fromAddress”: “0xc3cd0171dfdd36cb1d77efc07578b69252d65206”,
“slippage”: “1”

“statusCode”: 400,
“error”: “Bad Request”,
“description”: “amount should be a number string”,
“meta”: [
“type”: “paramNumber”,
“value”: “amount”
“requestId”: “7e1f2bf8-0c44-4970-b0ff-56b5a9961616”

Please help me out.

Hey @ashish-pcode, I think you should have the amount as an the wei value, which should be integer. Assuming you want to convert the amount to wei we have Moralis.Tokens.Units to help you with that :raised_hands:

1 Like

Thanks, it worked pls update the docs as well.

1 Like

which part of the docs are you suggesting to be revised?