Three custom pipes provide consistent seed/account display formatting across the application.
Used for compact displays (mat-select-trigger, inline text)
<mat-select-trigger>
<span *ngIf="selectedSeed">
{{ selectedSeed | seedDisplay: { compact: true, currencyLabel: t('general.currency') } }}
</span>
</mat-select-trigger>Output: Alias (ABCD...WXYZ) - 1234567 QUBIC
Shows alias and shortened address
{{ seed | seedFirstLine }}Output: Alias (ABCD...WXYZ)
Shows balance and currency
{{ seed | seedSecondLine: t('general.currency') }}Output: 1234567 QUBIC
<mat-select formControlName="seedSelect">
<!-- Single line when selected -->
<mat-select-trigger>
<span *ngIf="getSelectedSeed()">
{{ getSelectedSeed() | seedDisplay: { compact: true, currencyLabel: t('general.currency') } }}
</span>
</mat-select-trigger>
<!-- Two lines in dropdown -->
<mat-option *ngFor="let seed of seeds" [value]="seed.publicId">
{{ seed | seedFirstLine }}<br />{{ seed | seedSecondLine: t('general.currency') }}
</mat-option>
</mat-select>All seed displays now use pipes!
- ✅ Single-line (triggers): Use
seedDisplaypipe - ✅ Two-line (dropdown options): Use
seedFirstLine+seedSecondLinepipes - ✅ Consistent formatting across all components
- ✅ Centralized logic - change once, applies everywhere
{
showAddress?: boolean; // default: true
showBalance?: boolean; // default: true
showCurrency?: boolean; // default: true
compact?: boolean; // default: true
currencyLabel?: string; // default: ''
}Examples:
- Address only:
{{ seed | seedDisplay: { showBalance: false } }} - Balance only:
{{ seed | seedDisplay: { showAddress: false, currencyLabel: 'QUBIC' } }}
Single-Line: seedDisplay pipe
- mat-select-trigger, card headers, table cells, tooltips, inline text
Two-Line: seedFirstLine + seedSecondLine pipes
- mat-option dropdowns, list items, vertical displays