[FL-1643] NFC emv assets (#661)

* assets: add EMV AID table for NFC app
* file-worker: add searching for value by the key
* nfc: add emv parser helpers
* assets: add country and currency codes
* nfc: add country and currency code parsing
* emv_decoder: add country and currency code support
* nfc: add AID. currency and country display
* nfc: rework bank_card view
* nfc: add currency and country save
* assets: change emv chip asset
* nfc: change asset in bank card
* gui: add frame element to widget
* nfc: add bank card frame, add documentation
* rfal: fix long APDU command emulation
* nfc: fix typos
* Scripts ReadMe: assets delivery command

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
This commit is contained in:
gornekich
2021-08-20 22:56:43 +03:00
committed by GitHub
parent b1bbf1730c
commit ecff31d228
31 changed files with 1251 additions and 319 deletions

View File

@@ -1,4 +1,5 @@
#include "../nfc_i.h"
#include "../helpers/nfc_emv_parser.h"
#define NFC_SCENE_READ_SUCCESS_SHIFT " "
@@ -21,9 +22,12 @@ void nfc_scene_read_emv_app_success_on_enter(void* context) {
dialog_ex_set_icon(dialog_ex, 8, 13, &I_Medium_chip_22x21);
// Display UID and AID
string_t aid;
string_init_printf(aid, "AID:");
for(uint8_t i = 0; i < emv_data->aid_len; i++) {
string_cat_printf(aid, " %02X", emv_data->aid[i]);
string_init(aid);
bool aid_found = nfc_emv_parser_get_aid_name(emv_data->aid, emv_data->aid_len, aid);
if(!aid_found) {
for(uint8_t i = 0; i < emv_data->aid_len; i++) {
string_cat_printf(aid, " %02X", emv_data->aid[i]);
}
}
nfc_text_store_set(
nfc,