Add fee rate display component

This commit is contained in:
Mononaut
2023-06-15 15:16:49 -04:00
parent a45f1fde1c
commit c29558db20
6 changed files with 39 additions and 2 deletions

View File

@@ -9,7 +9,11 @@ export class FeeRoundingPipe implements PipeTransform {
@Inject(LOCALE_ID) private locale: string,
) {}
transform(fee: number): string {
transform(fee: number, rounding = null): string {
if (rounding) {
return formatNumber(fee, this.locale, rounding);
}
if (fee >= 100) {
return formatNumber(fee, this.locale, '1.0-0')
} else if (fee < 10) {