This PR add support to fractions in issuer, create invoice and transfers (include swaps) operations.
Changes (!!Important!!)
I was need change some pre-reqs of the issue #363 for feature work correctly. In my tests, I identify some problems with we send only whole and fraction. See bellow:
Conversions: Each language (Rust, TS and JS) have different ways to convert and handle numbers and this leaves room for countless errors. To avoid wrong conversions, I decided change the type of contract amount from number to string and handle in BMC. The BME send the follow representations of the fractional number: 2., 2.0, 2.0, 2.0000001, 2.5, etc..
Precisions: Another problem is contract precisions. To avoid user send wrong values in invoice, I change the invoice amount to string too. Also, now the receiver needs already imported contract, because we checked if user send a correct precision number. Also, I create the method called get_simple_contract in web.rs to return the contract precision data.
Description
This PR add support to fractions in issuer, create invoice and transfers (include swaps) operations.
Changes (!!Important!!)
I was need change some pre-reqs of the issue #363 for feature work correctly. In my tests, I identify some problems with we send only whole and fraction. See bellow:
contract amount
from number to string and handle in BMC. The BME send the follow representations of the fractional number:2.
,2.0
,2.0
,2.0000001
,2.5
, etc..Closes #363