Skip to content

Commit

Permalink
feat: only host is added
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Aug 23, 2023
1 parent eeb0517 commit 5ce033e
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions lib/splash/bloclisteners/blocklisteners.dart
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,15 @@ final qrCodeBlocListener = BlocListener<QRCodeScanCubit, QRCodeScanState>(
);
if (credentialOfferJson == null) throw Exception();

subtitle =
credentialOfferJson['credential_issuer'].toString();
subtitle = Uri.parse(
credentialOfferJson['credential_issuer'].toString(),
).host;

case OIDC4VCType.GAIAX:
case OIDC4VCType.EBSIV2:
subtitle = state.uri!.queryParameters['issuer'].toString();

subtitle = Uri.parse(
state.uri!.queryParameters['issuer'].toString(),
).host;
case OIDC4VCType.JWTVC:
throw Exception();
}
Expand All @@ -302,9 +304,14 @@ final qrCodeBlocListener = BlocListener<QRCodeScanCubit, QRCodeScanState>(
jwtDecode: JWTDecode(),
token: response as String,
);
subtitle = decodedResponse['redirect_uri'].toString();

subtitle =
Uri.parse(decodedResponse['redirect_uri'].toString())
.host;
} else {
subtitle = state.uri?.queryParameters['redirect_uri'] ?? '';
subtitle = Uri.parse(
state.uri!.queryParameters['redirect_uri'] ?? '',
).host;
}
}
}
Expand Down

0 comments on commit 5ce033e

Please sign in to comment.