bigIntToInt method
Converts a big integer to an integer.
The valueInt
is the integer value to convert, valueString
is the string
representation of the integer, and fromPsk
is a list of unicodes to convert
fromPsk
should be used only for deciphering balances from Summary.psk
from little-endian format.
Implementation
int bigIntToInt({
int valueInt = 0,
String? valueString,
List<int>? fromPsk,
}) {
var inputBigInt = valueInt;
if (valueString != null) {
inputBigInt = int.parse(valueString);
}
if (fromPsk != null) {
inputBigInt = _endianToInt(fromPsk);
}
return _convertFromBigInt(inputBigInt).getInt;
}