Files
kredits-web/app/utils/format-kredits.js
T

10 lines
233 B
JavaScript

import ethers from 'ethers';
export default function(value, options = {}) {
let etherValue = ethers.utils.formatEther(value);
if (!options.decimals) {
etherValue = parseInt(etherValue).toString();
}
return etherValue;
}