fix(exchange): remove duplicate initializeTheme call and fix broken api route references

This commit is contained in:
oib
2026-02-27 12:55:26 +01:00
parent e6094c9757
commit e5092f2e83

View File

@@ -421,7 +421,7 @@
document.getElementById('aitbcAmount').addEventListener('input', updateBTCAmount); document.getElementById('aitbcAmount').addEventListener('input', updateBTCAmount);
// Initialize enhanced dark mode // Initialize enhanced dark mode
initializeTheme(); // initializeTheme(); handled by global-header.js
// Initialize touch navigation // Initialize touch navigation
new ExchangeTouchNavigation(); new ExchangeTouchNavigation();
@@ -446,7 +446,7 @@
localStorage.setItem('exchangeTheme', theme); localStorage.setItem('exchangeTheme', theme);
// Update button display // Update button display
updateThemeButton(theme);
// Send analytics event if available // Send analytics event if available
if (window.analytics) { if (window.analytics) {
@@ -789,7 +789,7 @@
async function fetchMarketData() { async function fetchMarketData() {
try { try {
// Get market stats from API // Get market stats from API
const response = await axios.get(`${API_BASE}/exchange/market-stats`); const response = await axios.get(`${API_BASE}/marketplace/stats`);
const stats = response.data; const stats = response.data;
// Update price // Update price
@@ -1046,7 +1046,7 @@
async function loadGPUOffers() { async function loadGPUOffers() {
console.log('Switch to real GPU offers initiated from:', API_BASE + '/miners/list'); console.log('Switch to real GPU offers initiated from:', API_BASE + '/miners/list');
try { try {
const response = await fetch(API_BASE + '/miners/list'); const response = await fetch(API_BASE + '/marketplace/offers');
console.log('API response status:', response.status, 'OK:', response.ok); console.log('API response status:', response.status, 'OK:', response.ok);
console.log('Response headers:', response.headers); console.log('Response headers:', response.headers);
const responseText = await response.text(); const responseText = await response.text();
@@ -1214,7 +1214,7 @@
async function loadRealGPUOffers() { async function loadRealGPUOffers() {
console.log('Switching to production: loadRealGPUOffers called with API_BASE:', API_BASE + '/miners/list'); console.log('Switching to production: loadRealGPUOffers called with API_BASE:', API_BASE + '/miners/list');
try { try {
const response = await fetch(API_BASE + '/miners/list'); const response = await fetch(API_BASE + '/marketplace/offers');
console.log('Production API response status:', response.status); console.log('Production API response status:', response.status);
if (!response.ok) throw new Error(`HTTP error: status ${response.status}`); if (!response.ok) throw new Error(`HTTP error: status ${response.status}`);
const data = await response.json(); const data = await response.json();