4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-11 17:55:51 +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},
lookupAddressValue: {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.lookupPublicAddressValue = ''
this.errorLookup = ''
this.nextEnding = 0
}
render() {
@ -172,7 +174,7 @@ class SponsorshipList extends LitElement {
<p class='text text--bold'>
${translate('sponsorshipspage.schange4')}&nbsp;
<span class='text text--bold--green'>
${this.nextSponsorshipEnding.blocksRemaining}&nbsp;
${this.nextEnding}&nbsp;
</span>
${translate('mintingpage.mchange26')}
</p>
@ -532,9 +534,16 @@ class SponsorshipList extends LitElement {
.filter((sponsorship) => sponsorship.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
const openModal = accountInfoValues.find(s=> s.blocksRemaining <= 0)
const openModal = accountInfoValues.find(s => s.blocksRemaining <= 0)
if(openModal) {
this.shadowRoot.querySelector('#showDialog').show()
}