Skip to content

Commit b5b6080

Browse files
committed
Update the matcher output and gradually remove the provider_idx reference
1 parent 73d3184 commit b5b6080

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

app/src/main/assets/pnv.wasm

0 Bytes
Binary file not shown.

app/src/main/java/com/credman/cmwallet/getcred/GetCredentialActivity.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,9 @@ class GetCredentialActivity : FragmentActivity() {
235235
return
236236
}
237237
val selectedEntryId = JSONObject(entryId!!)
238-
val providerIdx = selectedEntryId.getInt("provider_idx")
239-
val selectedId = selectedEntryId.getString("id")
238+
Log.d(TAG, "Selected Entry Info:${entryId}")
239+
val providerIdx = if (selectedEntryId.has("req_idx")) selectedEntryId.getInt("req_idx") else selectedEntryId.getInt("provider_idx")
240+
val selectedId = if (selectedEntryId.has("entry_id")) selectedEntryId.getString("entry_id") else selectedEntryId.getString("id")
240241
val dqclCredId = selectedEntryId.getString("dcql_cred_id")
241242

242243
val pnvResponse = maybeHandlePnv(

matcher/pnv/openid4vp1_0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ int main() {
132132
cJSON* id_obj = cJSON_CreateObject();
133133
cJSON* matched_id = cJSON_GetObjectItem(c, "id");
134134

135-
cJSON_AddItemReferenceToObject(id_obj, "id", matched_id);
135+
cJSON_AddItemReferenceToObject(id_obj, "entry_id", matched_id);
136136
cJSON_AddItemReferenceToObject(id_obj, "dcql_cred_id", doc_id);
137-
cJSON_AddItemReferenceToObject(id_obj, "provider_idx", cJSON_CreateNumber(i));
137+
cJSON_AddItemReferenceToObject(id_obj, "req_idx", cJSON_CreateNumber(i));
138138
char* id = cJSON_PrintUnformatted(id_obj);
139139

140140
if (transaction_credential_ids != NULL) {

0 commit comments

Comments
 (0)