You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a quick bug we have found using this. When you create a new DID with private key and address, the config.address is not stored like it does in the two other cases. Just add "this.address = config.address;" this line:
constructor(config){this.config=config;if(config.controllerPrivateKey&&!config.address){thrownewError("If you set the controller private key you must also provide the DID address");}elseif(!config.controllerPrivateKey&&config.address){this.address=config.address;this.readOnly=true;}elseif(!config.controllerPrivateKey&&!config.address){constkeyPair=createKeyPair();this.address=keyPair.address;config.controllerPrivateKey=keyPair.privateKey;}this.address=config.address;// <=========== this onethis.registry=newDIDRegistry(config);this.resolver=getResolver({
...config,networks: [{name: 'main',registry: config.registry,rpcUrl: config.rpcUrl}]});}
The text was updated successfully, but these errors were encountered:
I come here for the same problem. I can't instantiate the DID class when I already have a private key because the address is not set in the constructor
Just a quick bug we have found using this. When you create a new DID with private key and address, the config.address is not stored like it does in the two other cases. Just add "this.address = config.address;" this line:
The text was updated successfully, but these errors were encountered: