diff --git a/qortal-ui-plugins/plugins/core/become-minter/become-minter.src.js b/qortal-ui-plugins/plugins/core/become-minter/become-minter.src.js index 06f2c767..db4b02d5 100644 --- a/qortal-ui-plugins/plugins/core/become-minter/become-minter.src.js +++ b/qortal-ui-plugins/plugins/core/become-minter/become-minter.src.js @@ -96,7 +96,7 @@ class BecomeMinter extends LitElement { return mintingAccountData; } - async firstUpdated() { + async atMount() { this.changeLanguage(); this.addressInfo = @@ -125,6 +125,10 @@ class BecomeMinter extends LitElement { } } + async firstUpdated() { + await this.atMount(); + } + async getRewardShareRelationship(recipientAddress) { const myRewardShareArray = await parentEpml.request('apiCall', { type: 'api', @@ -174,7 +178,11 @@ class BecomeMinter extends LitElement { ${isAlreadySponsored ? '' - : html` `} + : html` + + `} ${!isAlreadySponsored ? '' : html` diff --git a/qortal-ui-plugins/plugins/core/become-minter/components/not-sponsored.src.js b/qortal-ui-plugins/plugins/core/become-minter/components/not-sponsored.src.js index 65eb0909..c910415b 100644 --- a/qortal-ui-plugins/plugins/core/become-minter/components/not-sponsored.src.js +++ b/qortal-ui-plugins/plugins/core/become-minter/components/not-sponsored.src.js @@ -15,13 +15,12 @@ import { pageStyles } from '../become-minter-css.src.js'; const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }); // hello class NotSponsored extends LitElement { - static get properties() { - return { - isLoadingSponsorshipKeySubmit: { type: Boolean }, - sponsorshipKeyValue: { type: String }, - addMintingAccountMessage: { type: String }, - }; - } + static properties = { + atMount: { type: Function }, + isLoadingSponsorshipKeySubmit: { type: Boolean }, + sponsorshipKeyValue: { type: String }, + addMintingAccountMessage: { type: String }, + }; static styles = [pageStyles]; @@ -30,6 +29,7 @@ class NotSponsored extends LitElement { this.isLoadingSponsorshipKeySubmit = false; this.sponsorshipKeyValue = ''; this.addMintingAccountMessage = ''; + this.atMount = () => {}; } renderErr1Text() { @@ -61,7 +61,8 @@ class NotSponsored extends LitElement { }) .then((res) => { if (res === true) { - this.updateMintingAccounts(); + // refetch data + this.atMount(); this.sponsorshipKeyValue = ''; this.addMintingAccountMessage = this.renderErr1Text(); this.isLoadingSponsorshipKeySubmit = false;