Files
js/components/engine/utils.ts
T
Phillip Ho 72f5d27e63 feat: Relayer table, send/receive funds, other Engine polish (#2004)
* feat: add relayer page; lots of styling

* add send/receive funds

* add missing files

* fix build

* update webhooks table

* destructive

* allow float send amount
2023-12-16 00:13:55 +00:00

11 lines
257 B
TypeScript

export const prettyPrintCurrency = ({
amount,
symbol,
}: {
amount: string | number;
symbol: string;
}): string => {
const amountNumber = typeof amount === "string" ? parseFloat(amount) : amount;
return `${amountNumber.toFixed(6)} ${symbol}`;
};