simolus3 / web3dart

Ethereum library, written in Dart.
MIT License
441 stars 270 forks source link

Change getValueInUnit from num to double #243

Closed alexeyinkin closed 2 years ago

alexeyinkin commented 2 years ago

The return value is always double and never any other num because this method has division: value.toInt() + (remainder.toInt() / factor.toInt());

Division of two ints produces double, even if it is 1/1. Then addition keeps it double.