@@ -199,13 +199,16 @@ async def _check_proof_vs_proposal():
199
199
sub_proof_index = attr_spec ["sub_proof_index" ]
200
200
schema_id = proof ["identifiers" ][sub_proof_index ]["schema_id" ]
201
201
cred_def_id = proof ["identifiers" ][sub_proof_index ]["cred_def_id" ]
202
+ registry = self .profile .inject (AnonCredsRegistry )
203
+ schema = await registry .get_schema (self .profile , schema_id )
204
+ cred_def = await registry .get_credential_definition (cred_def_id )
202
205
criteria = {
203
206
"schema_id" : schema_id ,
204
- "schema_issuer_did" : schema_id . split ( ":" )[ - 4 ] ,
205
- "schema_name" : schema_id . split ( ":" )[ - 2 ] ,
206
- "schema_version" : schema_id . split ( ":" )[ - 1 ] ,
207
+ "schema_issuer_did" : schema . schema_value . issuer_id ,
208
+ "schema_name" : schema . schema_value . name ,
209
+ "schema_version" : schema . schema_value . version ,
207
210
"cred_def_id" : cred_def_id ,
208
- "issuer_did" : cred_def_id . split ( ":" )[ - 5 ] ,
211
+ "issuer_did" : cred_def . credential_definition . issuer_id ,
209
212
f"attr::{ name } ::value" : proof_value ,
210
213
}
211
214
@@ -232,18 +235,18 @@ async def _check_proof_vs_proposal():
232
235
name : values ["raw" ] for name , values in attr_spec ["values" ].items ()
233
236
}
234
237
sub_proof_index = attr_spec ["sub_proof_index" ]
235
- registry = self .profile .inject (AnonCredsRegistry )
236
238
schema_id = proof ["identifiers" ][sub_proof_index ]["schema_id" ]
237
- schema_info = await registry .get_schema_info_by_id (schema_id )
238
239
cred_def_id = proof ["identifiers" ][sub_proof_index ]["cred_def_id" ]
239
- cred_def_info = await registry .get_cred_def_info_by_id (cred_def_id )
240
+ registry = self .profile .inject (AnonCredsRegistry )
241
+ schema = await registry .get_schema (self .profile , schema_id )
242
+ cred_def = await registry .get_credential_definition (cred_def_id )
240
243
criteria = {
241
244
"schema_id" : schema_id ,
242
- "schema_issuer_did" : schema_info .issuer_id ,
243
- "schema_name" : schema_info .name ,
244
- "schema_version" : schema_info .version ,
245
+ "schema_issuer_did" : schema . schema_value .issuer_id ,
246
+ "schema_name" : schema . schema_value .name ,
247
+ "schema_version" : schema . schema_value .version ,
245
248
"cred_def_id" : cred_def_id ,
246
- "issuer_did" : cred_def_info .issuer_id ,
249
+ "issuer_did" : cred_def . credential_definition .issuer_id ,
247
250
** {
248
251
f"attr::{ name } ::value" : value
249
252
for name , value in proof_values .items ()
@@ -296,18 +299,19 @@ async def _check_proof_vs_proposal():
296
299
f"Proposed request predicate on { req_name } not in presentation"
297
300
)
298
301
299
- registry = self . profile . inject ( AnonCredsRegistry )
302
+ sub_proof_index = attr_spec [ "sub_proof_index" ]
300
303
schema_id = proof ["identifiers" ][sub_proof_index ]["schema_id" ]
301
- schema_info = await registry .get_schema_info_by_id (schema_id )
302
304
cred_def_id = proof ["identifiers" ][sub_proof_index ]["cred_def_id" ]
303
- cred_def_info = await registry .get_cred_def_info_by_id (cred_def_id )
305
+ registry = self .profile .inject (AnonCredsRegistry )
306
+ schema = await registry .get_schema (self .profile , schema_id )
307
+ cred_def = await registry .get_credential_definition (cred_def_id )
304
308
criteria = {
305
309
"schema_id" : schema_id ,
306
- "schema_issuer_did" : schema_info .issuer_id ,
307
- "schema_name" : schema_info .name ,
308
- "schema_version" : schema_info .version ,
310
+ "schema_issuer_did" : schema . schema_value .issuer_id ,
311
+ "schema_name" : schema . schema_value .name ,
312
+ "schema_version" : schema . schema_value .version ,
309
313
"cred_def_id" : cred_def_id ,
310
- "issuer_did" : cred_def_info .issuer_id ,
314
+ "issuer_did" : cred_def . credential_definition .issuer_id ,
311
315
}
312
316
313
317
if (
0 commit comments