@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.
@@ -9210,7 +9210,9 @@ function decryptTextFormatKey(encryptedKey, password) {
9210
9210
  const key = deriveLegacyKey(password);
9211
9211
  const decrypted = import_crypto_js7.default.AES.decrypt(encryptedKey, key);
9212
9212
  const result = decrypted.toString(import_crypto_js7.default.enc.Utf8);
9213
- return result || null;
9213
+ if (!result) return null;
9214
+ if (!/^[0-9a-fA-F]+$/.test(result)) return null;
9215
+ return result;
9214
9216
  } catch {
9215
9217
  return null;
9216
9218
  }
@@ -11032,7 +11034,7 @@ var Sphere = class _Sphere {
11032
11034
  await provider.initialize();
11033
11035
  }
11034
11036
  await this.reinitializeModulesForNewAddress();
11035
- if (this._identity.nametag) {
11037
+ if (!newNametag) {
11036
11038
  await this.syncIdentityWithTransport();
11037
11039
  }
11038
11040
  if (newNametag) {