mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-09 20:28:29 +03:00
13 lines
401 B
JavaScript
13 lines
401 B
JavaScript
import { FilecoinNumber, Converter } from "@glif/filecoin-number";
|
|
|
|
export const formatAsFilecoinConversion = (number) => {
|
|
const filecoinNumber = new FilecoinNumber(`${number}`, "attofil");
|
|
//const inAttoFil = filecoinNumber.toAttoFil();
|
|
const inFil = filecoinNumber.toFil();
|
|
return `${formatAsFilecoin(inFil)}`;
|
|
};
|
|
|
|
export const formatAsFilecoin = (number) => {
|
|
return `${number} FIL`;
|
|
};
|