NYvnB=$zYzBk5g+(cp6$w$>RWKtP##|Ay|d_B;f1
zqw^i>hj1J&z>orKfM20^O-CzipTpWj1F6sL9nG4U}$6L2$vI~_sH
zS)7~HO-V02eG&SAN6;y!e?kwGV~u{_mqh~m5fpvyqU6YrN`Qa}px@5A3_Uh%W^4vX
z%?`ix;3Iw|`&^xG)o
z{Bqs?XCHco*@Aw3z8*cgcR_e>j0f?5>HBg&*zTp<0000bbVXQnWMOn=I%9HWVRU5x
zGB7eQEif}JGBi{$IXW^hIxsdZFf}?bF!E`sCjbBdC3HntbYx+4WjbwdWNBu305UK#
pFfA}MEiyDzFgZFhFgh?cEig4YFffBO5t{%2002ovPDHLkV1ka>M%w@Y
literal 0
HcmV?d00001
diff --git a/qortal-ui-plugins/plugins/core/minting/minting-info.src.js b/qortal-ui-plugins/plugins/core/minting/minting-info.src.js
index c75517d9..c6ede253 100644
--- a/qortal-ui-plugins/plugins/core/minting/minting-info.src.js
+++ b/qortal-ui-plugins/plugins/core/minting/minting-info.src.js
@@ -30,10 +30,11 @@ class MintingInfo extends LitElement {
static get styles() {
return css`
- * {
- --mdc-theme-surface: var(--white);
- --mdc-dialog-content-ink-color: var(--black);
- }
+ * {
+ --mdc-theme-surface: var(--white);
+ --mdc-dialog-content-ink-color: var(--black);
+ }
+
@keyframes moveInBottom {
0% {
opacity: 0;
@@ -349,40 +350,40 @@ class MintingInfo extends LitElement {
const getAdminInfo = () => {
parentEpml.request("apiCall", { url: `/admin/info` }).then((res) => {
- setTimeout(() => { this.adminInfo = res; }, 1);
- });
- setTimeout(getAdminInfo, 30000);
+ setTimeout(() => { this.adminInfo = res; }, 1)
+ })
+ setTimeout(getAdminInfo, 30000)
};
const getNodeInfo = () => {
parentEpml.request("apiCall", { url: `/admin/status` }).then((res) => {
- this.nodeInfo = res;
+ this.nodeInfo = res
// Now look up the sample block
getSampleBlock()
});
- setTimeout(getNodeInfo, 30000);
+ setTimeout(getNodeInfo, 30000)
};
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) => {
- setTimeout(() => { this.sampleBlock = res; }, 1);
- });
- };
+ setTimeout(() => { this.sampleBlock = res }, 1)
+ })
+ }
const getAddressInfo = () => {
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 = () => {
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', () => {
const checkLanguage = localStorage.getItem('qortalLanguage')
@@ -407,35 +408,34 @@ class MintingInfo extends LitElement {
if (!selectedAddress || Object.entries(selectedAddress).length === 0) return
this.selectedAddress = selectedAddress
})
- });
+ })
parentEpml.ready().then(() => {
parentEpml.subscribe("config", async c => {
if (!configLoaded) {
- setTimeout(getAdminInfo, 1);
- setTimeout(getNodeInfo, 1);
- setTimeout(getAddressInfo, 1);
- setTimeout(getAddressLevel, 1);
- configLoaded = true;
+ setTimeout(getAdminInfo, 1)
+ setTimeout(getNodeInfo, 1)
+ setTimeout(getAddressInfo, 1)
+ setTimeout(getAddressLevel, 1)
+ configLoaded = true
}
- this.config = JSON.parse(c);
+ this.config = JSON.parse(c)
})
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() {
const checkTheme = localStorage.getItem('qortalTheme')
if (checkTheme === 'dark') {
- this.theme = 'dark';
+ this.theme = 'dark'
} else {
- this.theme = 'light';
+ this.theme = 'light'
}
- document.querySelector('html').setAttribute('theme', this.theme);
+ document.querySelector('html').setAttribute('theme', this.theme)
}
changeLanguage() {
@@ -459,23 +459,23 @@ class MintingInfo extends LitElement {
_averageBlockTime() {
let avgBlockString = (this.adminInfo.currentTimestamp - this.sampleBlock.timestamp).toString();
- let averageTimeString = ((avgBlockString / 1000) / 1440).toFixed(2);
- let averageBlockTimeString = (averageTimeString).toString();
- return "" + averageBlockTimeString;
+ let averageTimeString = ((avgBlockString / 1000) / 1440).toFixed(2)
+ let averageBlockTimeString = (averageTimeString).toString()
+ return "" + averageBlockTimeString
}
_timeCalc() {
- let timeString = (this.adminInfo.currentTimestamp - this.sampleBlock.timestamp).toString();
- let averageString = ((timeString / 1000) / 1440).toFixed(2);
- let averageBlockDay = (86400 / averageString).toFixed(2);
- let averageBlockDayString = (averageBlockDay).toString();
- return "" + averageBlockDayString;
+ let timeString = (this.adminInfo.currentTimestamp - this.sampleBlock.timestamp).toString()
+ let averageString = ((timeString / 1000) / 1440).toFixed(2)
+ let averageBlockDay = (86400 / averageString).toFixed(2)
+ let averageBlockDayString = (averageBlockDay).toString()
+ return "" + averageBlockDayString
}
_dayReward() {
- let rewardString = (this._timeCalc() * this._blockReward()).toFixed(2);
- let rewardDayString = (rewardString).toString();
- return "" + rewardDayString;
+ let rewardString = (this._timeCalc() * this._blockReward()).toFixed(2)
+ let rewardDayString = (rewardString).toString()
+ return "" + rewardDayString
}
_mintingStatus() {
@@ -498,21 +498,21 @@ class MintingInfo extends LitElement {
renderMintingHelp() {
if (this._mintingStatus() === "Not Minting") {
- return html`${translate("mintingpage.mchange9")} ==>
${translate("mintingpage.mchange7")}
this.shadowRoot.querySelector("#becomeMinterDialog").show()}>help_outline ${translate("mintingpage.mchange31")}`;
+ return html`${translate("mintingpage.mchange9")} ==>
${translate("mintingpage.mchange7")}
this.shadowRoot.querySelector("#becomeMinterDialog").show()}>help_outline ${translate("mintingpage.mchange31")}`
} else {
return html`${translate("mintingpage.mchange6")}`
}
}
_levelUpDays() {
- let countDays = ((this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)) / this._timeCalc()).toFixed(2);
- let countString = (countDays).toString();
- return "" + countString;
+ let countDays = ((this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)) / this._timeCalc()).toFixed(2)
+ let countString = (countDays).toString()
+ return "" + countString
}
_levelUpBlocks() {
- let countBlocksString = (this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)).toString();
- return "" + countBlocksString;
+ let countBlocksString = (this._blocksNeed() - (this.addressInfo.blocksMinted + this.addressInfo.blocksMintedAdjustment)).toString()
+ return "" + countBlocksString
}
_blocksNeed() {
@@ -593,25 +593,25 @@ class MintingInfo extends LitElement {
if (this.addressInfo.level === 0) {
return "0"
} else if (this.addressInfo.level === 1) {
- return "5"
+ return "6"
} else if (this.addressInfo.level === 2) {
- return "5"
+ return "6"
} else if (this.addressInfo.level === 3) {
- return "10"
+ return "13"
} else if (this.addressInfo.level === 4) {
- return "10"
+ return "13"
} else if (this.addressInfo.level === 5) {
- return "15"
+ return "19"
} else if (this.addressInfo.level === 6) {
- return "15"
+ return "19"
} else if (this.addressInfo.level === 7) {
- return "20"
+ return "26"
} else if (this.addressInfo.level === 8) {
- return "20"
+ return "26"
} else if (this.addressInfo.level === 9) {
- return "25"
+ return "32"
} else if (this.addressInfo.level === 10) {
- return "25"
+ return "32"
}
}
@@ -647,29 +647,38 @@ class MintingInfo extends LitElement {
_countLevels() {
if (this.addressInfo.level === 0) {
- let countTier0 = (this.addressLevel[0].count).toString();
- return "" + countTier0;
+ let countTier0 = (this.addressLevel[0].count).toString()
+ return "" + countTier0
} else if (this.addressInfo.level === 1) {
- let countTier10 = (this.addressLevel[1].count + this.addressLevel[2].count).toString();
- return "" + countTier10;
+ let countTier10 = (this.addressLevel[1].count + this.addressLevel[2].count).toString()
+ return "" + countTier10
} else if (this.addressInfo.level === 2) {
- let countTier11 = (this.addressLevel[1].count + this.addressLevel[2].count).toString();
- return "" + countTier11;
+ let countTier11 = (this.addressLevel[1].count + this.addressLevel[2].count).toString()
+ return "" + countTier11
} else if (this.addressInfo.level === 3) {
- let countTier20 = (this.addressLevel[3].count + this.addressLevel[4].count).toString();
- return "" + countTier20;
+ let countTier20 = (this.addressLevel[3].count + this.addressLevel[4].count).toString()
+ return "" + countTier20
} else if (this.addressInfo.level === 4) {
- let countTier21 = (this.addressLevel[3].count + this.addressLevel[4].count).toString();
- return "" + countTier21;
+ let countTier21 = (this.addressLevel[3].count + this.addressLevel[4].count).toString()
+ return "" + countTier21
} else if (this.addressInfo.level === 5) {
- let countTier30 = (this.addressLevel[5].count + this.addressLevel[6].count).toString();
- return "" + countTier30;
+ let countTier30 = (this.addressLevel[5].count + this.addressLevel[6].count).toString()
+ return "" + countTier30
} else if (this.addressInfo.level === 6) {
- let countTier31 = (this.addressLevel[5].count + this.addressLevel[6].count).toString();
- return "" + countTier31;
+ let countTier31 = (this.addressLevel[5].count + this.addressLevel[6].count).toString()
+ 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) {
- let countTier101 = (this.addressLevel[7].count).toString();
- return "" + countTier101;
+ let countTier51 = (this.addressLevel[9].count + this.addressLevel[10].count).toString()
+ return "" + countTier51
}
}
@@ -677,33 +686,45 @@ class MintingInfo extends LitElement {
if (this.addressInfo.level === 0) {
return "0"
} else if (this.addressInfo.level === 1) {
- let countReward10 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8);
- let countReward11 = (countReward10).toString();
- return "" + countReward11;
+ let countReward10 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8)
+ let countReward11 = (countReward10).toString()
+ return "" + countReward11
} else if (this.addressInfo.level === 2) {
- let countReward20 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8);
- let countReward21 = (countReward20).toString();
- return "" + countReward21;
+ let countReward20 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count)).toFixed(8)
+ let countReward21 = (countReward20).toString()
+ return "" + countReward21
} else if (this.addressInfo.level === 3) {
- let countReward30 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count)).toFixed(8);
- let countReward31 = (countReward30).toString();
+ let countReward30 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count)).toFixed(8)
+ let countReward31 = (countReward30).toString()
return "" + countReward31;
} 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();
return "" + countReward41;
} 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();
return "" + countReward51;
} else if (this.addressInfo.level === 6) {
- let countReward60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count)).toFixed(8);
- let countReward61 = (countReward60).toString();
- return "" + countReward61;
+ let countReward60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count)).toFixed(8)
+ let countReward61 = (countReward60).toString()
+ 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) {
- let countReward100 = ((this._blockReward() / 100 * this._tierPercent()) / this.addressLevel[7].count).toFixed(8);
- let countReward101 = (countReward100).toString();
- return "" + countReward101;
+ let countReward100 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count)).toFixed(8)
+ let countReward101 = (countReward100).toString()
+ return "" + countReward101
}
}
@@ -711,33 +732,45 @@ class MintingInfo extends LitElement {
if (this.addressInfo.level === 0) {
return "0"
} 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 countRewardDay11 = (countRewardDay10).toString();
- return "" + countRewardDay11;
+ let countRewardDay10 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay11 = (countRewardDay10).toString()
+ return "" + countRewardDay11
} 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 countRewardDay21 = (countRewardDay20).toString();
- return "" + countRewardDay21;
+ let countRewardDay20 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[1].count + this.addressLevel[2].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay21 = (countRewardDay20).toString()
+ return "" + countRewardDay21
} 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 countRewardDay31 = (countRewardDay30).toString();
- return "" + countRewardDay31;
+ let countRewardDay30 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay31 = (countRewardDay30).toString()
+ return "" + countRewardDay31
} 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 countRewardDay41 = (countRewardDay40).toString();
- return "" + countRewardDay41;
+ let countRewardDay40 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[3].count + this.addressLevel[4].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay41 = (countRewardDay40).toString()
+ return "" + countRewardDay41
} 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 countRewardDay51 = (countRewardDay50).toString();
- return "" + countRewardDay51;
+ let countRewardDay50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay51 = (countRewardDay50).toString()
+ return "" + countRewardDay51
} 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 countRewardDay61 = (countRewardDay60).toString();
- return "" + countRewardDay61;
+ let countRewardDay60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay61 = (countRewardDay60).toString()
+ 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) {
- let countRewardDay100 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[7].count) * this._timeCalc()).toFixed(8);
- let countRewardDay101 = (countRewardDay100).toString();
- return "" + countRewardDay101;
+ let countRewardDay100 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[9].count + this.addressLevel[10].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay101 = (countRewardDay100).toString()
+ return "" + countRewardDay101
}
}
@@ -747,8 +780,8 @@ class MintingInfo extends LitElement {
}
isEmptyArray(arr) {
- if (!arr) return true;
- return arr.length === 0;
+ if (!arr) return true
+ return arr.length === 0
}
}
From f5b85aaf44aff009307776d3c7d1006b604896c6 Mon Sep 17 00:00:00 2001
From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com>
Date: Mon, 3 Oct 2022 15:05:17 +0200
Subject: [PATCH 10/16] Fix reward for tiers
---
.../plugins/core/minting/minting-info.src.js | 191 +++++++++++++-----
1 file changed, 145 insertions(+), 46 deletions(-)
diff --git a/qortal-ui-plugins/plugins/core/minting/minting-info.src.js b/qortal-ui-plugins/plugins/core/minting/minting-info.src.js
index c6ede253..05dd1d88 100644
--- a/qortal-ui-plugins/plugins/core/minting/minting-info.src.js
+++ b/qortal-ui-plugins/plugins/core/minting/minting-info.src.js
@@ -348,6 +348,8 @@ class MintingInfo extends LitElement {
this.changeTheme()
this.changeLanguage()
+ this.levelsCount()
+
const getAdminInfo = () => {
parentEpml.request("apiCall", { url: `/admin/info` }).then((res) => {
setTimeout(() => { this.adminInfo = res; }, 1)
@@ -360,7 +362,7 @@ class MintingInfo extends LitElement {
this.nodeInfo = res
// Now look up the sample block
getSampleBlock()
- });
+ })
setTimeout(getNodeInfo, 30000)
};
@@ -374,17 +376,10 @@ class MintingInfo extends LitElement {
const getAddressInfo = () => {
parentEpml.request('apiCall', { url: `/addresses/${window.parent.reduxStore.getState().app.selectedAddress.address}` }).then((res) => {
setTimeout(() => { this.addressInfo = res }, 1)
- });
+ })
setTimeout(getAddressInfo, 30000)
}
- const getAddressLevel = () => {
- parentEpml.request('apiCall', { url: `/addresses/online/levels` }).then((res) => {
- setTimeout(() => { this.addressLevel = res }, 1)
- });
- setTimeout(getAddressLevel, 30000)
- }
-
window.addEventListener('storage', () => {
const checkLanguage = localStorage.getItem('qortalLanguage')
const checkTheme = localStorage.getItem('qortalTheme')
@@ -416,7 +411,7 @@ class MintingInfo extends LitElement {
setTimeout(getAdminInfo, 1)
setTimeout(getNodeInfo, 1)
setTimeout(getAddressInfo, 1)
- setTimeout(getAddressLevel, 1)
+ setInterval(this.getAddressLevel, 30000)
configLoaded = true
}
this.config = JSON.parse(c)
@@ -428,6 +423,26 @@ class MintingInfo extends LitElement {
parentEpml.imReady()
}
+ async levelsCount() {
+ await this.getAddressLevel()
+ this.countForTier4()
+ }
+
+ getAddressLevel = async () => {
+ const callLevels = await parentEpml.request('apiCall', {
+ url: `/addresses/online/levels`
+ })
+ this.addressLevel = callLevels
+ }
+
+ countForTier4() {
+ const minterOnline = (this.addressLevel[7].count + this.addressLevel[8].count)
+ if (minterOnline < 30) {
+ return "false"
+ } else {
+ return "true"
+ }
+ }
changeTheme() {
const checkTheme = localStorage.getItem('qortalTheme')
if (checkTheme === 'dark') {
@@ -601,13 +616,29 @@ class MintingInfo extends LitElement {
} else if (this.addressInfo.level === 4) {
return "13"
} else if (this.addressInfo.level === 5) {
- return "19"
+ if (this.countForTier4() === "false") {
+ return "45"
+ } else {
+ return "19"
+ }
} else if (this.addressInfo.level === 6) {
- return "19"
+ if (this.countForTier4() === "false") {
+ return "45"
+ } else {
+ return "19"
+ }
} else if (this.addressInfo.level === 7) {
- return "26"
+ if (this.countForTier4() === "false") {
+ return "45"
+ } else {
+ return "26"
+ }
} else if (this.addressInfo.level === 8) {
- return "26"
+ if (this.countForTier4() === "false") {
+ return "45"
+ } else {
+ return "26"
+ }
} else if (this.addressInfo.level === 9) {
return "32"
} else if (this.addressInfo.level === 10) {
@@ -662,17 +693,37 @@ class MintingInfo extends LitElement {
let countTier21 = (this.addressLevel[3].count + this.addressLevel[4].count).toString()
return "" + countTier21
} else if (this.addressInfo.level === 5) {
- let countTier30 = (this.addressLevel[5].count + this.addressLevel[6].count).toString()
- return "" + countTier30
+ if (this.countForTier4() === "false") {
+ let countTier30 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString()
+ return "" + countTier30
+ } else {
+ let countTier30 = (this.addressLevel[5].count + this.addressLevel[6].count).toString()
+ return "" + countTier30
+ }
} else if (this.addressInfo.level === 6) {
- let countTier31 = (this.addressLevel[5].count + this.addressLevel[6].count).toString()
- return "" + countTier31
+ if (this.countForTier4() === "false") {
+ let countTier31 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString()
+ return "" + countTier31
+ } else {
+ let countTier31 = (this.addressLevel[5].count + this.addressLevel[6].count).toString()
+ return "" + countTier31
+ }
} else if (this.addressInfo.level === 7) {
- let countTier40 = (this.addressLevel[7].count + this.addressLevel[8].count).toString()
- return "" + countTier40
+ if (this.countForTier4() === "false") {
+ let countTier40 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString()
+ return "" + countTier40
+ } else {
+ 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
+ if (this.countForTier4() === "false") {
+ let countTier40 = (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count).toString()
+ return "" + countTier40
+ } else {
+ 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
@@ -702,21 +753,45 @@ class MintingInfo extends LitElement {
let countReward41 = (countReward40).toString();
return "" + countReward41;
} else if (this.addressInfo.level === 5) {
- let countReward50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count)).toFixed(8)
- let countReward51 = (countReward50).toString();
- return "" + countReward51;
+ if (this.countForTier4() === "false") {
+ let countReward50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8)
+ let countReward51 = (countReward50).toString();
+ return "" + countReward51;
+ } else {
+ let countReward50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count)).toFixed(8)
+ let countReward51 = (countReward50).toString();
+ return "" + countReward51;
+ }
} else if (this.addressInfo.level === 6) {
- let countReward60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count)).toFixed(8)
- let countReward61 = (countReward60).toString()
- return "" + countReward61
+ if (this.countForTier4() === "false") {
+ let countReward60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8)
+ let countReward61 = (countReward60).toString()
+ return "" + countReward61
+ } else {
+ let countReward60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count)).toFixed(8)
+ let countReward61 = (countReward60).toString()
+ 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
+ if (this.countForTier4() === "false") {
+ let countReward70 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8)
+ let countReward71 = (countReward70).toString()
+ return "" + countReward71
+ } else {
+ 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
+ if (this.countForTier4() === "false") {
+ let countReward80 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count)).toFixed(8)
+ let countReward81 = (countReward80).toString()
+ return "" + countReward81
+ } else {
+ 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()
@@ -748,21 +823,45 @@ class MintingInfo extends LitElement {
let countRewardDay41 = (countRewardDay40).toString()
return "" + countRewardDay41
} 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 countRewardDay51 = (countRewardDay50).toString()
- return "" + countRewardDay51
+ if (this.countForTier4() === "false") {
+ let countRewardDay50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay51 = (countRewardDay50).toString()
+ return "" + countRewardDay51
+ } else {
+ let countRewardDay50 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay51 = (countRewardDay50).toString()
+ return "" + countRewardDay51
+ }
} 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 countRewardDay61 = (countRewardDay60).toString()
- return "" + countRewardDay61
+ if (this.countForTier4() === "false") {
+ let countRewardDay60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay61 = (countRewardDay60).toString()
+ return "" + countRewardDay61
+ } else {
+ let countRewardDay60 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay61 = (countRewardDay60).toString()
+ 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
+ if (this.countForTier4() === "false") {
+ let countRewardDay70 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay71 = (countRewardDay70).toString()
+ return "" + countRewardDay71
+ } else {
+ 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
+ if (this.countForTier4() === "false") {
+ let countRewardDay80 = ((this._blockReward() / 100 * this._tierPercent()) / (this.addressLevel[5].count + this.addressLevel[6].count + this.addressLevel[7].count + this.addressLevel[8].count) * this._timeCalc()).toFixed(8)
+ let countRewardDay81 = (countRewardDay80).toString()
+ return "" + countRewardDay81
+ } else {
+ 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()
From 2862bba7058268386e00d72371bc26d1ed6c2585 Mon Sep 17 00:00:00 2001
From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com>
Date: Mon, 3 Oct 2022 16:04:48 +0200
Subject: [PATCH 11/16] Update deps
---
package.json | 4 ++--
qortal-ui-core/package.json | 16 ++++++++--------
qortal-ui-crypto/package.json | 2 +-
qortal-ui-plugins/package.json | 12 ++++++------
4 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/package.json b/package.json
index 5d6a6ddd..beebc156 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
"electron-log": "4.4.8"
},
"devDependencies": {
- "electron": "20.1.4",
+ "electron": "21.0.1",
"electron-builder": "23.3.3",
"electron-notarize": "1.2.1",
"electron-packager": "16.0.0",
@@ -45,4 +45,4 @@
"engines": {
"node": ">=14.17.0"
}
-}
+}
\ No newline at end of file
diff --git a/qortal-ui-core/package.json b/qortal-ui-core/package.json
index 6f055873..84851fbc 100644
--- a/qortal-ui-core/package.json
+++ b/qortal-ui-core/package.json
@@ -1,6 +1,6 @@
{
"name": "qortal-ui-core",
- "version": "2.2.2",
+ "version": "2.2.3",
"description": "QORTAL-UI Core",
"keywords": [
"QORT",
@@ -19,10 +19,10 @@
"dependencies": {
"@hapi/hapi": "20.2.2",
"@hapi/inert": "7.0.0",
- "sass": "1.54.9"
+ "sass": "1.55.0"
},
"devDependencies": {
- "@babel/core": "7.19.1",
+ "@babel/core": "7.19.3",
"@material/mwc-button": "0.27.0",
"@material/mwc-checkbox": "0.27.0",
"@material/mwc-dialog": "0.27.0",
@@ -58,21 +58,21 @@
"@rollup/plugin-commonjs": "22.0.2",
"@rollup/plugin-node-resolve": "14.1.0",
"@rollup/plugin-replace": "4.0.0",
- "@vaadin/grid": "23.2.1",
- "@vaadin/icons": "23.2.1",
- "@vaadin/password-field": "23.2.1",
+ "@vaadin/grid": "23.2.3",
+ "@vaadin/icons": "23.2.3",
+ "@vaadin/password-field": "23.2.3",
"asmcrypto.js": "2.3.2",
"bcryptjs": "2.4.3",
"epml": "0.3.3",
"file-saver": "2.0.5",
"lit": "2.3.1",
"lit-translate": "2.0.1",
- "postcss": "8.4.16",
+ "postcss": "8.4.17",
"pwa-helpers": "0.9.1",
"random-sentence-generator": "0.0.8",
"redux": "4.2.0",
"redux-thunk": "2.4.1",
- "rollup": "2.79.0",
+ "rollup": "2.79.1",
"rollup-plugin-node-globals": "1.4.0",
"rollup-plugin-postcss": "4.0.2",
"rollup-plugin-progress": "1.1.2",
diff --git a/qortal-ui-crypto/package.json b/qortal-ui-crypto/package.json
index 245f9145..683df9d6 100644
--- a/qortal-ui-crypto/package.json
+++ b/qortal-ui-crypto/package.json
@@ -1,6 +1,6 @@
{
"name": "qortal-ui-crypto",
- "version": "2.2.2",
+ "version": "2.2.3",
"description": "QORTAL-UI Crypto",
"keywords": [
"QORT",
diff --git a/qortal-ui-plugins/package.json b/qortal-ui-plugins/package.json
index af41573a..53565cc9 100644
--- a/qortal-ui-plugins/package.json
+++ b/qortal-ui-plugins/package.json
@@ -1,6 +1,6 @@
{
"name": "qortal-ui-plugins",
- "version": "2.2.2",
+ "version": "2.2.3",
"description": "QORTAL-UI Plugins",
"keywords": [
"QORT",
@@ -22,7 +22,7 @@
"emoji-picker-js": "https://github.com/Qortal/emoji-picker-js"
},
"devDependencies": {
- "@babel/core": "7.19.1",
+ "@babel/core": "7.19.3",
"@github/time-elements": "3.1.2",
"@material/mwc-button": "0.27.0",
"@material/mwc-checkbox": "0.27.0",
@@ -46,15 +46,15 @@
"@rollup/plugin-commonjs": "22.0.2",
"@rollup/plugin-node-resolve": "14.1.0",
"@rollup/plugin-replace": "4.0.0",
- "@vaadin/button": "23.2.1",
- "@vaadin/grid": "23.2.1",
- "@vaadin/icons": "23.2.1",
+ "@vaadin/button": "23.2.3",
+ "@vaadin/grid": "23.2.3",
+ "@vaadin/icons": "23.2.3",
"epml": "0.3.3",
"file-saver": "2.0.5",
"html-escaper": "3.0.3",
"lit": "2.3.1",
"lit-translate": "2.0.1",
- "rollup": "2.79.0",
+ "rollup": "2.79.1",
"rollup-plugin-node-globals": "1.4.0",
"rollup-plugin-progress": "1.1.2",
"rollup-plugin-terser": "7.0.2"
From 44e472da0d60ead0182ad16f75334f96bc18749a Mon Sep 17 00:00:00 2001
From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com>
Date: Mon, 3 Oct 2022 16:46:00 +0200
Subject: [PATCH 12/16] Bump version 2.1.1
---
package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index beebc156..4a6c7473 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "qortal-ui",
- "version": "2.1.0",
+ "version": "2.1.1",
"description": "Qortal Project - decentralize the world - Data storage, communications, web hosting, decentralized trading, complete infrastructure for the future blockchain-based Internet",
"keywords": [
"QORT",
@@ -45,4 +45,4 @@
"engines": {
"node": ">=14.17.0"
}
-}
\ No newline at end of file
+}
From 53dd15f8411e1a300dcf040b69adc0ee0ad9f9e8 Mon Sep 17 00:00:00 2001
From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com>
Date: Tue, 18 Oct 2022 18:54:27 +0200
Subject: [PATCH 13/16] Fix memory usage and leak. Set new layouts. Use latest
supoorted node by electron
---
electron.js | 2 +-
package.json | 92 +++++-----
.../config/default.styles.config.js | 4 +-
qortal-ui-core/config/default.user.config.js | 5 +-
qortal-ui-core/package.json | 168 +++++++++---------
qortal-ui-core/src/styles/styles.scss | 7 +-
qortal-ui-crypto/package.json | 52 +++---
qortal-ui-plugins/package.json | 128 ++++++-------
8 files changed, 228 insertions(+), 230 deletions(-)
diff --git a/electron.js b/electron.js
index 0f02b952..df85e7d8 100644
--- a/electron.js
+++ b/electron.js
@@ -4,7 +4,7 @@ const server = require('./server.js');
const log = require('electron-log');
const path = require('path');
-// THOUGHTS: Make this APP more modularize and platform agnostic...
+app.commandLine.appendSwitch('js-flags', '--max-old-space-size=512')
process.env['APP_PATH'] = app.getAppPath();
diff --git a/package.json b/package.json
index 4a6c7473..45c93c74 100644
--- a/package.json
+++ b/package.json
@@ -1,48 +1,48 @@
{
- "name": "qortal-ui",
- "version": "2.1.1",
- "description": "Qortal Project - decentralize the world - Data storage, communications, web hosting, decentralized trading, complete infrastructure for the future blockchain-based Internet",
- "keywords": [
- "QORT",
- "QORTAL",
- "DECENTRALIZED"
- ],
- "main": "electron.js",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/Qortal/qortal-ui.git"
- },
- "homepage": "https://qortal.org",
- "author": "QORTAL ",
- "license": "GPL-3.0",
- "scripts": {
- "install_link:all": "(cd qortal-ui-core && yarn install && yarn link) && (cd qortal-ui-plugins && yarn install && yarn link) && (cd qortal-ui-crypto && yarn install && yarn link) && (yarn link qortal-ui-core && yarn link qortal-ui-plugins && yarn link qortal-ui-crypto)",
- "dev": "node server.js",
- "prebuild": "node -p \"'export const UI_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > qortal-ui-core/src/redux/app/version.js",
- "build-dev": "node build.js",
- "build": "NODE_ENV=production node build.js",
- "server": "NODE_ENV=production node server.js",
- "watch": "node watch.js",
- "watch-inline": "node watch-inline.js",
- "start-electron": "NODE_ENV=production electron .",
- "build-electron": "electron-builder build --publish never",
- "deploy-electron": "electron-builder build --win --publish never",
- "release": "NODE_ENV=production electron-builder build --publish never",
- "update-package-json": "node update-package-json.js",
- "publish": "electron-builder -p always"
- },
- "dependencies": {
- "electron-updater": "5.2.1",
- "electron-log": "4.4.8"
- },
- "devDependencies": {
- "electron": "21.0.1",
- "electron-builder": "23.3.3",
- "electron-notarize": "1.2.1",
- "electron-packager": "16.0.0",
- "shelljs": "0.8.5"
- },
- "engines": {
- "node": ">=14.17.0"
- }
+ "name": "qortal-ui",
+ "version": "2.1.1",
+ "description": "Qortal Project - decentralize the world - Data storage, communications, web hosting, decentralized trading, complete infrastructure for the future blockchain-based Internet",
+ "keywords": [
+ "QORT",
+ "QORTAL",
+ "DECENTRALIZED"
+ ],
+ "main": "electron.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Qortal/qortal-ui.git"
+ },
+ "homepage": "https://qortal.org",
+ "author": "QORTAL ",
+ "license": "GPL-3.0",
+ "scripts": {
+ "install_link:all": "(cd qortal-ui-core && yarn install && yarn link) && (cd qortal-ui-plugins && yarn install && yarn link) && (cd qortal-ui-crypto && yarn install && yarn link) && (yarn link qortal-ui-core && yarn link qortal-ui-plugins && yarn link qortal-ui-crypto)",
+ "dev": "node server.js",
+ "prebuild": "node -p \"'export const UI_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > qortal-ui-core/src/redux/app/version.js",
+ "build-dev": "node build.js",
+ "build": "NODE_ENV=production node build.js",
+ "server": "NODE_ENV=production node server.js",
+ "watch": "node watch.js",
+ "watch-inline": "node watch-inline.js",
+ "start-electron": "NODE_ENV=production electron .",
+ "build-electron": "electron-builder build --publish never",
+ "deploy-electron": "electron-builder build --win --publish never",
+ "release": "NODE_ENV=production electron-builder build --publish never",
+ "update-package-json": "node update-package-json.js",
+ "publish": "electron-builder -p always"
+ },
+ "dependencies": {
+ "electron-log": "4.4.8",
+ "electron-updater": "5.2.1"
+ },
+ "devDependencies": {
+ "electron": "21.1.1",
+ "electron-builder": "23.3.3",
+ "electron-notarize": "1.2.1",
+ "electron-packager": "16.0.0",
+ "shelljs": "0.8.5"
+ },
+ "engines": {
+ "node": ">=16.15.0"
+ }
}
diff --git a/qortal-ui-core/config/default.styles.config.js b/qortal-ui-core/config/default.styles.config.js
index ad0a5b04..17123264 100644
--- a/qortal-ui-core/config/default.styles.config.js
+++ b/qortal-ui-core/config/default.styles.config.js
@@ -1,7 +1,8 @@
const styles = {
breakpoints: {
- tablet: '',
desktop: '',
+ laptop: '',
+ tablet: '',
mobile: ''
},
theme: {
@@ -36,5 +37,4 @@ const styles = {
]
}
}
-
module.exports = styles
diff --git a/qortal-ui-core/config/default.user.config.js b/qortal-ui-core/config/default.user.config.js
index 6e8ba573..ee5b8a51 100644
--- a/qortal-ui-core/config/default.user.config.js
+++ b/qortal-ui-core/config/default.user.config.js
@@ -3,7 +3,7 @@ const path = require('path')
const user = {
node: 0,
nodeSettings: {
- pingInterval: 10 * 1000, // (10 secs)
+ pingInterval: 30 * 1000,
},
server: {
writeHosts: {
@@ -27,7 +27,7 @@ const user = {
},
},
constants: {
- pollingInterval: 10000, // How long between checking for new unconfirmed transactions and new blocks (in milliseconds).
+ pollingInterval: 30 * 1000, // How long between checking for new unconfirmed transactions and new blocks (in milliseconds).
workerURL: '/build/worker.js',
},
@@ -43,5 +43,4 @@ const user = {
},
},
}
-
module.exports = user
diff --git a/qortal-ui-core/package.json b/qortal-ui-core/package.json
index 84851fbc..b293210f 100644
--- a/qortal-ui-core/package.json
+++ b/qortal-ui-core/package.json
@@ -1,85 +1,85 @@
{
- "name": "qortal-ui-core",
- "version": "2.2.3",
- "description": "QORTAL-UI Core",
- "keywords": [
- "QORT",
- "QORTAL",
- "DECENTRALIZED"
- ],
- "homepage": "https://qortal.org",
- "main": "ui-core.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/Qortal/qortal-ui.git",
- "directory": "qortal-ui-core"
- },
- "author": "QORTAL ",
- "license": "GPL-3.0",
- "dependencies": {
- "@hapi/hapi": "20.2.2",
- "@hapi/inert": "7.0.0",
- "sass": "1.55.0"
- },
- "devDependencies": {
- "@babel/core": "7.19.3",
- "@material/mwc-button": "0.27.0",
- "@material/mwc-checkbox": "0.27.0",
- "@material/mwc-dialog": "0.27.0",
- "@material/mwc-drawer": "0.27.0",
- "@material/mwc-fab": "0.27.0",
- "@material/mwc-formfield": "0.27.0",
- "@material/mwc-icon": "0.27.0",
- "@material/mwc-icon-button": "0.27.0",
- "@material/mwc-list": "0.27.0",
- "@material/mwc-select": "0.27.0",
- "@material/mwc-snackbar": "0.27.0",
- "@material/mwc-textfield": "0.27.0",
- "@polymer/app-layout": "3.1.0",
- "@polymer/iron-collapse": "3.0.1",
- "@polymer/iron-flex-layout": "3.0.1",
- "@polymer/iron-icons": "3.0.1",
- "@polymer/iron-pages": "3.0.1",
- "@polymer/paper-button": "3.0.1",
- "@polymer/paper-checkbox": "3.1.0",
- "@polymer/paper-dialog": "3.0.1",
- "@polymer/paper-dropdown-menu": "3.2.0",
- "@polymer/paper-icon-button": "3.0.2",
- "@polymer/paper-input": "3.2.1",
- "@polymer/paper-item": "3.0.1",
- "@polymer/paper-listbox": "3.0.1",
- "@polymer/paper-progress": "3.0.1",
- "@polymer/paper-ripple": "3.0.2",
- "@polymer/paper-spinner": "3.0.2",
- "@polymer/paper-toast": "3.0.1",
- "@polymer/paper-tooltip": "3.0.1",
- "@rollup/plugin-alias": "3.1.9",
- "@rollup/plugin-babel": "5.3.1",
- "@rollup/plugin-commonjs": "22.0.2",
- "@rollup/plugin-node-resolve": "14.1.0",
- "@rollup/plugin-replace": "4.0.0",
- "@vaadin/grid": "23.2.3",
- "@vaadin/icons": "23.2.3",
- "@vaadin/password-field": "23.2.3",
- "asmcrypto.js": "2.3.2",
- "bcryptjs": "2.4.3",
- "epml": "0.3.3",
- "file-saver": "2.0.5",
- "lit": "2.3.1",
- "lit-translate": "2.0.1",
- "postcss": "8.4.17",
- "pwa-helpers": "0.9.1",
- "random-sentence-generator": "0.0.8",
- "redux": "4.2.0",
- "redux-thunk": "2.4.1",
- "rollup": "2.79.1",
- "rollup-plugin-node-globals": "1.4.0",
- "rollup-plugin-postcss": "4.0.2",
- "rollup-plugin-progress": "1.1.2",
- "rollup-plugin-scss": "3.0.0",
- "rollup-plugin-terser": "7.0.2"
- },
- "engines": {
- "node": ">=14.17.0"
- }
-}
\ No newline at end of file
+ "name": "qortal-ui-core",
+ "version": "2.2.3",
+ "description": "QORTAL-UI Core",
+ "keywords": [
+ "QORT",
+ "QORTAL",
+ "DECENTRALIZED"
+ ],
+ "homepage": "https://qortal.org",
+ "main": "ui-core.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Qortal/qortal-ui.git",
+ "directory": "qortal-ui-core"
+ },
+ "author": "QORTAL ",
+ "license": "GPL-3.0",
+ "dependencies": {
+ "@hapi/hapi": "20.2.2",
+ "@hapi/inert": "7.0.0",
+ "sass": "1.55.0"
+ },
+ "devDependencies": {
+ "@babel/core": "7.19.3",
+ "@material/mwc-button": "0.27.0",
+ "@material/mwc-checkbox": "0.27.0",
+ "@material/mwc-dialog": "0.27.0",
+ "@material/mwc-drawer": "0.27.0",
+ "@material/mwc-fab": "0.27.0",
+ "@material/mwc-formfield": "0.27.0",
+ "@material/mwc-icon": "0.27.0",
+ "@material/mwc-icon-button": "0.27.0",
+ "@material/mwc-list": "0.27.0",
+ "@material/mwc-select": "0.27.0",
+ "@material/mwc-snackbar": "0.27.0",
+ "@material/mwc-textfield": "0.27.0",
+ "@polymer/app-layout": "3.1.0",
+ "@polymer/iron-collapse": "3.0.1",
+ "@polymer/iron-flex-layout": "3.0.1",
+ "@polymer/iron-icons": "3.0.1",
+ "@polymer/iron-pages": "3.0.1",
+ "@polymer/paper-button": "3.0.1",
+ "@polymer/paper-checkbox": "3.1.0",
+ "@polymer/paper-dialog": "3.0.1",
+ "@polymer/paper-dropdown-menu": "3.2.0",
+ "@polymer/paper-icon-button": "3.0.2",
+ "@polymer/paper-input": "3.2.1",
+ "@polymer/paper-item": "3.0.1",
+ "@polymer/paper-listbox": "3.0.1",
+ "@polymer/paper-progress": "3.0.1",
+ "@polymer/paper-ripple": "3.0.2",
+ "@polymer/paper-spinner": "3.0.2",
+ "@polymer/paper-toast": "3.0.1",
+ "@polymer/paper-tooltip": "3.0.1",
+ "@rollup/plugin-alias": "4.0.0",
+ "@rollup/plugin-babel": "6.0.0",
+ "@rollup/plugin-commonjs": "23.0.0",
+ "@rollup/plugin-node-resolve": "15.0.0",
+ "@rollup/plugin-replace": "5.0.0",
+ "@vaadin/grid": "23.2.5",
+ "@vaadin/icons": "23.2.5",
+ "@vaadin/password-field": "23.2.5",
+ "asmcrypto.js": "2.3.2",
+ "bcryptjs": "2.4.3",
+ "epml": "0.3.3",
+ "file-saver": "2.0.5",
+ "lit": "2.4.0",
+ "lit-translate": "2.0.1",
+ "postcss": "8.4.18",
+ "pwa-helpers": "0.9.1",
+ "random-sentence-generator": "0.0.8",
+ "redux": "4.2.0",
+ "redux-thunk": "2.4.1",
+ "rollup": "2.79.1",
+ "rollup-plugin-node-globals": "1.4.0",
+ "rollup-plugin-postcss": "4.0.2",
+ "rollup-plugin-progress": "1.1.2",
+ "rollup-plugin-scss": "3.0.0",
+ "rollup-plugin-terser": "7.0.2"
+ },
+ "engines": {
+ "node": ">=16.15.0"
+ }
+}
diff --git a/qortal-ui-core/src/styles/styles.scss b/qortal-ui-core/src/styles/styles.scss
index da6a76ae..8fff0d28 100644
--- a/qortal-ui-core/src/styles/styles.scss
+++ b/qortal-ui-core/src/styles/styles.scss
@@ -1,6 +1,7 @@
$mdc-layout-grid-breakpoints: (
- desktop: 960px,
- tablet: 480px,
+ desktop: 1440px,
+ laptop: 1240px,
+ tablet: 600px,
phone: 0px
);
@@ -10,8 +11,6 @@ $mdc-layout-grid-breakpoints: (
--layout-breakpoint-mobile: #{map-get($mdc-layout-grid-breakpoints, phone)};
}
-// @import '../../node_modules/@material/layout-grid/mdc-layout-grid.scss';
-
iframe.pluginJSFrame {
display:none;
}
diff --git a/qortal-ui-crypto/package.json b/qortal-ui-crypto/package.json
index 683df9d6..b1814e00 100644
--- a/qortal-ui-crypto/package.json
+++ b/qortal-ui-crypto/package.json
@@ -1,28 +1,28 @@
{
- "name": "qortal-ui-crypto",
- "version": "2.2.3",
- "description": "QORTAL-UI Crypto",
- "keywords": [
- "QORT",
- "QORTAL",
- "DECENTRALIZED"
- ],
- "homepage": "https://qortal.org",
- "main": "api.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/Qortal/qortal-ui.git",
- "directory": "qortal-ui-crypto"
- },
- "author": "QORTAL ",
- "license": "GPL-3.0",
- "dependencies": {
- "asmcrypto.js": "2.3.2",
- "buffer": "6.0.3",
- "jssha": "3.2.0",
- "lodash": "4.17.21"
- },
- "engines": {
- "node": ">=14.17.0"
- }
+ "name": "qortal-ui-crypto",
+ "version": "2.2.3",
+ "description": "QORTAL-UI Crypto",
+ "keywords": [
+ "QORT",
+ "QORTAL",
+ "DECENTRALIZED"
+ ],
+ "homepage": "https://qortal.org",
+ "main": "api.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Qortal/qortal-ui.git",
+ "directory": "qortal-ui-crypto"
+ },
+ "author": "QORTAL ",
+ "license": "GPL-3.0",
+ "dependencies": {
+ "asmcrypto.js": "2.3.2",
+ "buffer": "6.0.3",
+ "jssha": "3.2.0",
+ "lodash": "4.17.21"
+ },
+ "engines": {
+ "node": ">=16.15.0"
+ }
}
diff --git a/qortal-ui-plugins/package.json b/qortal-ui-plugins/package.json
index 53565cc9..39a9a740 100644
--- a/qortal-ui-plugins/package.json
+++ b/qortal-ui-plugins/package.json
@@ -1,65 +1,65 @@
{
- "name": "qortal-ui-plugins",
- "version": "2.2.3",
- "description": "QORTAL-UI Plugins",
- "keywords": [
- "QORT",
- "QORTAL",
- "DECENTRALIZED"
- ],
- "homepage": "https://qortal.org",
- "main": "default-plugins.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/Qortal/qortal-ui.git",
- "directory": "qortal-ui-plugins"
- },
- "author": "QORTAL ",
- "license": "GPL-3.0",
- "dependencies": {
- "@material/mwc-list": "0.27.0",
- "@material/mwc-select": "0.27.0",
- "emoji-picker-js": "https://github.com/Qortal/emoji-picker-js"
- },
- "devDependencies": {
- "@babel/core": "7.19.3",
- "@github/time-elements": "3.1.2",
- "@material/mwc-button": "0.27.0",
- "@material/mwc-checkbox": "0.27.0",
- "@material/mwc-dialog": "0.27.0",
- "@material/mwc-formfield": "0.27.0",
- "@material/mwc-icon": "0.27.0",
- "@material/mwc-icon-button": "0.27.0",
- "@material/mwc-slider": "0.27.0",
- "@material/mwc-snackbar": "0.27.0",
- "@material/mwc-tab": "0.27.0",
- "@material/mwc-tab-bar": "0.27.0",
- "@material/mwc-textfield": "0.27.0",
- "@polymer/iron-icons": "3.0.1",
- "@polymer/paper-icon-button": "3.0.2",
- "@polymer/paper-progress": "3.0.1",
- "@polymer/paper-slider": "3.0.1",
- "@polymer/paper-spinner": "3.0.2",
- "@polymer/paper-tooltip": "3.0.1",
- "@rollup/plugin-alias": "3.1.9",
- "@rollup/plugin-babel": "5.3.1",
- "@rollup/plugin-commonjs": "22.0.2",
- "@rollup/plugin-node-resolve": "14.1.0",
- "@rollup/plugin-replace": "4.0.0",
- "@vaadin/button": "23.2.3",
- "@vaadin/grid": "23.2.3",
- "@vaadin/icons": "23.2.3",
- "epml": "0.3.3",
- "file-saver": "2.0.5",
- "html-escaper": "3.0.3",
- "lit": "2.3.1",
- "lit-translate": "2.0.1",
- "rollup": "2.79.1",
- "rollup-plugin-node-globals": "1.4.0",
- "rollup-plugin-progress": "1.1.2",
- "rollup-plugin-terser": "7.0.2"
- },
- "engines": {
- "node": ">=14.17.0"
- }
-}
\ No newline at end of file
+ "name": "qortal-ui-plugins",
+ "version": "2.2.3",
+ "description": "QORTAL-UI Plugins",
+ "keywords": [
+ "QORT",
+ "QORTAL",
+ "DECENTRALIZED"
+ ],
+ "homepage": "https://qortal.org",
+ "main": "default-plugins.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Qortal/qortal-ui.git",
+ "directory": "qortal-ui-plugins"
+ },
+ "author": "QORTAL ",
+ "license": "GPL-3.0",
+ "dependencies": {
+ "@material/mwc-list": "0.27.0",
+ "@material/mwc-select": "0.27.0",
+ "emoji-picker-js": "https://github.com/Qortal/emoji-picker-js"
+ },
+ "devDependencies": {
+ "@babel/core": "7.19.3",
+ "@github/time-elements": "3.1.2",
+ "@material/mwc-button": "0.27.0",
+ "@material/mwc-checkbox": "0.27.0",
+ "@material/mwc-dialog": "0.27.0",
+ "@material/mwc-formfield": "0.27.0",
+ "@material/mwc-icon": "0.27.0",
+ "@material/mwc-icon-button": "0.27.0",
+ "@material/mwc-slider": "0.27.0",
+ "@material/mwc-snackbar": "0.27.0",
+ "@material/mwc-tab": "0.27.0",
+ "@material/mwc-tab-bar": "0.27.0",
+ "@material/mwc-textfield": "0.27.0",
+ "@polymer/iron-icons": "3.0.1",
+ "@polymer/paper-icon-button": "3.0.2",
+ "@polymer/paper-progress": "3.0.1",
+ "@polymer/paper-slider": "3.0.1",
+ "@polymer/paper-spinner": "3.0.2",
+ "@polymer/paper-tooltip": "3.0.1",
+ "@rollup/plugin-alias": "4.0.0",
+ "@rollup/plugin-babel": "6.0.0",
+ "@rollup/plugin-commonjs": "23.0.0",
+ "@rollup/plugin-node-resolve": "15.0.0",
+ "@rollup/plugin-replace": "5.0.0",
+ "@vaadin/button": "23.2.5",
+ "@vaadin/grid": "23.2.5",
+ "@vaadin/icons": "23.2.5",
+ "epml": "0.3.3",
+ "file-saver": "2.0.5",
+ "html-escaper": "3.0.3",
+ "lit": "2.4.0",
+ "lit-translate": "2.0.1",
+ "rollup": "2.79.1",
+ "rollup-plugin-node-globals": "1.4.0",
+ "rollup-plugin-progress": "1.1.2",
+ "rollup-plugin-terser": "7.0.2"
+ },
+ "engines": {
+ "node": ">=16.15.0"
+ }
+}
From 10d47b4f189f6ca0b5203e8eafa1682b8cbe90fd Mon Sep 17 00:00:00 2001
From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com>
Date: Tue, 18 Oct 2022 18:59:02 +0200
Subject: [PATCH 14/16] Use latest supported nodejs
---
README.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index b990640e..c27b7348 100644
--- a/README.md
+++ b/README.md
@@ -26,8 +26,9 @@ Easiest way to install the lastest required packages on Linux is via nvm.
``` source ~/.profile ``` (For Debian based distro)
``` source ~/.bashrc ``` (For Fedora / CentOS)
``` nvm ls-remote ``` (Fetch list of available versions)
-``` nvm install v16.14.2 ``` (LTS: Gallium supported by Electron)
-``` npm -g install yarn ```
+``` nvm install v16.16.0 ``` (LTS: Gallium supported by Electron)
+``` npm --location=global install yarn ```
+``` npm --location=global install npm@8.19.2 ```
On BSD do a ``` pkg_add node followed by npm install -g yarn ```
From aa5842b94083b21748fb04a53da02ddfa2462f46 Mon Sep 17 00:00:00 2001
From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com>
Date: Wed, 19 Oct 2022 12:24:47 +0200
Subject: [PATCH 15/16] Fix lit import and delete not needed console logs
---
.../plugins/core/components/ChatModals.js | 4 +-
.../plugins/core/components/ChatPage.js | 12 ----
.../group-management/group-management.src.js | 63 +++++++------------
.../group-transaction.src.js | 1 -
.../name-registration.src.js | 21 +++----
.../plugins/core/puzzles/puzzles.src.js | 1 -
.../plugins/core/qdn/browser/browser.src.js | 1 -
.../sponsorship-list/sponsorship-list.src.js | 1 -
.../core/trade-portal/trade-portal.src.js | 1 -
.../plugins/core/wallet/wallet-app.src.js | 2 +-
10 files changed, 35 insertions(+), 72 deletions(-)
diff --git a/qortal-ui-plugins/plugins/core/components/ChatModals.js b/qortal-ui-plugins/plugins/core/components/ChatModals.js
index 5b1a6712..c1ce0b2d 100644
--- a/qortal-ui-plugins/plugins/core/components/ChatModals.js
+++ b/qortal-ui-plugins/plugins/core/components/ChatModals.js
@@ -1,4 +1,5 @@
-import { LitElement, html, css} from 'lit-element';
+import { LitElement, html, css } from 'lit';
+import { render } from 'lit/html.js';
import { get, translate } from 'lit-translate';
import { Epml } from '../../../epml';
import snackbar from './snackbar.js'
@@ -336,7 +337,6 @@ class ChatModals extends LitElement {
dismiss: true
})
}
- console.log({ret})
return ret
}
diff --git a/qortal-ui-plugins/plugins/core/components/ChatPage.js b/qortal-ui-plugins/plugins/core/components/ChatPage.js
index 69d18120..aba20938 100644
--- a/qortal-ui-plugins/plugins/core/components/ChatPage.js
+++ b/qortal-ui-plugins/plugins/core/components/ChatPage.js
@@ -342,17 +342,7 @@ class ChatPage extends LitElement {
// TODO: Determine number of initial messages by screen height...
this._messages.length <= 15 ? adjustMessages() : this._initialMessages = this._messages.splice(this._messages.length - 15);
-
this.messagesRendered = this._initialMessages
-
- // try {
- // const viewElement = this.shadowRoot.querySelector('chat-scroller')
- // console.log({viewElement})
- // // viewElement.scrollTop = this.viewElement.scrollHeight + 50
- // } catch (error) {
- // console.error(error)
- // }
-
this.isLoadingMessages = false
setTimeout(() => this.downElementObserver(), 500)
@@ -551,7 +541,6 @@ class ChatPage extends LitElement {
// Error Event
directSocket.onerror = (e) => {
clearTimeout(directSocketTimeout)
- console.log(`[DIRECT-SOCKET ==> ${cid}]: ${e.type}`);
}
const pingDirectSocket = () => {
@@ -613,7 +602,6 @@ class ChatPage extends LitElement {
// Error Event
groupSocket.onerror = (e) => {
clearTimeout(groupSocketTimeout)
- console.log(`[GROUP-SOCKET ==> ${groupId}]: ${e.type}`);
}
const pingGroupSocket = () => {
diff --git a/qortal-ui-plugins/plugins/core/group-management/group-management.src.js b/qortal-ui-plugins/plugins/core/group-management/group-management.src.js
index 5c60519b..ee4eedc3 100644
--- a/qortal-ui-plugins/plugins/core/group-management/group-management.src.js
+++ b/qortal-ui-plugins/plugins/core/group-management/group-management.src.js
@@ -588,57 +588,42 @@ class GroupManagement extends LitElement {
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
const url = `${nodeUrl}/transactions/unitfee?txType=CREATE_GROUP`;
- await fetch(url)
- .then((response) => {
- if (response.ok) {
- return response.json();
- }
- return Promise.reject(response);
- })
- .then((json) => {
- this.createFee = (Number(json) / 1e8).toFixed(8);
- })
- .catch((response) => {
- console.log(response.status, response.statusText, 'Need Core Update');
- })
+ await fetch(url).then((response) => {
+ if (response.ok) {
+ return response.json();
+ }
+ return Promise.reject(response);
+ }).then((json) => {
+ this.createFee = (Number(json) / 1e8).toFixed(8);
+ })
}
async unitJoinFee() {
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
const url = `${nodeUrl}/transactions/unitfee?txType=JOIN_GROUP`;
- await fetch(url)
- .then((response) => {
- if (response.ok) {
- return response.json();
- }
- return Promise.reject(response);
- })
- .then((json) => {
- this.joinFee = (Number(json) / 1e8).toFixed(8);
- })
- .catch((response) => {
- console.log(response.status, response.statusText, 'Need Core Update');
- })
+ await fetch(url).then((response) => {
+ if (response.ok) {
+ return response.json();
+ }
+ return Promise.reject(response);
+ }).then((json) => {
+ this.joinFee = (Number(json) / 1e8).toFixed(8);
+ })
}
async unitLeaveFee() {
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
const url = `${nodeUrl}/transactions/unitfee?txType=LEAVE_GROUP`;
- await fetch(url)
- .then((response) => {
- if (response.ok) {
- return response.json();
- }
- return Promise.reject(response);
- })
- .then((json) => {
- this.leaveFee = (Number(json) / 1e8).toFixed(8);
- })
- .catch((response) => {
- console.log(response.status, response.statusText, 'Need Core Update');
- })
+ await fetch(url).then((response) => {
+ if (response.ok) {
+ return response.json();
+ }
+ return Promise.reject(response);
+ }).then((json) => {
+ this.leaveFee = (Number(json) / 1e8).toFixed(8);
+ })
}
resetDefaultSettings() {
diff --git a/qortal-ui-plugins/plugins/core/group-management/group-transaction/group-transaction.src.js b/qortal-ui-plugins/plugins/core/group-management/group-transaction/group-transaction.src.js
index efb84a23..3031734c 100644
--- a/qortal-ui-plugins/plugins/core/group-management/group-transaction/group-transaction.src.js
+++ b/qortal-ui-plugins/plugins/core/group-management/group-transaction/group-transaction.src.js
@@ -136,7 +136,6 @@ class GroupTransaction extends LitElement {
let splitedUrl = decodeTempUrl.split('?')
let myGroupId = splitedUrl[1]
this.addMintingAccountMessage = myGroupId
- console.log(myGroupId);
}
getGroupIdFromURL()
diff --git a/qortal-ui-plugins/plugins/core/name-registration/name-registration.src.js b/qortal-ui-plugins/plugins/core/name-registration/name-registration.src.js
index ab6bc92d..944d670b 100644
--- a/qortal-ui-plugins/plugins/core/name-registration/name-registration.src.js
+++ b/qortal-ui-plugins/plugins/core/name-registration/name-registration.src.js
@@ -288,19 +288,14 @@ class NameRegistration extends LitElement {
const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node];
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
const url = `${nodeUrl}/transactions/unitfee?txType=REGISTER_NAME`;
- await fetch(url)
- .then((response) => {
- if (response.ok) {
- return response.json();
- }
- return Promise.reject(response);
- })
- .then((json) => {
- this.fee = (Number(json) / 1e8).toFixed(2);
- })
- .catch((response) => {
- console.log(response.status, response.statusText, this.renderCoreText());
- })
+ await fetch(url).then((response) => {
+ if (response.ok) {
+ return response.json();
+ }
+ return Promise.reject(response);
+ }).then((json) => {
+ this.fee = (Number(json) / 1e8).toFixed(2);
+ })
}
getApiKey() {
diff --git a/qortal-ui-plugins/plugins/core/puzzles/puzzles.src.js b/qortal-ui-plugins/plugins/core/puzzles/puzzles.src.js
index 522f90ba..27fe74e0 100644
--- a/qortal-ui-plugins/plugins/core/puzzles/puzzles.src.js
+++ b/qortal-ui-plugins/plugins/core/puzzles/puzzles.src.js
@@ -437,7 +437,6 @@ class Puzzles extends LitElement {
let _guessAddress = publicKeyToAddress(_keyPair.publicKey)
- console.log("Guess '" + _guessAddress + "' vs puzzle's address '" + this.selectedPuzzle.address + "'")
if (_guessAddress !== this.selectedPuzzle.address) {
this.error = true
this.message = this.renderErr1Text()
diff --git a/qortal-ui-plugins/plugins/core/qdn/browser/browser.src.js b/qortal-ui-plugins/plugins/core/qdn/browser/browser.src.js
index 64bcaf7c..283e07f3 100644
--- a/qortal-ui-plugins/plugins/core/qdn/browser/browser.src.js
+++ b/qortal-ui-plugins/plugins/core/qdn/browser/browser.src.js
@@ -140,7 +140,6 @@ class WebBrowser extends LitElement {
url: `/render/authorize/${this.name}?apiKey=${this.getApiKey()}`,
method: "POST"
}).then(res => {
- console.log(res)
if (res.error) {
// Authorization problem - API key incorrect?
}
diff --git a/qortal-ui-plugins/plugins/core/sponsorship-list/sponsorship-list.src.js b/qortal-ui-plugins/plugins/core/sponsorship-list/sponsorship-list.src.js
index 94581e5d..a4cf94e0 100644
--- a/qortal-ui-plugins/plugins/core/sponsorship-list/sponsorship-list.src.js
+++ b/qortal-ui-plugins/plugins/core/sponsorship-list/sponsorship-list.src.js
@@ -219,7 +219,6 @@ class SponsorshipList extends LitElement {
}
} catch (error) {
- console.log({error})
this.isPageLoading = false
}
diff --git a/qortal-ui-plugins/plugins/core/trade-portal/trade-portal.src.js b/qortal-ui-plugins/plugins/core/trade-portal/trade-portal.src.js
index fe631050..d8fdc5e2 100644
--- a/qortal-ui-plugins/plugins/core/trade-portal/trade-portal.src.js
+++ b/qortal-ui-plugins/plugins/core/trade-portal/trade-portal.src.js
@@ -1270,7 +1270,6 @@ class TradePortal extends LitElement {
}
async fetchWalletAddress(coin) {
- console.log("fetchWalletAddress: " + coin)
switch (coin) {
case 'PIRATECHAIN':
let res = await parentEpml.request('apiCall', {
diff --git a/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js b/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js
index 35952e8c..b89b15b4 100644
--- a/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js
+++ b/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js
@@ -4449,7 +4449,7 @@ class MultiWallet extends LitElement {
}
const arrrSortedTransactions = arrrTxs.sort(arrrCompareFn)
- console.log(arrrSortedTransactions)
+
if (this._selectedWallet == coin) {
this.wallets.get(this._selectedWallet).transactions = arrrSortedTransactions
}
From d9b1ec488b69edde2c8a515cef36822d65158ff6 Mon Sep 17 00:00:00 2001
From: CalDescent <>
Date: Sat, 22 Oct 2022 13:16:17 +0100
Subject: [PATCH 16/16] Added chatReference to ChatTransaction and
GroupChatTransaction.
Since this affects transaction serialization, it will need to take effect from a future undecided timestamp (defined in constants.js), and both core & UI will need to share the same timestamp.
The feature trigger timestamp comparisons can be removed 24 hours (or more) post-activation. This is because CHAT messages are currently discarded after 24 hours so we don't need to maintain backwards support of the old serialization approach. The feature trigger is only to ensure full chat operation during the 24 hours that the switchover occurs.
---
qortal-ui-crypto/api/constants.js | 6 ++++--
.../api/transactions/chat/ChatTransaction.js | 20 +++++++++++++++++++
.../transactions/chat/GroupChatTransaction.js | 20 +++++++++++++++++++
.../plugins/core/components/ChatModals.js | 1 +
.../plugins/core/components/ChatPage.js | 2 ++
.../core/components/ChatWelcomePage.js | 1 +
.../plugins/core/components/NameMenu.js | 1 +
.../core/messaging/q-chat/q-chat.src.js | 1 +
8 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/qortal-ui-crypto/api/constants.js b/qortal-ui-crypto/api/constants.js
index 1909fffc..b3fa7cd4 100644
--- a/qortal-ui-crypto/api/constants.js
+++ b/qortal-ui-crypto/api/constants.js
@@ -249,6 +249,8 @@ const ERROR_CODES = {
1000: "Not yet released."
}
+const CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP = 9999999999999
+
const QORT_DECIMALS = 1e8
const PROXY_URL = "/proxy/" // Proxy for api calls
@@ -265,7 +267,7 @@ const STATIC_BCRYPT_SALT = `$${BCRYPT_VERSION}$${BCRYPT_ROUNDS}$IxVE941tXVUD4cW0
const KDF_THREADS = 16 // 16 Threads seems like a good number :) . No you dumbass nigerian. Its not ! -_-
-export { TX_TYPES, ERROR_CODES, QORT_DECIMALS, PROXY_URL, STATIC_SALT, ADDRESS_VERSION, KDF_THREADS, STATIC_BCRYPT_SALT }
+export { TX_TYPES, ERROR_CODES, QORT_DECIMALS, PROXY_URL, STATIC_SALT, ADDRESS_VERSION, KDF_THREADS, STATIC_BCRYPT_SALT, CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP }
//const TX_TYPES = {
// GENESIS_TRANSACTION: 1,
@@ -291,4 +293,4 @@ export { TX_TYPES, ERROR_CODES, QORT_DECIMALS, PROXY_URL, STATIC_SALT, ADDRESS_V
// DEPLOY_AT_TRANSACTION: 16,
//
// MESSAGE_TRANSACTION: 17
-//};
\ No newline at end of file
+//};
diff --git a/qortal-ui-crypto/api/transactions/chat/ChatTransaction.js b/qortal-ui-crypto/api/transactions/chat/ChatTransaction.js
index 6e6dcfd4..a53a0f81 100644
--- a/qortal-ui-crypto/api/transactions/chat/ChatTransaction.js
+++ b/qortal-ui-crypto/api/transactions/chat/ChatTransaction.js
@@ -3,6 +3,7 @@ import ChatBase from "./ChatBase.js"
import nacl from '../../deps/nacl-fast.js'
import ed2curve from '../../deps/ed2curve.js'
import { Sha256 } from 'asmcrypto.js'
+import { CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP } from '../../constants.js'
export default class ChatTransaction extends ChatBase {
@@ -29,6 +30,15 @@ export default class ChatTransaction extends ChatBase {
this._hasReceipient[0] = 1
}
+ set hasChatReference(hasChatReference) {
+ this._hasChatReference = new Uint8Array(1)
+ this._hasChatReference[0] = hasChatReference
+ }
+
+ set chatReference(chatReference) {
+ this._chatReference = chatReference instanceof Uint8Array ? chatReference : this.constructor.Base58.decode(chatReference)
+ }
+
set message(message) {
this.messageText = message;
@@ -72,6 +82,16 @@ export default class ChatTransaction extends ChatBase {
this._isText,
this._feeBytes
)
+
+ // After the feature trigger timestamp we need to include chat reference
+ if (new Date(this._timestamp).getTime() >= CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP) {
+ params.push(this._hasChatReference)
+
+ if (this._hasChatReference[0] == 1) {
+ params.push(this._chatReference)
+ }
+ }
+
return params;
}
}
diff --git a/qortal-ui-crypto/api/transactions/chat/GroupChatTransaction.js b/qortal-ui-crypto/api/transactions/chat/GroupChatTransaction.js
index efbd97b0..4f0f2386 100644
--- a/qortal-ui-crypto/api/transactions/chat/GroupChatTransaction.js
+++ b/qortal-ui-crypto/api/transactions/chat/GroupChatTransaction.js
@@ -1,5 +1,6 @@
"use strict";
import ChatBase from "./ChatBase.js"
+import { CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP } from '../../constants.js'
export default class GroupChatTransaction extends ChatBase {
constructor() {
@@ -18,6 +19,15 @@ export default class GroupChatTransaction extends ChatBase {
this._hasReceipient[0] = hasReceipient
}
+ set hasChatReference(hasChatReference) {
+ this._hasChatReference = new Uint8Array(1)
+ this._hasChatReference[0] = hasChatReference
+ }
+
+ set chatReference(chatReference) {
+ this._chatReference = chatReference instanceof Uint8Array ? chatReference : this.constructor.Base58.decode(chatReference)
+ }
+
set message(message) {
this.messageText = message;
@@ -47,6 +57,16 @@ export default class GroupChatTransaction extends ChatBase {
this._isText,
this._feeBytes
)
+
+ // After the feature trigger timestamp we need to include chat reference
+ if (new Date(this._timestamp).getTime() >= CHAT_REFERENCE_FEATURE_TRIGGER_TIMESTAMP) {
+ params.push(this._hasChatReference)
+
+ if (this._hasChatReference[0] == 1) {
+ params.push(this._chatReference)
+ }
+ }
+
return params;
}
}
diff --git a/qortal-ui-plugins/plugins/core/components/ChatModals.js b/qortal-ui-plugins/plugins/core/components/ChatModals.js
index c1ce0b2d..ab772335 100644
--- a/qortal-ui-plugins/plugins/core/components/ChatModals.js
+++ b/qortal-ui-plugins/plugins/core/components/ChatModals.js
@@ -183,6 +183,7 @@ class ChatModals extends LitElement {
timestamp: sendTimestamp,
recipient: recipient,
recipientPublicKey: _publicKey,
+ hasChatReference: 0,
message: messageText,
lastReference: reference,
proofOfWorkNonce: 0,
diff --git a/qortal-ui-plugins/plugins/core/components/ChatPage.js b/qortal-ui-plugins/plugins/core/components/ChatPage.js
index aba20938..6c0e192c 100644
--- a/qortal-ui-plugins/plugins/core/components/ChatPage.js
+++ b/qortal-ui-plugins/plugins/core/components/ChatPage.js
@@ -667,6 +667,7 @@ class ChatPage extends LitElement {
timestamp: Date.now(),
recipient: this._chatId,
recipientPublicKey: this._publicKey.key,
+ hasChatReference: 0,
message: messageText,
lastReference: reference,
proofOfWorkNonce: 0,
@@ -684,6 +685,7 @@ class ChatPage extends LitElement {
timestamp: Date.now(),
groupID: Number(this._chatId),
hasReceipient: 0,
+ hasChatReference: 0,
message: messageText,
lastReference: reference,
proofOfWorkNonce: 0,
diff --git a/qortal-ui-plugins/plugins/core/components/ChatWelcomePage.js b/qortal-ui-plugins/plugins/core/components/ChatWelcomePage.js
index 1d9ea9bc..782db47f 100644
--- a/qortal-ui-plugins/plugins/core/components/ChatWelcomePage.js
+++ b/qortal-ui-plugins/plugins/core/components/ChatWelcomePage.js
@@ -410,6 +410,7 @@ class ChatWelcomePage extends LitElement {
timestamp: sendTimestamp,
recipient: recipient,
recipientPublicKey: _publicKey,
+ hasChatReference: 0,
message: messageText,
lastReference: reference,
proofOfWorkNonce: 0,
diff --git a/qortal-ui-plugins/plugins/core/components/NameMenu.js b/qortal-ui-plugins/plugins/core/components/NameMenu.js
index 77472b71..17c39a88 100644
--- a/qortal-ui-plugins/plugins/core/components/NameMenu.js
+++ b/qortal-ui-plugins/plugins/core/components/NameMenu.js
@@ -529,6 +529,7 @@ class NameMenu extends LitElement {
timestamp: sendTimestamp,
recipient: recipient,
recipientPublicKey: _publicKey,
+ hasChatReference: 0,
message: messageText,
lastReference: reference,
proofOfWorkNonce: 0,
diff --git a/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js b/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js
index a6dc0244..0eddc863 100644
--- a/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js
+++ b/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js
@@ -819,6 +819,7 @@ class Chat extends LitElement {
timestamp: sendTimestamp,
recipient: recipient,
recipientPublicKey: _publicKey,
+ hasChatReference: 0,
message: messageText,
lastReference: reference,
proofOfWorkNonce: 0,