@unicitylabs/sphere-sdk 0.2.0 → 0.2.1

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.
@@ -1335,7 +1335,7 @@ var NostrTransportProvider = class {
1335
1335
  // ===========================================================================
1336
1336
  // TransportProvider Implementation
1337
1337
  // ===========================================================================
1338
- setIdentity(identity) {
1338
+ async setIdentity(identity) {
1339
1339
  this.identity = identity;
1340
1340
  const secretKey = import_buffer.Buffer.from(identity.privateKey, "hex");
1341
1341
  this.keyManager = import_nostr_js_sdk.NostrKeyManager.fromPrivateKey(secretKey);
@@ -1365,12 +1365,9 @@ var NostrTransportProvider = class {
1365
1365
  this.log("NostrClient reconnected to relay:", url);
1366
1366
  }
1367
1367
  });
1368
- this.nostrClient.connect(...this.config.relays).then(() => {
1369
- this.subscribeToEvents();
1370
- oldClient.disconnect();
1371
- }).catch((err) => {
1372
- this.log("Failed to reconnect with new identity:", err);
1373
- });
1368
+ await this.nostrClient.connect(...this.config.relays);
1369
+ this.subscribeToEvents();
1370
+ oldClient.disconnect();
1374
1371
  } else if (this.isConnected()) {
1375
1372
  this.subscribeToEvents();
1376
1373
  }