Closed jeisses closed 4 years ago
In the backend I made validation for this. It will be rejected if the given NEO amount has a higher precision than four. But up to you if you want to move this to the smart contract.
Yes I noticed, the backend validation is good :+1: For now that works and the smart contract assumes to receive an amount in precision of 4
When we want to make the token swap more generic (e.g. nep5 to eos token) or experiment with parsing the raw NEO transaction we'd have to validate it in the contract
I think it makes most sense to perform this conversion inside the smart contract. Currently the
posttx
step is assumed to receive a 1e4 int formatted amount. When it receives a raw NEO amount (1e8) it will have to round it to lower precision.