Second, when the amount is sent using the function I created the raw amount placed by the user is used. Example, if I put 5 in the input the function receives 5. This behavior should be changed, if the user puts 5, 5 * 10^18 should be sent, because injective tokens has many decimal points.
So if a user sends 0.01 only 0.01 * 10^18 will be sent to the function
many things are needed here:
First one, user should be able to put decimals.
Second, when the amount is sent using the function I created the raw amount placed by the user is used. Example, if I put 5 in the input the function receives 5. This behavior should be changed, if the user puts 5, 5 * 10^18 should be sent, because injective tokens has many decimal points.
So if a user sends 0.01 only 0.01 * 10^18 will be sent to the function