Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/pid 1265 get claims #353

Merged
merged 4 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading