mirror of
https://github.com/thecyberlearn/quantumtaskai-caprover.git
synced 2026-08-18 12:12:55 +00:00
Complete Django AI agent marketplace with security optimizations and clean deployment documentation without any API keys or secrets. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
43 lines
1.4 KiB
JavaScript
43 lines
1.4 KiB
JavaScript
/**
|
|
* Quick wallet balance update test
|
|
* Run this in browser console to test wallet balance updates
|
|
*/
|
|
|
|
function testWalletUpdate() {
|
|
console.log('Testing wallet balance update...');
|
|
|
|
// Get current balance from data attribute
|
|
const currentBalance = parseFloat(document.body.getAttribute('data-user-balance') || '0');
|
|
console.log('Current balance from data attribute:', currentBalance);
|
|
|
|
// Get header balance element
|
|
const headerBalance = document.querySelector('[data-wallet-balance]');
|
|
console.log('Header balance element found:', !!headerBalance);
|
|
if (headerBalance) {
|
|
console.log('Current header text:', headerBalance.textContent);
|
|
}
|
|
|
|
// Test updating to a new balance
|
|
const testBalance = currentBalance - 6.0;
|
|
console.log('Testing update to:', testBalance);
|
|
|
|
if (window.WorkflowsCore) {
|
|
WorkflowsCore.updateWalletBalance(testBalance);
|
|
console.log('✅ WorkflowsCore.updateWalletBalance() called');
|
|
|
|
// Check if it worked
|
|
if (headerBalance) {
|
|
console.log('New header text:', headerBalance.textContent);
|
|
}
|
|
console.log('New data attribute:', document.body.getAttribute('data-user-balance'));
|
|
} else {
|
|
console.log('❌ WorkflowsCore not available');
|
|
}
|
|
}
|
|
|
|
// Auto-run test
|
|
if (document.readyState === 'loading') {
|
|
document.addEventListener('DOMContentLoaded', testWalletUpdate);
|
|
} else {
|
|
testWalletUpdate();
|
|
} |