Skip to content

Commit

Permalink
fix(instance): Fixed constructor args type compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Eengineer1 committed Aug 8, 2022
1 parent bf4038b commit cc21b53
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/agent/ICheqd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ export class Cheqd implements IAgentPlugin {
}
readonly didProvider: string;

constructor(provider: string) {
this.didProvider = provider
constructor(args: { provider: string }) {
if (typeof args.provider !== 'string') {
throw new Error('[cheqd-plugin]: provider is required')
}

this.didProvider = args.provider

this.methods = {
[CreateIdentifierMethodName]: this.CreateIdentifier.bind(this),
Expand Down

0 comments on commit cc21b53

Please sign in to comment.