Skip to content

Commit

Permalink
fix: make did to be address agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedolaibrahim committed Jun 21, 2021
1 parent 8e84ea4 commit 1831949
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/iam.ts
Expand Up @@ -138,6 +138,10 @@ export class IAM extends IAMBase {
*/

getDid(): string | undefined {
const didRegex = new RegExp(`^did:${Methods.Erc1056}:`);
if (this._did && didRegex.test(this._did) === true) {
this._did = this._did.split(":")[2];
}
return this._did;
}

Expand Down

0 comments on commit 1831949

Please sign in to comment.