Show currency amount on purchase confirmation modals

This commit is contained in:
Hafiz
2025-11-18 14:02:53 -06:00
parent de1b509243
commit 2948824df7
2 changed files with 4 additions and 0 deletions

View File

@@ -855,6 +855,8 @@ export default {
const confirmed = await new Promise(resolve => {
this.$root.$emit('habitica:purchase-confirm', {
message: this.$t('purchasePetItemConfirm', { itemText: this.item.text }),
currency: this.item.currency,
cost: this.item.value * this.selectedAmountToBuy,
resolve,
});
});

View File

@@ -43,6 +43,8 @@ export default {
return new Promise(resolve => {
this.$root.$emit('habitica:purchase-confirm', {
message: this.$t(purchaseForKey, { cost }),
currency,
cost,
resolve,
});
});