4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-14 19:25:50 +00:00

Fix sponsorship list

This commit is contained in:
AlphaX-Projects 2023-08-04 17:50:45 +02:00
parent 653a5177e3
commit 9fd38b4d1c

View File

@ -53,7 +53,8 @@ class SponsorshipList extends LitElement {
isOpenDialogPublicKeyLookup: {type: Boolean}, isOpenDialogPublicKeyLookup: {type: Boolean},
lookupAddressValue: {type: String}, lookupAddressValue: {type: String},
lookupPublicAddressValue: {type: String}, lookupPublicAddressValue: {type: String},
errorLookup: {type: String} errorLookup: {type: String},
nextEnding: { type: Number }
} }
} }
@ -80,6 +81,7 @@ class SponsorshipList extends LitElement {
this.lookupAddressValue = '' this.lookupAddressValue = ''
this.lookupPublicAddressValue = '' this.lookupPublicAddressValue = ''
this.errorLookup = '' this.errorLookup = ''
this.nextEnding = 0
} }
render() { render() {
@ -172,7 +174,7 @@ class SponsorshipList extends LitElement {
<p class='text text--bold'> <p class='text text--bold'>
${translate('sponsorshipspage.schange4')}&nbsp; ${translate('sponsorshipspage.schange4')}&nbsp;
<span class='text text--bold--green'> <span class='text text--bold--green'>
${this.nextSponsorshipEnding.blocksRemaining}&nbsp; ${this.nextEnding}&nbsp;
</span> </span>
${translate('mintingpage.mchange26')} ${translate('mintingpage.mchange26')}
</p> </p>
@ -532,9 +534,16 @@ class SponsorshipList extends LitElement {
.filter((sponsorship) => sponsorship.blocksRemaining !== 0) .filter((sponsorship) => sponsorship.blocksRemaining !== 0)
.sort((a, b) => a.blocksRemaining - b.blocksRemaining)[0] .sort((a, b) => a.blocksRemaining - b.blocksRemaining)[0]
if (this.nextSponsorshipEnding === undefined || this.nextSponsorshipEnding.length == 0) {
this.nextEnding = 0
} else {
this.nextEnding = this.nextSponsorshipEnding.blocksRemaining
}
this.isPageLoading = false this.isPageLoading = false
const openModal = accountInfoValues.find(s=> s.blocksRemaining <= 0) const openModal = accountInfoValues.find(s => s.blocksRemaining <= 0)
if(openModal) { if(openModal) {
this.shadowRoot.querySelector('#showDialog').show() this.shadowRoot.querySelector('#showDialog').show()
} }