Skip to content

Commit

Permalink
fix: Update polygon card status checking approach #1699
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Jul 18, 2023
1 parent 3a19c11 commit c47c3fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions lib/app/shared/helper_functions/helper_functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ bool isEbsiIssuer(CredentialModel credentialModel) {
}

bool isPolygonssuer(CredentialModel credentialModel) {
return credentialModel.id.startsWith(
'https://self-hosted-platform.polygonid.me/v1/did:polygonid:polygon:',
);
return credentialModel.issuer.contains('did:polygonid');
}

bool isValidPrivateKey(String value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,9 @@ class CredentialDetailsCubit extends Cubit<CredentialDetailsState> {
await secureStorageProvider.get(SecureStorageKeys.ssiMnemonic);
await polygonIdCubit.initialise();

final polygonIdNetwork =
await secureStorageProvider.get(SecureStorageKeys.polygonIdNetwork);

String network = Parameters.POLYGON_MAIN_NETWORK;

if (polygonIdNetwork == PolygonIdNetwork.PolygonMainnet.toString()) {
if (item.issuer.contains('polygon:main')) {
network = Parameters.POLYGON_MAIN_NETWORK;
} else {
network = Parameters.POLYGON_TEST_NETWORK;
Expand Down

0 comments on commit c47c3fc

Please sign in to comment.