Skip to content

Commit

Permalink
fix: create proxy operator for identity addr
Browse files Browse the repository at this point in the history
  • Loading branch information
JGiter committed Apr 29, 2021
1 parent 068b55e commit 3e799a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/iam.ts
Expand Up @@ -53,6 +53,7 @@ import { Subscription } from "nats.ws";
import { AxiosError } from "axios";
import { DIDDocumentFull } from '@ew-did-registry/did-document';
import { Methods } from '@ew-did-registry/did';
import { addressOf } from '@ew-did-registry/did-ethr-resolver';

export type InitializeData = {
did: string | undefined;
Expand Down Expand Up @@ -363,7 +364,7 @@ export class IAM extends IAMBase {
if (sub === this._did) {
document = this._document;
} else if ((await this.getOwnedAssets({})).find((a) => a.document.id === sub)) {
const operator = new ProxyOperator(this._didSigner, this._registrySetting, sub);
const operator = new ProxyOperator(this._didSigner, this._registrySetting, addressOf(sub));
document = new DIDDocumentFull(sub, operator);
} else {
throw new Error(ERROR_MESSAGES.CLAIM_PUBLISHER_NOT_REQUESTER);
Expand Down

0 comments on commit 3e799a4

Please sign in to comment.