Browse Source

fix bugs

qchat-updates
Phillip Lang Martinez 2 years ago
parent
commit
8d8c5c5ca4
  1. 6
      qortal-ui-core/src/components/start-minting.js
  2. 2
      qortal-ui-core/src/plugins/routes.js
  3. 10
      qortal-ui-plugins/plugins/core/sponsorship-list/sponsorship-list.src.js

6
qortal-ui-core/src/components/start-minting.js

@ -342,7 +342,7 @@ class StartMinting extends connect(store)(LitElement) {
stop = false stop = false
} }
}; };
interval = setInterval(getAnswer, 2000); interval = setInterval(getAnswer, 5000);
} }
renderStartMintingButton() { renderStartMintingButton() {
@ -402,7 +402,7 @@ class StartMinting extends connect(store)(LitElement) {
const getTxnRequestResponse = (txnResponse) => { const getTxnRequestResponse = (txnResponse) => {
let err6string = get('rewardsharepage.rchange21'); let err6string = get('rewardsharepage.rchange21');
if(txnResponse?.extraData?.rewardSharePrivateKey && txnResponse.success === true){ if(txnResponse?.extraData?.rewardSharePrivateKey && (txnResponse?.data?.message.includes('multiple') || txnResponse?.data?.message.includes('SELF_SHARE_EXISTS'))){
return err6string return err6string
} }
if (txnResponse.success === false && txnResponse.message) { if (txnResponse.success === false && txnResponse.message) {
@ -447,7 +447,7 @@ class StartMinting extends connect(store)(LitElement) {
try { try {
this.privateRewardShareKey = await createSponsorshipKey(); this.privateRewardShareKey = await createSponsorshipKey();
this.confirmRelationship() this.confirmRelationship(publicAddress)
} catch (error) { } catch (error) {
console.log({error}) console.log({error})
this.errorMsg = error?.data?.message || 'Cannot create sponsorship key'; this.errorMsg = error?.data?.message || 'Cannot create sponsorship key';

2
qortal-ui-core/src/plugins/routes.js

@ -146,7 +146,7 @@ export const routes = {
const res = await processTransaction(tx.signedBytes); const res = await processTransaction(tx.signedBytes);
let extraData = {} let extraData = {}
if(req.data.type === 38 && tx?._rewardShareKeyPair?.secretKey){ if(req.data.type === 38 && tx && tx._rewardShareKeyPair && tx._rewardShareKeyPair.secretKey){
extraData.rewardSharePrivateKey = Base58.encode(tx._rewardShareKeyPair.secretKey) extraData.rewardSharePrivateKey = Base58.encode(tx._rewardShareKeyPair.secretKey)
} }

10
qortal-ui-plugins/plugins/core/sponsorship-list/sponsorship-list.src.js

@ -158,7 +158,6 @@ class SponsorshipList extends LitElement {
?.address ?.address
let rewardShares = await this.getRewardShareRelationship( let rewardShares = await this.getRewardShareRelationship(
address address
) )
@ -387,10 +386,10 @@ class SponsorshipList extends LitElement {
const getTxnRequestResponse = (txnResponse) => { const getTxnRequestResponse = (txnResponse) => {
if(txnResponse?.extraData?.rewardSharePrivateKey && txnResponse.success === true){ if(txnResponse?.extraData?.rewardSharePrivateKey && (txnResponse?.data?.message.includes('multiple') || txnResponse?.data?.message.includes('SELF_SHARE_EXISTS')) ){
this.privateRewardShareKey = txnResponse?.extraData?.rewardSharePrivateKey this.privateRewardShareKey = txnResponse?.extraData?.rewardSharePrivateKey
this.confirmRelationship() this.confirmRelationship(publicKeyValue)
} else if (txnResponse.success === false && txnResponse?.message) { } else if (txnResponse.success === false && txnResponse?.message) {
this.errorMessage = txnResponse?.message this.errorMessage = txnResponse?.message
@ -403,7 +402,7 @@ class SponsorshipList extends LitElement {
this.privateRewardShareKey = txnResponse?.extraData?.rewardSharePrivateKey this.privateRewardShareKey = txnResponse?.extraData?.rewardSharePrivateKey
this.confirmRelationship() this.confirmRelationship(publicKeyValue)
} else { } else {
this.errorMessage = txnResponse?.data?.message || txnResponse?.message this.errorMessage = txnResponse?.data?.message || txnResponse?.message
@ -431,6 +430,7 @@ class SponsorshipList extends LitElement {
const recipientAddress = const recipientAddress =
window.parent.base58PublicKeyToAddress(recipientPublicKey) window.parent.base58PublicKeyToAddress(recipientPublicKey)
const minterAddress = window.parent.reduxStore.getState().app?.selectedAddress.address const minterAddress = window.parent.reduxStore.getState().app?.selectedAddress.address
const myRewardShareArray = await parentEpml.request("apiCall", { const myRewardShareArray = await parentEpml.request("apiCall", {
type: "api", type: "api",
@ -452,7 +452,7 @@ class SponsorshipList extends LitElement {
stop = false stop = false
} }
}; };
interval = setInterval(getAnswer, 2000); interval = setInterval(getAnswer, 5000);
} }

Loading…
Cancel
Save