sunuid-sdk 1.0.35 → 1.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -598,17 +598,33 @@
598
598
  _this.handleQRExpired(data);
599
599
  });
600
600
 
601
- // Écouter tous les événements socket pour les logger
601
+ // Écouter l'événement qr_scan_initiated spécifiquement
602
+ this.socket.on('qr_scan_initiated', function (data) {
603
+ console.log('🔍 QR Scan Initiated reçu:', data);
604
+ _this.showQRLoader();
605
+ });
606
+
607
+ // Écouter l'événement message générique (fallback)
608
+ this.socket.on('message', function (data) {
609
+ console.log('📨 Message socket reçu:', data);
610
+ if (data && data.type === 'qr_scan_initiated') {
611
+ console.log('🔍 QR Scan Initiated détecté dans message:', data);
612
+ _this.showQRLoader();
613
+ }
614
+ });
615
+
616
+ // Écouter tous les événements socket pour le debugging
617
+ this.socket.onAny = this.socket.onAny || function (eventName, callback) {
618
+ // Fallback pour les versions de Socket.IO qui n'ont pas onAny
619
+ console.log("\uD83C\uDF10 Socket Event [".concat(eventName, "]:"), callback);
620
+ };
621
+
622
+ // Logger tous les événements reçus
602
623
  this.socket.onAny(function (eventName) {
603
624
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
604
625
  args[_key - 1] = arguments[_key];
605
626
  }
606
627
  console.log("\uD83C\uDF10 Socket Event [".concat(eventName, "]:"), args);
607
-
608
- // Si c'est un événement qr_scan_initiated, afficher le loader
609
- if (eventName === 'qr_scan_initiated') {
610
- _this.showQRLoader();
611
- }
612
628
  });
613
629
  } else {
614
630
  console.log('🌐 WebSocket déjà connecté');