@unicitylabs/sphere-sdk 0.3.4 → 0.3.5

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/dist/index.cjs CHANGED
@@ -9477,7 +9477,9 @@ function decryptTextFormatKey(encryptedKey, password) {
9477
9477
  const key = deriveLegacyKey(password);
9478
9478
  const decrypted = import_crypto_js7.default.AES.decrypt(encryptedKey, key);
9479
9479
  const result = decrypted.toString(import_crypto_js7.default.enc.Utf8);
9480
- return result || null;
9480
+ if (!result) return null;
9481
+ if (!/^[0-9a-fA-F]+$/.test(result)) return null;
9482
+ return result;
9481
9483
  } catch {
9482
9484
  return null;
9483
9485
  }
@@ -11299,7 +11301,7 @@ var Sphere = class _Sphere {
11299
11301
  await provider.initialize();
11300
11302
  }
11301
11303
  await this.reinitializeModulesForNewAddress();
11302
- if (this._identity.nametag) {
11304
+ if (!newNametag) {
11303
11305
  await this.syncIdentityWithTransport();
11304
11306
  }
11305
11307
  if (newNametag) {