diff --git a/src/controllers/dashboard.rs b/src/controllers/dashboard.rs index 1214679..28d1984 100644 --- a/src/controllers/dashboard.rs +++ b/src/controllers/dashboard.rs @@ -811,7 +811,7 @@ impl DashboardController { render_template(&tmpl, "dashboard/messages.html", &ctx) } - /// Renders the TFC Credits pools page + /// Renders the MC Credits pools page pub async fn pools(tmpl: web::Data, session: Session) -> Result { let mut ctx = crate::models::builders::ContextBuilder::new() .active_page("dashboard") @@ -3263,7 +3263,7 @@ impl DashboardController { })).build()) } - /// Add TFC Credits to user balance + /// Add MC Credits to user balance pub async fn add_tfp( form: web::Form, session: Session, @@ -5903,7 +5903,7 @@ impl DashboardController { } } - /// Stake TFC Credits on a node + /// Stake MC Credits on a node pub async fn stake_on_node( session: Session, path: web::Path, diff --git a/src/models/user.rs b/src/models/user.rs index 93d7215..115e4d9 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -312,7 +312,7 @@ impl Default for LiquidityPoolConfig { fn default() -> Self { Self { pool_id: String::new(), - base_token: "TFC".to_string(), + base_token: "MC".to_string(), quote_token: "USD".to_string(), fee_tier: 0.3, minimum_liquidity: rust_decimal_macros::dec!(100.0), @@ -364,8 +364,8 @@ impl Default for YieldFarmConfig { fn default() -> Self { Self { farm_id: String::new(), - reward_token: "TFC".to_string(), - staked_token: "TFC".to_string(), + reward_token: "MC".to_string(), + staked_token: "MC".to_string(), apr: 12.0, lock_duration_days: 365, minimum_stake: rust_decimal_macros::dec!(1000.0), diff --git a/src/services/currency.rs b/src/services/currency.rs index b8313cf..fa9bf1a 100644 --- a/src/services/currency.rs +++ b/src/services/currency.rs @@ -99,11 +99,11 @@ impl CurrencyService { last_updated: chrono::Utc::now(), }, Currency { - code: "TFC".to_string(), - name: "ThreeFold Credits".to_string(), - symbol: "TFC".to_string(), + code: "MC".to_string(), + name: "Mycelium Credit".to_string(), + symbol: "MC".to_string(), currency_type: crate::models::currency::CurrencyType::Custom("credits".to_string()), - exchange_rate_to_base: dec!(1.0), // 1 TFC = 1 USD + exchange_rate_to_base: dec!(1.0), // 1 MC = 1 USD is_base_currency: false, decimal_places: 2, is_active: true, diff --git a/src/static/js/dashboard-application-provider.js b/src/static/js/dashboard-application-provider.js index d48fba7..5231469 100644 --- a/src/static/js/dashboard-application-provider.js +++ b/src/static/js/dashboard-application-provider.js @@ -107,7 +107,7 @@ window.AppProviderDashboard = window.AppProviderDashboard || (class AppProviderD tooltip: { callbacks: { label: function(context) { - return `Revenue: ${context.raw} TFC`; + return `Revenue: ${context.raw} MC`; } } } @@ -117,7 +117,7 @@ window.AppProviderDashboard = window.AppProviderDashboard || (class AppProviderD beginAtZero: true, title: { display: true, - text: 'Revenue (TFC)' + text: 'Revenue (MC)' } }, x: { @@ -168,7 +168,7 @@ window.AppProviderDashboard = window.AppProviderDashboard || (class AppProviderD label: function(context) { const total = context.dataset.data.reduce((a, b) => a + b, 0); const percentage = ((context.raw / total) * 100).toFixed(1); - return `${context.label}: ${context.raw} TFC (${percentage}%)`; + return `${context.label}: ${context.raw} MC (${percentage}%)`; } } } @@ -330,7 +330,7 @@ window.AppProviderDashboard = window.AppProviderDashboard || (class AppProviderD
${stars}
- ${(app.monthly_revenue_usd || 0)} TFC + ${(app.monthly_revenue_usd || 0)} MC
@@ -417,7 +417,7 @@ window.AppProviderDashboard = window.AppProviderDashboard || (class AppProviderD ${healthScore.toFixed(1)}% ${resourceUsage} - ${this.estimateDeploymentRevenue(deployment.app_name)} TFC + ${this.estimateDeploymentRevenue(deployment.app_name)} MC ${autoHealingDisplay} diff --git a/src/static/js/dashboard-service-provider.js b/src/static/js/dashboard-service-provider.js index 9ee206f..5b730fb 100644 --- a/src/static/js/dashboard-service-provider.js +++ b/src/static/js/dashboard-service-provider.js @@ -100,7 +100,7 @@ class ServiceProviderDashboard { tooltip: { callbacks: { label: function(context) { - return `Revenue: ${context.raw} TFP`; + return `Revenue: ${context.raw} MC`; } } } @@ -110,7 +110,7 @@ class ServiceProviderDashboard { beginAtZero: true, title: { display: true, - text: 'Revenue (TFP)' + text: 'Revenue (MC)' } }, x: { @@ -293,7 +293,7 @@ class ServiceProviderDashboard { callbacks: { label: function(context) { const point = context.raw; - return `${point.label}: Rating ${point.x}, ${point.y} TFP/hour`; + return `${point.label}: Rating ${point.x}, ${point.y} MC/hour`; } } } @@ -397,7 +397,7 @@ class ServiceProviderDashboard { ${service.category || 'General'} ${service.status || 'Active'} - ${service.hourly_rate || service.price_per_hour || service.price_per_hour_usd || service.price_amount || 0} TFC/hour + ${service.hourly_rate || service.price_per_hour || service.price_per_hour_usd || service.price_amount || 0} MC/hour ${service.clients || 0}
@@ -1237,7 +1237,7 @@ function createServiceRevenueAnalyticsChart(revenueData) { tooltip: { callbacks: { label: function(context) { - return `Revenue: ${context.raw} TFP`; + return `Revenue: ${context.raw} MC`; } } } @@ -1247,7 +1247,7 @@ function createServiceRevenueAnalyticsChart(revenueData) { beginAtZero: true, title: { display: true, - text: 'Revenue (TFP)' + text: 'Revenue (MC)' } }, x: { diff --git a/src/static/js/dashboard_pools.js b/src/static/js/dashboard_pools.js index 652a28c..38a5e31 100644 --- a/src/static/js/dashboard_pools.js +++ b/src/static/js/dashboard_pools.js @@ -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) { diff --git a/src/views/dashboard/pools.html b/src/views/dashboard/pools.html index df21a69..15ef0ef 100644 --- a/src/views/dashboard/pools.html +++ b/src/views/dashboard/pools.html @@ -411,24 +411,24 @@