mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
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",
|
||||
"smchange7":"Finishing up relationship",
|
||||
"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":{
|
||||
"mchange1":"General Minting Details",
|
||||
|
@ -36,6 +36,9 @@ class StartMinting extends connect(store)(LitElement) {
|
||||
static get styles() {
|
||||
return [
|
||||
css`
|
||||
p, h1 {
|
||||
color: var(--black)
|
||||
}
|
||||
.dialogCustom {
|
||||
position: fixed;
|
||||
z-index: 10000;
|
||||
@ -152,6 +155,7 @@ class StartMinting extends connect(store)(LitElement) {
|
||||
.between p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: var(--black);
|
||||
}
|
||||
.marginLoader {
|
||||
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 nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port;
|
||||
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.
|
||||
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 url = `${nodeUrl}/admin/mintingaccounts?apiKey=${myNode.apiKey}`;
|
||||
return await fetch(url, {
|
||||
@ -394,6 +401,14 @@ async confirmRelationship(){
|
||||
const startMinting = async () => {
|
||||
this.openDialogRewardShare = true
|
||||
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 {
|
||||
this.privateRewardShareKey = await createSponsorshipKey();
|
||||
|
Loading…
x
Reference in New Issue
Block a user