Add scan progress indicator, payment card detection, and production cleanup
Features: - Add scanning progress indicator showing current detection step - Detect payment cards (Visa, Mastercard, Amex, etc.) via PPSE/EMV AIDs - Show "Payment Device Detected" instead of "Implant Detected" for payment cards - Hide compatible implants section for payment devices, show conversion instead - Add Spark 1/2 implant detection via vivokey.co NDEF URL - Hide conversion card when actual implant is detected Technical: - Add DetectionProgressCallback for real-time detection status - Add payment network AIDs to commands.ts - Configure babel to strip console.log/warn in production builds - Add logger utility for development-only logging Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
35
src/utils/logger.ts
Normal file
35
src/utils/logger.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Logger utility that only outputs in development mode
|
||||
* All console.log statements in the app should use this logger
|
||||
*/
|
||||
|
||||
/* eslint-disable no-console */
|
||||
|
||||
const isDev = __DEV__;
|
||||
|
||||
export const logger = {
|
||||
log: (...args: unknown[]) => {
|
||||
if (isDev) {
|
||||
console.log(...args);
|
||||
}
|
||||
},
|
||||
|
||||
warn: (...args: unknown[]) => {
|
||||
if (isDev) {
|
||||
console.warn(...args);
|
||||
}
|
||||
},
|
||||
|
||||
error: (...args: unknown[]) => {
|
||||
// Always log errors, even in production
|
||||
console.error(...args);
|
||||
},
|
||||
|
||||
debug: (...args: unknown[]) => {
|
||||
if (isDev) {
|
||||
console.log('[DEBUG]', ...args);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export default logger;
|
||||
Reference in New Issue
Block a user