Add pipe for converting token values to Wei standards.

This commit is contained in:
Spencer Ofwiti
2020-12-05 09:28:40 +03:00
parent 933d73e635
commit bff58f7a43
15 changed files with 8 additions and 382 deletions

View File

@@ -0,0 +1,8 @@
import {Pipe, PipeTransform} from '@angular/core';
@Pipe({name: 'tokenRatio'})
export class TokenRatioPipe implements PipeTransform {
transform(value: any, ...args): any {
return Number(value) / Math.pow(10, 18);
}
}