feat: rename TFC to MC currency across codebase, UI, and documentation

This commit is contained in:
mik-tf
2025-09-08 12:53:09 -04:00
parent a4c5feb1ab
commit f233964f22
8 changed files with 55 additions and 55 deletions

View File

@@ -206,12 +206,12 @@
if (tfpAmountTFT) {
tfpAmountTFT.addEventListener('input', () => {
const amount = parseFloat(tfpAmountTFT.value) || 0;
const tftCost = amount * 0.5; // 1 TFC = 0.5 TFT
const tftCost = amount * 0.5; // 1 MC = 0.5 TFT
const modal = document.getElementById('buyTFCWithTFTModal');
if (modal) {
const rows = modal.querySelectorAll('.alert .d-flex.justify-content-between .text-end');
// rows[0] -> Amount, rows[1] -> Cost
if (rows[0]) rows[0].textContent = `${amount} TFC`;
if (rows[0]) rows[0].textContent = `${amount} MC`;
if (rows[1]) rows[1].textContent = `${tftCost.toFixed(1)} TFT`;
}
});
@@ -222,11 +222,11 @@
if (sellTfpAmountTFT) {
sellTfpAmountTFT.addEventListener('input', () => {
const amount = parseFloat(sellTfpAmountTFT.value) || 0;
const tftReceive = amount * 0.5; // 1 TFC = 0.5 TFT
const tftReceive = amount * 0.5; // 1 MC = 0.5 TFT
const modal = document.getElementById('sellTFCForTFTModal');
if (modal) {
const rows = modal.querySelectorAll('.alert .d-flex.justify-content-between .text-end');
if (rows[0]) rows[0].textContent = `${amount} TFC`;
if (rows[0]) rows[0].textContent = `${amount} MC`;
if (rows[1]) rows[1].textContent = `${tftReceive.toFixed(1)} TFT`;
}
});
@@ -237,11 +237,11 @@
if (tfpAmountPEAQ) {
tfpAmountPEAQ.addEventListener('input', () => {
const amount = parseFloat(tfpAmountPEAQ.value) || 0;
const peaqCost = amount * 2.0; // 1 TFC = 2 PEAQ
const peaqCost = amount * 2.0; // 1 MC = 2 PEAQ
const modal = document.getElementById('buyTFCWithPEAQModal');
if (modal) {
const rows = modal.querySelectorAll('.alert .d-flex.justify-content-between .text-end');
if (rows[0]) rows[0].textContent = `${amount} TFC`;
if (rows[0]) rows[0].textContent = `${amount} MC`;
if (rows[1]) rows[1].textContent = `${peaqCost.toFixed(0)} PEAQ`;
}
});
@@ -252,11 +252,11 @@
if (sellTfpAmountPEAQ) {
sellTfpAmountPEAQ.addEventListener('input', () => {
const amount = parseFloat(sellTfpAmountPEAQ.value) || 0;
const peaqReceive = amount * 2.0; // 1 TFC = 2 PEAQ
const peaqReceive = amount * 2.0; // 1 MC = 2 PEAQ
const modal = document.getElementById('sellTFCForPEAQModal');
if (modal) {
const rows = modal.querySelectorAll('.alert .d-flex.justify-content-between .text-end');
if (rows[0]) rows[0].textContent = `${amount} TFC`;
if (rows[0]) rows[0].textContent = `${amount} MC`;
if (rows[1]) rows[1].textContent = `${peaqReceive.toFixed(0)} PEAQ`;
}
});
@@ -375,7 +375,7 @@
},
body: JSON.stringify({ amount, payment_method: 'TFT' }),
});
showSuccessToast(`Purchased ${amount} TFC with TFT`);
showSuccessToast(`Purchased ${amount} MC with TFT`);
const modal = document.getElementById('buyTFCWithTFTModal');
if (modal && window.bootstrap) bootstrap.Modal.getOrCreateInstance(modal).hide();
} catch (e) {
@@ -398,7 +398,7 @@
},
body: JSON.stringify({ amount, currency: 'TFT', payout_method: 'blockchain' }),
});
showSuccessToast(`Sold ${amount} TFC for TFT`);
showSuccessToast(`Sold ${amount} MC for TFT`);
const modal = document.getElementById('sellTFCForTFTModal');
if (modal && window.bootstrap) bootstrap.Modal.getOrCreateInstance(modal).hide();
} catch (e) {
@@ -421,7 +421,7 @@
},
body: JSON.stringify({ amount, payment_method: 'PEAQ' }),
});
showSuccessToast(`Purchased ${amount} TFC with PEAQ`);
showSuccessToast(`Purchased ${amount} MC with PEAQ`);
const modal = document.getElementById('buyTFCWithPEAQModal');
if (modal && window.bootstrap) bootstrap.Modal.getOrCreateInstance(modal).hide();
} catch (e) {
@@ -444,7 +444,7 @@
},
body: JSON.stringify({ amount, currency: 'PEAQ', payout_method: 'blockchain' }),
});
showSuccessToast(`Sold ${amount} TFC for PEAQ`);
showSuccessToast(`Sold ${amount} MC for PEAQ`);
const modal = document.getElementById('sellTFCForPEAQModal');
if (modal && window.bootstrap) bootstrap.Modal.getOrCreateInstance(modal).hide();
} catch (e) {