mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
Fix "Next Level" calculations
This commit is contained in:
parent
0ac0abb1b8
commit
800557f600
@ -525,13 +525,21 @@ class MintingInfo extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_levelUpDays() {
|
_levelUpDays() {
|
||||||
let countDays = ((this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)) / this._timeCalc()).toFixed(2)
|
let nextBatch = 1000 - (this.nodeInfo.height % 1000)
|
||||||
let countString = (countDays).toString()
|
let countBlocks = this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)
|
||||||
|
let countBlocksActual = countBlocks + 1000 + nextBatch - (countBlocks % 1000)
|
||||||
|
countBlocksActual += +countBlocksActual < 0 ? 1000 : 0
|
||||||
|
let countDays = (countBlocksActual / this._timeCalc()).toFixed(2)
|
||||||
|
let countString = countDays.toString()
|
||||||
return "" + countString
|
return "" + countString
|
||||||
}
|
}
|
||||||
|
|
||||||
_levelUpBlocks() {
|
_levelUpBlocks() {
|
||||||
let countBlocksString = (this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)).toString()
|
let nextBatch = 1000 - (this.nodeInfo.height % 1000)
|
||||||
|
let countBlocks = this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)
|
||||||
|
let countBlocksActual = countBlocks + 1000 + nextBatch - (countBlocks % 1000)
|
||||||
|
countBlocksActual += +countBlocksActual < 0 ? 1000 : 0
|
||||||
|
let countBlocksString = countBlocksActual.toString()
|
||||||
return "" + countBlocksString
|
return "" + countBlocksString
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user