mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
code cleanup, gui fixes
This commit is contained in:
committed by
Nikita Vostokov
parent
b1674711a1
commit
ec356626fa
@@ -63,11 +63,6 @@ void nfc_render_emv_pan(const uint8_t* data, const uint8_t len, FuriString* str)
|
||||
furi_string_cat_printf(str, "\n");
|
||||
}
|
||||
|
||||
void nfc_render_emv_expired(const EmvApplication* apl, FuriString* str) {
|
||||
if(apl->exp_month == 0) return;
|
||||
furi_string_cat_printf(str, "Exp: %02X/%02X\n", apl->exp_month, apl->exp_year);
|
||||
}
|
||||
|
||||
void nfc_render_emv_currency(uint16_t cur_code, FuriString* str) {
|
||||
if(!cur_code) return;
|
||||
|
||||
@@ -88,37 +83,9 @@ void nfc_render_emv_application(const EmvApplication* apl, FuriString* str) {
|
||||
return;
|
||||
}
|
||||
|
||||
furi_string_cat_printf(str, "Application:\n");
|
||||
|
||||
if(strlen(apl->label)) {
|
||||
furi_string_cat_printf(str, " Label: %s", apl->label);
|
||||
furi_string_cat_printf(str, "\n");
|
||||
}
|
||||
|
||||
if(strlen(apl->name)) {
|
||||
furi_string_cat_printf(str, " Name: %s", apl->name);
|
||||
furi_string_cat_printf(str, "\n");
|
||||
}
|
||||
|
||||
furi_string_cat_printf(str, " AID:");
|
||||
for(uint8_t i = 0; i < len; i++) furi_string_cat_printf(str, "%02X", apl->aid[i]);
|
||||
furi_string_cat_printf(str, "\n");
|
||||
|
||||
if(apl->eff_month) {
|
||||
furi_string_cat_printf(
|
||||
str, " Effective: 20%02X/%02X/%02X", apl->eff_year, apl->eff_month, apl->eff_day);
|
||||
furi_string_cat_printf(str, "\n");
|
||||
}
|
||||
if(apl->exp_month) {
|
||||
furi_string_cat_printf(
|
||||
str, " Expire: 20%02X/%02X/%02X", apl->exp_year, apl->exp_month, apl->exp_day);
|
||||
furi_string_cat_printf(str, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void nfc_render_emv_pin_try_counter(uint8_t counter, FuriString* str) {
|
||||
if(counter == 0xff) return;
|
||||
furi_string_cat_printf(str, "PIN attempts left: %d\n", counter);
|
||||
}
|
||||
|
||||
void nfc_render_emv_transactions(const EmvApplication* apl, FuriString* str) {
|
||||
@@ -207,5 +174,4 @@ void nfc_render_emv_extra(const EmvData* data, FuriString* str) {
|
||||
|
||||
nfc_render_emv_currency(data->emv_application.currency_code, str);
|
||||
nfc_render_emv_country(data->emv_application.country_code, str);
|
||||
nfc_render_emv_pin_try_counter(data->emv_application.pin_try_counter, str);
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@ void nfc_render_emv_application(const EmvApplication* data, FuriString* str);
|
||||
|
||||
void nfc_render_emv_extra(const EmvData* data, FuriString* str);
|
||||
|
||||
void nfc_render_emv_expired(const EmvApplication* apl, FuriString* str);
|
||||
|
||||
void nfc_render_emv_country(uint16_t country_code, FuriString* str);
|
||||
|
||||
void nfc_render_emv_currency(uint16_t cur_code, FuriString* str);
|
||||
|
||||
Reference in New Issue
Block a user