Explorar o código

Only show pacs in log for successfully loaded cards

Eric Betts %!s(int64=2) %!d(string=hai) anos
pai
achega
b1c0f1e05d
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      seader_credential.c

+ 4 - 1
seader_credential.c

@@ -70,6 +70,7 @@ static bool seader_credential_load(SeaderCredential* cred, FuriString* path, boo
         // Optional SIO/Diversifier
         flipper_format_read_hex(file, "SIO", cred->sio, sizeof(cred->sio));
         flipper_format_read_hex(file, "Diversifier", cred->diversifier, sizeof(cred->diversifier));
+        // seader->credential->type = SeaderCredentialTypeVirtual;
         parsed = true;
     } while(false);
 
@@ -84,7 +85,9 @@ static bool seader_credential_load(SeaderCredential* cred, FuriString* path, boo
             dialog_message_show_storage_error(cred->dialogs, "Can not parse\nfile");
         }
     }
-    FURI_LOG_I(TAG, "PACS: (%d) %016llx", cred->bit_length, cred->credential);
+    if (parsed) {
+      FURI_LOG_I(TAG, "PACS: (%d) %016llx", cred->bit_length, cred->credential);
+    }
 
     furi_string_free(temp_str);
     flipper_format_free(file);