diff --git a/web-ui/src/app/pipes/explorer-currency.pipe.ts b/web-ui/src/app/pipes/explorer-currency.pipe.ts index 594c0a0..7e2bc7b 100644 --- a/web-ui/src/app/pipes/explorer-currency.pipe.ts +++ b/web-ui/src/app/pipes/explorer-currency.pipe.ts @@ -6,6 +6,13 @@ import { Config } from '../config'; }) export class ExplorerCurrencyPipe implements PipeTransform { transform(currency: any): string { - return `${ currency } ${ Config.currentCurrency }`; + let currencyNumber: number; + if (typeof(currency) === 'number') { + currencyNumber = currency; + } else if (typeof(currency) === 'string') { + currencyNumber = parseFloat(currency); + } + + return `${ currencyNumber.toFixed(8) } ${ Config.currentCurrency }`; } }