0xPolygonID / polygonid-flutter-sdk

Flutter Plugin to use the Polygon ID SDK
Apache License 2.0
40 stars 27 forks source link

Refresh credential use-case not deleting old claim (== -> !=) #427

Closed Leautp closed 1 month ago

Leautp commented 1 month ago

Hi,

The documentation of the credential refresh service SDK states:

  1. Removes the old claim if the refresh was successful and the id of the new claim is different from the old one

but in the code of polygonid-flutter-sdk/lib/credential/domain/use_cases/refresh_credential_use_case.dart:91

... if (claimEntity.id == param.credential.id) { await _removeClaimsUseCase.execute( ...

"remove" is called if the ids are equal.

Thus, it duplicates credentials in the wallet in the case of a successful refresh.

5eeman commented 1 month ago

@Leautp Thanks for you contribution!