forked from Qortal/qortal-ui
remove sponsorship key for start to mint
This commit is contained in:
parent
b80766efc8
commit
f6bf6cc8dc
@ -152,7 +152,8 @@
|
|||||||
"smchange6":"Awaiting confirmation on blockchain",
|
"smchange6":"Awaiting confirmation on blockchain",
|
||||||
"smchange7":"Finishing up relationship",
|
"smchange7":"Finishing up relationship",
|
||||||
"smchange8":"Adding minting key to node",
|
"smchange8":"Adding minting key to node",
|
||||||
"smchange9":"Complete"
|
"smchange9":"Complete",
|
||||||
|
"smchange10": "Only 2 minting keys are allowed per node, you are attempting to assign 3 keys, please go to management - node management, and remove the key you do not want to assign to this node, thank you!"
|
||||||
},
|
},
|
||||||
"mintingpage":{
|
"mintingpage":{
|
||||||
"mchange1":"General Minting Details",
|
"mchange1":"General Minting Details",
|
||||||
|
@ -36,6 +36,9 @@ class StartMinting extends connect(store)(LitElement) {
|
|||||||
static get styles() {
|
static get styles() {
|
||||||
return [
|
return [
|
||||||
css`
|
css`
|
||||||
|
p, h1 {
|
||||||
|
color: var(--black)
|
||||||
|
}
|
||||||
.dialogCustom {
|
.dialogCustom {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
@ -152,6 +155,7 @@ class StartMinting extends connect(store)(LitElement) {
|
|||||||
.between p {
|
.between p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
color: var(--black);
|
||||||
}
|
}
|
||||||
.marginLoader {
|
.marginLoader {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
@ -224,11 +228,14 @@ class StartMinting extends connect(store)(LitElement) {
|
|||||||
const myNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node];
|
const myNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node];
|
||||||
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||||
this.status = value
|
this.status = value
|
||||||
const publicAddress = window.parent.reduxStore.getState().app?.selectedAddress ?.base58PublicKey;
|
const address = window.parent.reduxStore.getState().app?.selectedAddress?.address;
|
||||||
|
|
||||||
// Check to see if a sponsorship key on a newly-level 1 minter exists. If it does, remove it.
|
// Check to see if a sponsorship key on a newly-level 1 minter exists. If it does, remove it.
|
||||||
const findMintingAccountFromOtherUser = this.mintingAccountData.find((ma) => !ma.publicKey.includes(publicAddress));
|
const findMintingAccountFromOtherUser = this.mintingAccountData.find((ma) => ma.recipientAccount === address && ma.mintingAccount !== address);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const removeMintingAccount = async (publicKey) => {
|
const removeMintingAccount = async (publicKey) => {
|
||||||
const url = `${nodeUrl}/admin/mintingaccounts?apiKey=${myNode.apiKey}`;
|
const url = `${nodeUrl}/admin/mintingaccounts?apiKey=${myNode.apiKey}`;
|
||||||
return await fetch(url, {
|
return await fetch(url, {
|
||||||
@ -394,6 +401,14 @@ async confirmRelationship(){
|
|||||||
const startMinting = async () => {
|
const startMinting = async () => {
|
||||||
this.openDialogRewardShare = true
|
this.openDialogRewardShare = true
|
||||||
this.errorMsg = '';
|
this.errorMsg = '';
|
||||||
|
const address = window.parent.reduxStore.getState().app?.selectedAddress?.address;
|
||||||
|
|
||||||
|
const findMintingAccountsFromUser = this.mintingAccountData.filter((ma) => ma.recipientAccount === address && ma.mintingAccount === address);
|
||||||
|
|
||||||
|
if(findMintingAccountsFromUser > 2){
|
||||||
|
this.errorMsg = translate("startminting.smchange10")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.privateRewardShareKey = await createSponsorshipKey();
|
this.privateRewardShareKey = await createSponsorshipKey();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user