Re-fixing bug where high priority fee could display as lower than the medium and low fee.

fixes #278
This commit is contained in:
softsimon 2021-02-24 12:30:40 +07:00
parent 619eee9492
commit 6ec07e5315
No known key found for this signature in database
GPG key ID: 488D7DCFB5A430D7
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ class FeeApi {
if (pBlock.blockVSize <= 500000) { if (pBlock.blockVSize <= 500000) {
return this.defaultFee; return this.defaultFee;
} }
if (pBlock.blockVSize <= 950000 && nextBlock) { if (pBlock.blockVSize <= 950000 && !nextBlock) {
const multiplier = (pBlock.blockVSize - 500000) / 500000; const multiplier = (pBlock.blockVSize - 500000) / 500000;
return Math.max(Math.round(useFee * multiplier), this.defaultFee); return Math.max(Math.round(useFee * multiplier), this.defaultFee);
} }

View file

@ -58,7 +58,7 @@ export class FeesBoxComponent implements OnInit {
if (pBlock.blockVSize <= 500000) { if (pBlock.blockVSize <= 500000) {
return this.defaultFee; return this.defaultFee;
} }
if (pBlock.blockVSize <= 950000 && nextBlock) { if (pBlock.blockVSize <= 950000 && !nextBlock) {
const multiplier = (pBlock.blockVSize - 500000) / 500000; const multiplier = (pBlock.blockVSize - 500000) / 500000;
return Math.max(Math.round(useFee * multiplier), this.defaultFee); return Math.max(Math.round(useFee * multiplier), this.defaultFee);
} }