mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
added refetch data when a user adds sponsor key
This commit is contained in:
parent
a784594b23
commit
16d19b0e51
@ -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` <not-sponsored></not-sponsored> `}
|
||||
: html`
|
||||
<not-sponsored
|
||||
.atMount="${() => this.atMount()}"
|
||||
></not-sponsored>
|
||||
`}
|
||||
${!isAlreadySponsored
|
||||
? ''
|
||||
: html`
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user