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.
@@ -595,17 +595,33 @@ function _unsupportedIterableToArray(r, a) {
595
595
  _this.handleQRExpired(data);
596
596
  });
597
597
 
598
- // Écouter tous les événements socket pour les logger
598
+ // Écouter l'événement qr_scan_initiated spécifiquement
599
+ this.socket.on('qr_scan_initiated', function (data) {
600
+ console.log('🔍 QR Scan Initiated reçu:', data);
601
+ _this.showQRLoader();
602
+ });
603
+
604
+ // Écouter l'événement message générique (fallback)
605
+ this.socket.on('message', function (data) {
606
+ console.log('📨 Message socket reçu:', data);
607
+ if (data && data.type === 'qr_scan_initiated') {
608
+ console.log('🔍 QR Scan Initiated détecté dans message:', data);
609
+ _this.showQRLoader();
610
+ }
611
+ });
612
+
613
+ // Écouter tous les événements socket pour le debugging
614
+ this.socket.onAny = this.socket.onAny || function (eventName, callback) {
615
+ // Fallback pour les versions de Socket.IO qui n'ont pas onAny
616
+ console.log("\uD83C\uDF10 Socket Event [".concat(eventName, "]:"), callback);
617
+ };
618
+
619
+ // Logger tous les événements reçus
599
620
  this.socket.onAny(function (eventName) {
600
621
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
601
622
  args[_key - 1] = arguments[_key];
602
623
  }
603
624
  console.log("\uD83C\uDF10 Socket Event [".concat(eventName, "]:"), args);
604
-
605
- // Si c'est un événement qr_scan_initiated, afficher le loader
606
- if (eventName === 'qr_scan_initiated') {
607
- _this.showQRLoader();
608
- }
609
625
  });
610
626
  } else {
611
627
  console.log('🌐 WebSocket déjà connecté');