fix(success-modal): misc fixes

This commit is contained in:
Matteo Pagliazzi
2018-12-16 15:39:37 +01:00
parent ba2832d21f
commit 7348145b7d
3 changed files with 17 additions and 12 deletions

View File

@@ -149,17 +149,19 @@ export default {
gemAmount: this.gift.gems.amount,
});
this.close();
this.$root.$emit('habitica:payment-success', {
paymentMethod: 'balance',
paymentCompleted: true,
paymentType: 'gift-gems-balance',
gift: {
gems: {
amount: this.gift.gems.amount,
setTimeout(() => { // wait for the send gem modal to be closed
this.$root.$emit('habitica:payment-success', {
paymentMethod: 'balance',
paymentCompleted: true,
paymentType: 'gift-gems-balance',
gift: {
gems: {
amount: this.gift.gems.amount,
},
},
},
giftReceiver: this.receiverName,
});
giftReceiver: this.receiverName,
});
}, 500);
},
onHide () {
// @TODO this breaks amazon purchases because when the amazon modal