4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-11 17:55:51 +00:00

Update Tray and reward

This commit is contained in:
AlphaX-Projects 2022-10-03 11:18:39 +02:00
parent c092bc05bd
commit 55780750f3
7 changed files with 183 additions and 126 deletions

View File

@ -56,36 +56,60 @@ function createWindow() {
minWidth: 700, minWidth: 700,
minHeight: 640, minHeight: 640,
icon: iconPath(), icon: iconPath(),
title: "Qortal", title: "Qortal UI",
autoHideMenuBar: true, autoHideMenuBar: true,
webPreferences: { webPreferences: {
nodeIntegration: false, nodeIntegration: false,
partition: 'persist:webviewsession', partition: 'persist:webviewsession',
enableRemoteModule: false, enableRemoteModule: false,
nativeWindowOpen: false, nativeWindowOpen: false,
sandbox: true sandbox: true
}, },
show: false show: false
}) })
myWindow.maximize(); myWindow.maximize()
myWindow.show(); myWindow.show()
myWindow.loadURL('http://localhost:12388/app/wallet') myWindow.loadURL('http://localhost:12388/app/wallet')
myWindow.on('closed', function () { myWindow.on('closed', function () {
myWindow = null myWindow = null
}) })
myWindow.on('minimize',function(event) {
event.preventDefault()
myWindow.hide()
})
} }
const createTray = () => { const createTray = () => {
let myTray = new Tray(path.join(__dirname, 'img', 'icons', 'png', '32x32.png')) let myTray = new Tray(__dirname + '/img/icons/png/tray/tray.png')
const contextMenu = Menu.buildFromTemplate([{ const contextMenu = Menu.buildFromTemplate([
label: "Quit", click() { {
myTray.destroy(); label: `Qortal UI v${app.getVersion()}`,
app.quit(); enabled: false,
},
{
type: 'separator',
}, },
}]) {
label: 'Show Qortal UI',
click: function () {
myWindow.maximize()
myWindow.show()
},
},
{
label: 'Quit',
click() {
myTray.destroy()
app.quit()
},
},
])
myTray.setTitle("QORTAL UI") myTray.setTitle("QORTAL UI")
myTray.setToolTip("QORTAL UI") myTray.setToolTip(`Qortal UI v${app.getVersion()}`)
myTray.setContextMenu(contextMenu) myTray.setContextMenu(contextMenu)
myTray.on("double-click", () => myWindow.maximize() , myWindow.show())
} }
const isLock = app.requestSingleInstanceLock(); const isLock = app.requestSingleInstanceLock();

BIN
img/icons/png/tray/tray.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -30,10 +30,11 @@ class MintingInfo extends LitElement {
static get styles() { static get styles() {
return css` return css`
* { * {
--mdc-theme-surface: var(--white); --mdc-theme-surface: var(--white);
--mdc-dialog-content-ink-color: var(--black); --mdc-dialog-content-ink-color: var(--black);
} }
@keyframes moveInBottom { @keyframes moveInBottom {
0% { 0% {
opacity: 0; opacity: 0;
@ -349,40 +350,40 @@ class MintingInfo extends LitElement {
const getAdminInfo = () => { const getAdminInfo = () => {
parentEpml.request("apiCall", { url: `/admin/info` }).then((res) => { parentEpml.request("apiCall", { url: `/admin/info` }).then((res) => {
setTimeout(() => { this.adminInfo = res; }, 1); setTimeout(() => { this.adminInfo = res; }, 1)
}); })
setTimeout(getAdminInfo, 30000); setTimeout(getAdminInfo, 30000)
}; };
const getNodeInfo = () => { const getNodeInfo = () => {
parentEpml.request("apiCall", { url: `/admin/status` }).then((res) => { parentEpml.request("apiCall", { url: `/admin/status` }).then((res) => {
this.nodeInfo = res; this.nodeInfo = res
// Now look up the sample block // Now look up the sample block
getSampleBlock() getSampleBlock()
}); });
setTimeout(getNodeInfo, 30000); setTimeout(getNodeInfo, 30000)
}; };
const getSampleBlock = () => { const getSampleBlock = () => {
let callBlock = parseFloat(this.nodeInfo.height) - 1440; let callBlock = parseFloat(this.nodeInfo.height) - 1440
parentEpml.request("apiCall", { url: `/blocks/byheight/${callBlock}` }).then((res) => { parentEpml.request("apiCall", { url: `/blocks/byheight/${callBlock}` }).then((res) => {
setTimeout(() => { this.sampleBlock = res; }, 1); setTimeout(() => { this.sampleBlock = res }, 1)
}); })
}; }
const getAddressInfo = () => { const getAddressInfo = () => {
parentEpml.request('apiCall', { url: `/addresses/${window.parent.reduxStore.getState().app.selectedAddress.address}` }).then((res) => { parentEpml.request('apiCall', { url: `/addresses/${window.parent.reduxStore.getState().app.selectedAddress.address}` }).then((res) => {
setTimeout(() => { this.addressInfo = res; }, 1); setTimeout(() => { this.addressInfo = res }, 1)
}); });
setTimeout(getAddressInfo, 30000); setTimeout(getAddressInfo, 30000)
}; }
const getAddressLevel = () => { const getAddressLevel = () => {
parentEpml.request('apiCall', { url: `/addresses/online/levels` }).then((res) => { parentEpml.request('apiCall', { url: `/addresses/online/levels` }).then((res) => {
setTimeout(() => { this.addressLevel = res; }, 1); setTimeout(() => { this.addressLevel = res }, 1)
}); });
setTimeout(getAddressLevel, 30000); setTimeout(getAddressLevel, 30000)
}; }
window.addEventListener('storage', () => { window.addEventListener('storage', () => {
const checkLanguage = localStorage.getItem('qortalLanguage') const checkLanguage = localStorage.getItem('qortalLanguage')
@ -407,35 +408,34 @@ class MintingInfo extends LitElement {
if (!selectedAddress || Object.entries(selectedAddress).length === 0) return if (!selectedAddress || Object.entries(selectedAddress).length === 0) return
this.selectedAddress = selectedAddress this.selectedAddress = selectedAddress
}) })
}); })
parentEpml.ready().then(() => { parentEpml.ready().then(() => {
parentEpml.subscribe("config", async c => { parentEpml.subscribe("config", async c => {
if (!configLoaded) { if (!configLoaded) {
setTimeout(getAdminInfo, 1); setTimeout(getAdminInfo, 1)
setTimeout(getNodeInfo, 1); setTimeout(getNodeInfo, 1)
setTimeout(getAddressInfo, 1); setTimeout(getAddressInfo, 1)
setTimeout(getAddressLevel, 1); setTimeout(getAddressLevel, 1)
configLoaded = true; configLoaded = true
} }
this.config = JSON.parse(c); this.config = JSON.parse(c)
}) })
parentEpml.subscribe('copy_menu_switch', async value => { parentEpml.subscribe('copy_menu_switch', async value => {
if (value === 'false' && window.getSelection().toString().length !== 0) this.clearSelection(); if (value === 'false' && window.getSelection().toString().length !== 0) this.clearSelection()
}) })
}); })
parentEpml.imReady()
parentEpml.imReady();
} }
changeTheme() { changeTheme() {
const checkTheme = localStorage.getItem('qortalTheme') const checkTheme = localStorage.getItem('qortalTheme')
if (checkTheme === 'dark') { if (checkTheme === 'dark') {
this.theme = 'dark'; this.theme = 'dark'
} else { } else {
this.theme = 'light'; this.theme = 'light'
} }
document.querySelector('html').setAttribute('theme', this.theme); document.querySelector('html').setAttribute('theme', this.theme)
} }
changeLanguage() { changeLanguage() {
@ -459,23 +459,23 @@ class MintingInfo extends LitElement {
_averageBlockTime() { _averageBlockTime() {
let avgBlockString = (this.adminInfo.currentTimestamp - this.sampleBlock.timestamp).toString(); let avgBlockString = (this.adminInfo.currentTimestamp - this.sampleBlock.timestamp).toString();
let averageTimeString = ((avgBlockString / 1000) / 1440).toFixed(2); let averageTimeString = ((avgBlockString / 1000) / 1440).toFixed(2)
let averageBlockTimeString = (averageTimeString).toString(); let averageBlockTimeString = (averageTimeString).toString()
return "" + averageBlockTimeString; return "" + averageBlockTimeString
} }
_timeCalc() { _timeCalc() {
let timeString = (this.adminInfo.currentTimestamp - this.sampleBlock.timestamp).toString(); let timeString = (this.adminInfo.currentTimestamp - this.sampleBlock.timestamp).toString()
let averageString = ((timeString / 1000) / 1440).toFixed(2); let averageString = ((timeString / 1000) / 1440).toFixed(2)
let averageBlockDay = (86400 / averageString).toFixed(2); let averageBlockDay = (86400 / averageString).toFixed(2)
let averageBlockDayString = (averageBlockDay).toString(); let averageBlockDayString = (averageBlockDay).toString()
return "" + averageBlockDayString; return "" + averageBlockDayString
} }
_dayReward() { _dayReward() {
let rewardString = (this._timeCalc() * this._blockReward()).toFixed(2); let rewardString = (this._timeCalc() * this._blockReward()).toFixed(2)
let rewardDayString = (rewardString).toString(); let rewardDayString = (rewardString).toString()
return "" + rewardDayString; return "" + rewardDayString
} }
_mintingStatus() { _mintingStatus() {
@ -498,21 +498,21 @@ class MintingInfo extends LitElement {
renderMintingHelp() { renderMintingHelp() {
if (this._mintingStatus() === "Not Minting") { if (this._mintingStatus() === "Not Minting") {
return html`${translate("mintingpage.mchange9")} <div class="level-blue">==></div> ${translate("mintingpage.mchange7")}<br><mwc-button class="red-button" @click=${() => this.shadowRoot.querySelector("#becomeMinterDialog").show()}><mwc-icon class="help-icon">help_outline</mwc-icon>&nbsp;${translate("mintingpage.mchange31")}</mwc-button>`; return html`${translate("mintingpage.mchange9")} <div class="level-blue">==></div> ${translate("mintingpage.mchange7")}<br><mwc-button class="red-button" @click=${() => this.shadowRoot.querySelector("#becomeMinterDialog").show()}><mwc-icon class="help-icon">help_outline</mwc-icon>&nbsp;${translate("mintingpage.mchange31")}</mwc-button>`
} else { } else {
return html`${translate("mintingpage.mchange6")}` return html`${translate("mintingpage.mchange6")}`
} }
} }
_levelUpDays() { _levelUpDays() {
let countDays = ((this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)) / this._timeCalc()).toFixed(2); let countDays = ((this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)) / this._timeCalc()).toFixed(2)
let countString = (countDays).toString(); let countString = (countDays).toString()
return "" + countString; return "" + countString
} }
_levelUpBlocks() { _levelUpBlocks() {
let countBlocksString = (this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)).toString(); let countBlocksString = (this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)).toString()
return "" + countBlocksString; return "" + countBlocksString
} }
_blocksNeed() { _blocksNeed() {
@ -593,25 +593,25 @@ class MintingInfo extends LitElement {
if (this.addressInfo.level === 0) { if (this.addressInfo.level === 0) {
return "0" return "0"
} else if (this.addressInfo.level === 1) { } else if (this.addressInfo.level === 1) {
return "5" return "6"
} else if (this.addressInfo.level === 2) { } else if (this.addressInfo.level === 2) {
return "5" return "6"
} else if (this.addressInfo.level === 3) { } else if (this.addressInfo.level === 3) {
return "10" return "13"
} else if (this.addressInfo.level === 4) { } else if (this.addressInfo.level === 4) {
return "10" return "13"
} else if (this.addressInfo.level === 5) { } else if (this.addressInfo.level === 5) {
return "15" return "19"
} else if (this.addressInfo.level === 6) { } else if (this.addressInfo.level === 6) {
return "15" return "19"
} else if (this.addressInfo.level === 7) { } else if (this.addressInfo.level === 7) {
return "20" return "26"
} else if (this.addressInfo.level === 8) { } else if (this.addressInfo.level === 8) {
return "20" return "26"
} else if (this.addressInfo.level === 9) { } else if (this.addressInfo.level === 9) {
return "25" return "32"
} else if (this.addressInfo.level === 10) { } else if (this.addressInfo.level === 10) {
return "25" return "32"
} }
} }
@ -647,29 +647,38 @@ class MintingInfo extends LitElement {
_countLevels() { _countLevels() {
if (this.addressInfo.level === 0) { if (this.addressInfo.level === 0) {
let countTier0 = (this.addressLevel[0].count).toString(); let countTier0 = (this.addressLevel[0].count).toString()
return "" + countTier0; return "" + countTier0
} else if (this.addressInfo.level === 1) { } else if (this.addressInfo.level === 1) {
let countTier10 = (this.addressLevel[1].count + this.addressLevel[2].count).toString(); let countTier10 = (this.addressLevel[1].count + this.addressLevel[2].count).toString()
return "" + countTier10; return "" + countTier10
} else if (this.addressInfo.level === 2) { } else if (this.addressInfo.level === 2) {
let countTier11 = (this.addressLevel[1].count + this.addressLevel[2].count).toString(); let countTier11 = (this.addressLevel[1].count + this.addressLevel[2].count).toString()
return "" + countTier11; return "" + countTier11
} else if (this.addressInfo.level === 3) { } else if (this.addressInfo.level === 3) {
let countTier20 = (this.addressLevel[3].count + this.addressLevel[4].count).toString(); let countTier20 = (this.addressLevel[3].count + this.addressLevel[4].count).toString()
return "" + countTier20; return "" + countTier20
} else if (this.addressInfo.level === 4) { } else if (this.addressInfo.level === 4) {
let countTier21 = (this.addressLevel[3].count + this.addressLevel[4].count).toString(); let countTier21 = (this.addressLevel[3].count + this.addressLevel[4].count).toString()
return "" + countTier21; return "" + countTier21
} else if (this.addressInfo.level === 5) { } else if (this.addressInfo.level === 5) {
let countTier30 = (this.addressLevel[5].count + this.addressLevel[6].count).toString(); let countTier30 = (this.addressLevel[5].count + this.addressLevel[6].count).toString()
return "" + countTier30; return "" + countTier30
} else if (this.addressInfo.level === 6) { } else if (this.addressInfo.level === 6) {
let countTier31 = (this.addressLevel[5].count + this.addressLevel[6].count).toString(); let countTier31 = (this.addressLevel[5].count + this.addressLevel[6].count).toString()
return "" + countTier31; return "" + countTier31
} else if (this.addressInfo.level === 7) {
let countTier40 = (this.addressLevel[7].count + this.addressLevel[8].count).toString()
return "" + countTier40
} else if (this.addressInfo.level === 8) {
let countTier41 = (this.addressLevel[7].count + this.addressLevel[8].count).toString()
return "" + countTier41
} else if (this.addressInfo.level === 9) {
let countTier50 = (this.addressLevel[9].count + this.addressLevel[10].count).toString()
return "" + countTier50
} else if (this.addressInfo.level === 10) { } else if (this.addressInfo.level === 10) {
let countTier101 = (this.addressLevel[7].count).toString(); let countTier51 = (this.addressLevel[9].count + this.addressLevel[10].count).toString()
return "" + countTier101; return "" + countTier51
} }
} }
@ -677,33 +686,45 @@ class MintingInfo extends LitElement {
if (this.addressInfo.level === 0) { if (this.addressInfo.level === 0) {
return "0" return "0"
} else if (this.addressInfo.level === 1) { } else if (this.addressInfo.level === 1) {
let countReward10 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8); let countReward10 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8)
let countReward11 = (countReward10).toString(); let countReward11 = (countReward10).toString()
return "" + countReward11; return "" + countReward11
} else if (this.addressInfo.level === 2) { } else if (this.addressInfo.level === 2) {
let countReward20 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8); let countReward20 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8)
let countReward21 = (countReward20).toString(); let countReward21 = (countReward20).toString()
return "" + countReward21; return "" + countReward21
} else if (this.addressInfo.level === 3) { } else if (this.addressInfo.level === 3) {
let countReward30 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count)).toFixed(8); let countReward30 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count)).toFixed(8)
let countReward31 = (countReward30).toString(); let countReward31 = (countReward30).toString()
return "" + countReward31; return "" + countReward31;
} else if (this.addressInfo.level === 4) { } else if (this.addressInfo.level === 4) {
let countReward40 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count)).toFixed(8); let countReward40 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count)).toFixed(8)
let countReward41 = (countReward40).toString(); let countReward41 = (countReward40).toString();
return "" + countReward41; return "" + countReward41;
} else if (this.addressInfo.level === 5) { } else if (this.addressInfo.level === 5) {
let countReward50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count)).toFixed(8); let countReward50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count)).toFixed(8)
let countReward51 = (countReward50).toString(); let countReward51 = (countReward50).toString();
return "" + countReward51; return "" + countReward51;
} else if (this.addressInfo.level === 6) { } else if (this.addressInfo.level === 6) {
let countReward60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count)).toFixed(8); let countReward60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count)).toFixed(8)
let countReward61 = (countReward60).toString(); let countReward61 = (countReward60).toString()
return "" + countReward61; return "" + countReward61
} else if (this.addressInfo.level === 7) {
let countReward70 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8)
let countReward71 = (countReward70).toString()
return "" + countReward71
} else if (this.addressInfo.level === 8) {
let countReward80 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8)
let countReward81 = (countReward80).toString()
return "" + countReward81
} else if (this.addressInfo.level === 9) {
let countReward90 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count)).toFixed(8)
let countReward91 = (countReward90).toString()
return "" + countReward91
} else if (this.addressInfo.level === 10) { } else if (this.addressInfo.level === 10) {
let countReward100 = ((this._blockReward() / 100 * this._tierPercent()) / this.addressLevel[7].count).toFixed(8); let countReward100 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count)).toFixed(8)
let countReward101 = (countReward100).toString(); let countReward101 = (countReward100).toString()
return "" + countReward101; return "" + countReward101
} }
} }
@ -711,33 +732,45 @@ class MintingInfo extends LitElement {
if (this.addressInfo.level === 0) { if (this.addressInfo.level === 0) {
return "0" return "0"
} else if (this.addressInfo.level === 1) { } else if (this.addressInfo.level === 1) {
let countRewardDay10 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count) * this._timeCalc()).toFixed(8); let countRewardDay10 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count) * this._timeCalc()).toFixed(8)
let countRewardDay11 = (countRewardDay10).toString(); let countRewardDay11 = (countRewardDay10).toString()
return "" + countRewardDay11; return "" + countRewardDay11
} else if (this.addressInfo.level === 2) { } else if (this.addressInfo.level === 2) {
let countRewardDay20 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count) * this._timeCalc()).toFixed(8); let countRewardDay20 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count) * this._timeCalc()).toFixed(8)
let countRewardDay21 = (countRewardDay20).toString(); let countRewardDay21 = (countRewardDay20).toString()
return "" + countRewardDay21; return "" + countRewardDay21
} else if (this.addressInfo.level === 3) { } else if (this.addressInfo.level === 3) {
let countRewardDay30 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count) * this._timeCalc()).toFixed(8); let countRewardDay30 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count) * this._timeCalc()).toFixed(8)
let countRewardDay31 = (countRewardDay30).toString(); let countRewardDay31 = (countRewardDay30).toString()
return "" + countRewardDay31; return "" + countRewardDay31
} else if (this.addressInfo.level === 4) { } else if (this.addressInfo.level === 4) {
let countRewardDay40 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count) * this._timeCalc()).toFixed(8); let countRewardDay40 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count) * this._timeCalc()).toFixed(8)
let countRewardDay41 = (countRewardDay40).toString(); let countRewardDay41 = (countRewardDay40).toString()
return "" + countRewardDay41; return "" + countRewardDay41
} else if (this.addressInfo.level === 5) { } else if (this.addressInfo.level === 5) {
let countRewardDay50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count) * this._timeCalc()).toFixed(8); let countRewardDay50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count) * this._timeCalc()).toFixed(8)
let countRewardDay51 = (countRewardDay50).toString(); let countRewardDay51 = (countRewardDay50).toString()
return "" + countRewardDay51; return "" + countRewardDay51
} else if (this.addressInfo.level === 6) { } else if (this.addressInfo.level === 6) {
let countRewardDay60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count) * this._timeCalc()).toFixed(8); let countRewardDay60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count) * this._timeCalc()).toFixed(8)
let countRewardDay61 = (countRewardDay60).toString(); let countRewardDay61 = (countRewardDay60).toString()
return "" + countRewardDay61; return "" + countRewardDay61
} else if (this.addressInfo.level === 7) {
let countRewardDay70 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8)
let countRewardDay71 = (countRewardDay70).toString()
return "" + countRewardDay71
} else if (this.addressInfo.level === 8) {
let countRewardDay80 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8)
let countRewardDay81 = (countRewardDay80).toString()
return "" + countRewardDay81
} else if (this.addressInfo.level === 9) {
let countRewardDay90 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count) * this._timeCalc()).toFixed(8)
let countRewardDay91 = (countRewardDay90).toString()
return "" + countRewardDay91
} else if (this.addressInfo.level === 10) { } else if (this.addressInfo.level === 10) {
let countRewardDay100 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[7].count) * this._timeCalc()).toFixed(8); let countRewardDay100 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count) * this._timeCalc()).toFixed(8)
let countRewardDay101 = (countRewardDay100).toString(); let countRewardDay101 = (countRewardDay100).toString()
return "" + countRewardDay101; return "" + countRewardDay101
} }
} }
@ -747,8 +780,8 @@ class MintingInfo extends LitElement {
} }
isEmptyArray(arr) { isEmptyArray(arr) {
if (!arr) return true; if (!arr) return true
return arr.length === 0; return arr.length === 0
} }
} }