@konemono/nostr-login 1.7.45 → 1.7.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konemono/nostr-login",
3
- "version": "1.7.45",
3
+ "version": "1.7.46",
4
4
  "description": "",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -619,13 +619,8 @@ class AuthNostrService extends EventEmitter implements Signer {
619
619
  }
620
620
  }
621
621
 
622
- if (this.signer.userPubkey) {
623
- info.pubkey = this.signer.userPubkey;
624
- }
625
-
626
- if (this.signer.remotePubkey) {
627
- info.signerPubkey = this.signer.remotePubkey;
628
- }
622
+ info.pubkey = this.signer.userPubkey!;
623
+ info.signerPubkey = this.signer.remotePubkey;
629
624
 
630
625
  ok();
631
626
  } catch (e) {
@@ -660,15 +655,8 @@ class AuthNostrService extends EventEmitter implements Signer {
660
655
  const eventToAddAccount = Boolean(this.params.userInfo);
661
656
  console.log('authNip46', type, info);
662
657
 
663
- await this.startAuth();
664
-
665
- await this.initSigner(info, {
666
- connect: true,
667
- listen: true,
668
- eventToAddAccount,
669
- });
670
-
671
- await this.endAuth();
658
+ // updates the info
659
+ await this.initSigner(info, { connect: true, eventToAddAccount });
672
660
 
673
661
  // callback
674
662
  this.onAuth(type, info);