mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
Merge branch 'master' into bugfix/fix-custom-property-value-field
This commit is contained in:
commit
d726155cb6
@ -593,7 +593,7 @@ class ProfileQdn extends connect(store)(LitElement) {
|
||||
this.resourceExists = true;
|
||||
this.profileData = data;
|
||||
store.dispatch(setProfileData(data));
|
||||
|
||||
parentEpml.request('showSnackBar', get('profile.profile22'))
|
||||
|
||||
worker.terminate();
|
||||
} catch (error) {
|
||||
|
@ -721,23 +721,29 @@ class SponsorshipList extends LitElement {
|
||||
}
|
||||
|
||||
const getTxnRequestResponse = (txnResponse) => {
|
||||
if(txnResponse.extraData.rewardSharePrivateKey && (txnResponse.data.message.includes('multiple') || txnResponse.data.message.includes('SELF_SHARE_EXISTS'))) {
|
||||
this.privateRewardShareKey = txnResponse.extraData.rewardSharePrivateKey
|
||||
this.confirmRelationship(publicKeyValue, isCopy)
|
||||
} else if (txnResponse.success === false && txnResponse?.message) {
|
||||
this.errorMessage = txnResponse?.message
|
||||
this.isLoadingCreateSponsorship = false
|
||||
throw(txnResponse?.message)
|
||||
} else if (
|
||||
txnResponse.success === true &&
|
||||
!txnResponse.data.error
|
||||
) {
|
||||
this.privateRewardShareKey = txnResponse.extraData.rewardSharePrivateKey
|
||||
this.confirmRelationship(publicKeyValue, isCopy)
|
||||
|
||||
const extraData = txnResponse && txnResponse.extraData;
|
||||
const data = txnResponse && txnResponse.data;
|
||||
const dataMessage = data && data.message;
|
||||
const extraDataPrivateKey = extraData && extraData.rewardSharePrivateKey;
|
||||
const txnSuccess = txnResponse && txnResponse.success;
|
||||
|
||||
if (extraDataPrivateKey && typeof dataMessage === 'string' &&
|
||||
(dataMessage.includes('multiple') || dataMessage.includes('SELF_SHARE_EXISTS'))) {
|
||||
this.privateRewardShareKey = extraDataPrivateKey;
|
||||
this.confirmRelationship(publicKeyValue, isCopy);
|
||||
} else if (txnSuccess === false && txnResponse.message) {
|
||||
this.errorMessage = txnResponse.message;
|
||||
this.isLoadingCreateSponsorship = false;
|
||||
throw new Error(txnResponse.message);
|
||||
} else if (txnSuccess === true && !(data && data.error)) {
|
||||
this.privateRewardShareKey = extraDataPrivateKey;
|
||||
this.confirmRelationship(publicKeyValue, isCopy);
|
||||
} else {
|
||||
this.errorMessage = txnResponse.data.message || txnResponse.message
|
||||
this.isLoadingCreateSponsorship = false
|
||||
throw(txnResponse.data.message || txnResponse.message)
|
||||
const defaultErrorMessage = 'An unknown error occurred.';
|
||||
this.errorMessage = dataMessage || txnResponse.message || defaultErrorMessage;
|
||||
this.isLoadingCreateSponsorship = false;
|
||||
throw new Error(dataMessage || txnResponse.message || defaultErrorMessage);
|
||||
}
|
||||
}
|
||||
validateReceiver()
|
||||
|
Loading…
x
Reference in New Issue
Block a user