Skip to content

Commit

Permalink
Merge pull request #353 from jrl351/fix/PID-1265-getClaims
Browse files Browse the repository at this point in the history
Fix/pid 1265 get claims
  • Loading branch information
plusema86 authored Dec 21, 2023
2 parents 15750e3 + c5e9c71 commit f15eaa6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
5 changes: 3 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ Demonstrates how to use the polygonid_flutter_sdk plugin.
### Install
1. Clone the `polygonid-flutter-sdk` repository.
2. Run `flutter pub get` from example directory.
3. Run `build_runner` to generate `.g.dart` files:
3. Configure the environment per the instructions below.
4. Run `build_runner` to generate `.g.dart` files:
```bash
dart run build_runner build --delete-conflicting-outputs
```
4. After the previous steps, build and run the project.
5. After the previous steps, build and run the project.

## Examples

Expand Down
4 changes: 2 additions & 2 deletions lib/iden3comm/data/mappers/proof_request_filters_mapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class ProofRequestFiltersMapper
List<FilterEntity> filters = [
FilterEntity(
name: 'credential.credentialSubject.type', value: query.type!),
/*FilterEntity(
FilterEntity(
operator: FilterOperator.equalsAnyInList,
name: 'credential.@context',
value: query.context!),*/
value: query.context!),
];
if (query.allowedIssuers != null &&
query.allowedIssuers is List &&
Expand Down
3 changes: 1 addition & 2 deletions rust/makefile → rust/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ help: makefile
## init: Install missing dependencies.
.PHONY: init
init:
rustup target add aarch64-apple-ios x86_64-apple-ios
#rustup target add armv7-apple-ios armv7s-apple-ios i386-apple-ios ## deprecated
rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
@if [ $$(uname) == "Darwin" ] ; then cargo install cargo-lipo ; fi
cargo install cbindgen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,39 +202,39 @@ main() {
test("From ProofRequestEntity to List<FilterEntity> LT operator", () {
List<FilterEntity> filters =
proofRequestFiltersMapper.mapFrom(mockProofRequestEntityLT);
expect(filters.length, 3);
expect(filters.length, 4);
expect(filters[0].name, "credential.credentialSubject.type");
expect(filters[0].value, "KYCAgeCredential");
});

test("From ProofRequestEntity to List<FilterEntity> GT operator", () {
List<FilterEntity> filters =
proofRequestFiltersMapper.mapFrom(mockProofRequestEntityGT);
expect(filters.length, 3);
expect(filters.length, 4);
expect(filters[0].name, "credential.credentialSubject.type");
expect(filters[0].value, "KYCAgeCredential");
});

test("From ProofRequestEntity to List<FilterEntity> EQ", () {
List<FilterEntity> filters =
proofRequestFiltersMapper.mapFrom(mockProofRequestEntityEQ);
expect(filters.length, 3);
expect(filters.length, 4);
expect(filters[0].name, "credential.credentialSubject.type");
expect(filters[0].value, "KYCAgeCredential");
});

test("From ProofRequestEntity to List<FilterEntity> IN", () {
List<FilterEntity> filters =
proofRequestFiltersMapper.mapFrom(mockProofRequestEntityIN);
expect(filters.length, 3);
expect(filters.length, 4);
expect(filters[0].name, "credential.credentialSubject.type");
expect(filters[0].value, "KYCAgeCredential");
});

test("From ProofRequestEntity to List<FilterEntity> NIN", () {
List<FilterEntity> filters =
proofRequestFiltersMapper.mapFrom(mockProofRequestEntityNIN);
expect(filters.length, 4);
expect(filters.length, 5);
expect(filters[0].name, "credential.credentialSubject.type");
expect(filters[0].value, "KYCAgeCredential");
});
Expand All @@ -244,7 +244,7 @@ main() {
() {
List<FilterEntity> filters =
proofRequestFiltersMapper.mapFrom(mockProofRequestEntityNINCountry);
expect(filters.length, 6);
expect(filters.length, 7);
expect(filters[0].name, "credential.credentialSubject.type");
expect(filters[0].value, "KYCCountryOfResidenceCredential");
});
Expand All @@ -253,7 +253,7 @@ main() {
() {
List<FilterEntity> filters = proofRequestFiltersMapper
.mapFrom(mockProofRequestEntityNotSupportedOperator);
expect(filters.length, 2);
expect(filters.length, 3);
expect(filters[0].name, "credential.credentialSubject.type");
expect(filters[0].value, "KYCCountryOfResidenceCredential");
});
Expand Down

0 comments on commit f15eaa6

Please sign in to comment.