Closed DenisCarriere closed 5 years ago
I think the best solution to this would be to default all asset
fields to EOS
with precision=4 unless the symbol is specified.
Right now, we have two funcs: NewEOSAssetFromString
and NewAsset
. We'd need a third one: NewEOSDefaultAsset()
or something.
Specifying 2.5
would mean 2.5000 EOS
, whereas specifying 2.5 EOS
would mean specifying an amount of 25
with a precision of 1
and the symbol name EOS
(which isn't compatible with the native mainnet token).
Would that work?
Fixed in 9821c71e36a0cff82821a9842459373ba6c98c24 .. we'll release some time soon
I believe so, as long as "EOS" is not hardcoded and it can be modified somehow by the user settings or auto-detected by eosc