diff --git a/android/src/main/java/es/tiarg/nfcreactnative/NfcReactNativeModule.java b/android/src/main/java/es/tiarg/nfcreactnative/NfcReactNativeModule.java index 2e86b81..12091b3 100644 --- a/android/src/main/java/es/tiarg/nfcreactnative/NfcReactNativeModule.java +++ b/android/src/main/java/es/tiarg/nfcreactnative/NfcReactNativeModule.java @@ -78,7 +78,7 @@ class NfcReactNativeModule extends ReactContextBaseJavaModule implements Activit } else { authResult = tag.authenticateSectorWithKeyB(this.sectores.getMap(i).getInt("sector"), hexStringToByteArray(this.sectores.getMap(i).getString("clave"))); } - if (this.operation.equals(OP_WRITE) && this.cardId != id) { + if (this.cardId == 0 && this.operation.equals(OP_WRITE) && this.cardId != id) { this.tagPromise.reject("Id Error", "Apoye la misma tarjeta que leyo por primera vez"); return; }