@xyo-network/os-runtime 5.0.8 → 5.0.10

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.
@@ -837,13 +837,46 @@ var initializeXns = /* @__PURE__ */ __name(async (xnsNode) => {
837
837
  return false;
838
838
  }, "initializeXns");
839
839
 
840
+ // src/lib/isEqual.ts
841
+ import { isObject } from "@xylabs/object";
842
+ function isEqual(a, b) {
843
+ if (a === b) return true;
844
+ if (typeof a !== typeof b) return false;
845
+ if (isObject(a) && isObject(b)) {
846
+ const aKeys = Object.keys(a);
847
+ const bKeys = Object.keys(b);
848
+ if (aKeys.length !== bKeys.length) {
849
+ return false;
850
+ }
851
+ for (const key of aKeys) {
852
+ if (!b.hasOwnProperty(key) || !isEqual(a[key], b[key])) {
853
+ return false;
854
+ }
855
+ }
856
+ return true;
857
+ }
858
+ if (Array.isArray(a) && Array.isArray(b)) {
859
+ if (a.length !== b.length) {
860
+ return false;
861
+ }
862
+ for (const [i, element] of a.entries()) {
863
+ if (!isEqual(element, b[i])) {
864
+ return false;
865
+ }
866
+ }
867
+ return true;
868
+ }
869
+ return false;
870
+ }
871
+ __name(isEqual, "isEqual");
872
+
840
873
  // src/lib/isPayload.ts
841
874
  import { AsObjectFactory } from "@xylabs/object";
842
- var isObject = /* @__PURE__ */ __name((x) => {
875
+ var isObject2 = /* @__PURE__ */ __name((x) => {
843
876
  return typeof x === "object" && !Array.isArray(x);
844
877
  }, "isObject");
845
878
  var isAnyPayload = /* @__PURE__ */ __name((obj) => {
846
- if (isObject(obj)) {
879
+ if (isObject2(obj)) {
847
880
  return typeof obj.schema === "string";
848
881
  }
849
882
  return false;
@@ -918,7 +951,6 @@ var NameTransforms = class _NameTransforms {
918
951
  };
919
952
 
920
953
  // src/lib/PayloadStore.ts
921
- import { isEqual } from "@xylabs/lodash";
922
954
  var PayloadStore = class {
923
955
  static {
924
956
  __name(this, "PayloadStore");
@@ -3426,7 +3458,6 @@ var OsBadgeResource = class extends OsSettingsCallerBase {
3426
3458
 
3427
3459
  // src/classes/settings/Caller.ts
3428
3460
  import { assertEx as assertEx26 } from "@xylabs/assert";
3429
- import { isEqual as isEqual2 } from "@xylabs/lodash";
3430
3461
 
3431
3462
  // src/utils/buildWalletSeedPhrasePayload.ts
3432
3463
  import { WalletSeedPhraseSchema } from "@xyo-network/os-model";
@@ -3602,7 +3633,7 @@ var OsSettingsCaller = class extends OsSettingsCallerBase {
3602
3633
  const { payload: biosSeedPhrasePayload } = await buildUserWalletSeedPhrasePayload(biosWalletSeedPhrase);
3603
3634
  await this.addWalletSeedPhrase(biosSeedPhrasePayload);
3604
3635
  return biosSeedPhrasePayload;
3605
- } else if (!isEqual2(storedSeedPhrasePayload.mnemonic.mnemonic, biosWalletSeedPhraseParts)) {
3636
+ } else if (!isEqual(storedSeedPhrasePayload.mnemonic.mnemonic, biosWalletSeedPhraseParts)) {
3606
3637
  const updatedBiosSeedPhrase = storedSeedPhrasePayload.mnemonic.mnemonic.join(" ");
3607
3638
  await this.context.kernel?.bios?.seedPhraseStore.set("user", updatedBiosSeedPhrase);
3608
3639
  }
@@ -3903,7 +3934,8 @@ export {
3903
3934
  getApiDomain,
3904
3935
  initializeXns,
3905
3936
  isAnyPayload,
3906
- isObject,
3937
+ isEqual,
3938
+ isObject2 as isObject,
3907
3939
  isPayload,
3908
3940
  loadOsNode,
3909
3941
  manifestReplacementTokens,