getValueInUnitBI method

BigInt getValueInUnitBI(
  1. XCBUnit unit
)

Gets the value of this amount in the specified unit as a whole number. WARNING: For all units except for XCBUnit.ore, this method will discard the remainder occurring in the division, making it unsuitable for calculations or storage. You should store and process amounts of ether by using a BigInt storing the amount in wei.

Implementation

BigInt getValueInUnitBI(XCBUnit unit) => _value ~/ _factors[unit]!;