Merge pull request #2808 from mempool/hex-rendering

Fix hexadecimal conversion to show leading zeros
This commit is contained in:
softsimon 2023-01-26 17:36:53 +04:00 committed by GitHub
commit 5e0ad1da5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,6 @@ import { Pipe, PipeTransform } from '@angular/core';
})
export class Decimal2HexPipe implements PipeTransform {
transform(decimal: number): string {
return `0x` + decimal.toString(16);
return `0x` + ( decimal.toString(16) ).padStart(8, '0');
}
}