Skip to content

Commit

Permalink
Removed one more DTOs layer.
Browse files Browse the repository at this point in the history
  • Loading branch information
5eeman committed Jun 27, 2024
1 parent 5497f0a commit a459c85
Show file tree
Hide file tree
Showing 16 changed files with 1,030 additions and 1,493 deletions.
9 changes: 1 addition & 8 deletions lib/iden3comm/authenticate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import 'package:polygonid_flutter_sdk/iden3comm/data/dtos/authorization/response
import 'package:polygonid_flutter_sdk/iden3comm/data/dtos/authorization/response/auth_body_response_dto.dart';
import 'package:polygonid_flutter_sdk/iden3comm/data/dtos/authorization/response/auth_response_dto.dart';
import 'package:polygonid_flutter_sdk/iden3comm/data/mappers/auth_proof_mapper.dart';
import 'package:polygonid_flutter_sdk/iden3comm/data/mappers/iden3comm_proof_mapper.dart';
import 'package:polygonid_flutter_sdk/iden3comm/data/mappers/proof_request_filters_mapper.dart';
import 'package:polygonid_flutter_sdk/iden3comm/domain/entities/authorization/request/auth_request_iden3_message_entity.dart';
import 'package:polygonid_flutter_sdk/iden3comm/domain/entities/common/iden3_message_entity.dart';
Expand Down Expand Up @@ -333,9 +332,6 @@ class Authenticate {
profileDid: profileDid,
);

Iden3commProofMapper _iden3commProofMapper =
getItSdk<Iden3commProofMapper>();

AuthResponseDTO authResponse = AuthResponseDTO(
id: const Uuid().v4(),
thid: message.thid,
Expand All @@ -345,10 +341,7 @@ class Authenticate {
type: "https://iden3-communication.io/authorization/1.0/response",
body: AuthBodyResponseDTO(
message: (message as AuthIden3MessageEntity).body.message,
scope: proofs
.map((iden3commProofEntity) =>
_iden3commProofMapper.mapTo(iden3commProofEntity))
.toList(),
scope: proofs,
did_doc: didDocResponse,
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,21 @@
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:polygonid_flutter_sdk/iden3comm/data/dtos/authorization/response/auth_body_did_doc_response_dto.dart';
import 'package:polygonid_flutter_sdk/iden3comm/data/dtos/proof/response/iden3comm_proof_dto.dart';
import 'package:polygonid_flutter_sdk/iden3comm/domain/entities/proof/response/iden3comm_proof_entity.dart';

part 'auth_body_response_dto.g.dart';

@JsonSerializable()
class AuthBodyResponseDTO extends Equatable {
final AuthBodyDidDocResponseDTO? did_doc;
final String? message;
final List<Iden3commProofDTO>? scope;
final List<Iden3commProofEntity>? scope;

const AuthBodyResponseDTO(
{this.did_doc, required this.message, required this.scope});
const AuthBodyResponseDTO({
this.did_doc,
required this.message,
required this.scope,
});

factory AuthBodyResponseDTO.fromJson(Map<String, dynamic> json) =>
_$AuthBodyResponseDTOFromJson(json);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

91 changes: 0 additions & 91 deletions lib/iden3comm/data/dtos/proof/response/iden3comm_proof_dto.dart

This file was deleted.

25 changes: 0 additions & 25 deletions lib/iden3comm/data/dtos/proof/response/iden3comm_proof_dto.g.dart

This file was deleted.

94 changes: 0 additions & 94 deletions lib/iden3comm/data/dtos/proof/response/iden3comm_sd_proof_dto.dart

This file was deleted.

This file was deleted.

Loading

0 comments on commit a459c85

Please sign in to comment.