Skip to content

Commit 5bbdc3c

Browse files
committed
feat: updated transform methods to return price as string
1 parent 1d342a7 commit 5bbdc3c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { inject, Pipe, PipeTransform } from '@angular/core';
2-
import { map, Observable } from 'rxjs';
32
import { CurrencyService } from './currency.service';
43

54
@Pipe({
@@ -9,7 +8,7 @@ import { CurrencyService } from './currency.service';
98
export class CurrencyPipe implements PipeTransform {
109
currencyService = inject(CurrencyService);
1110

12-
transform(price: number): Observable<string> {
13-
return this.currencyService.symbol$.pipe(map((s) => `${price}${s}`));
11+
transform(price: number): string {
12+
return `${price}${this.currencyService.symbol()}`;
1413
}
1514
}

0 commit comments

Comments
 (0)