code: function toSmallestSubunit(amount, currency) {
    const decimals = getDecimalsForCurrency(currency);
    return Math.round(amount * Math.pow(10, decimals));
  }
docs: Convert an amount of smallest sub-unit to the actual currency unit.
  For example, for a BTC account, this function will convert
  0.12345678 to 12345678.
  Likewise, for a USD account, 123.45 is converted to 12345.
  This function is the inverse of {@self::fromSmallestSubUnit}
  
  @param {number}  amount
  @param {string}  currency
  
  @return int