starknet 10.7.3 → 10.7.4

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.mjs CHANGED
@@ -8589,9 +8589,15 @@ function getHex(value) {
8589
8589
  }
8590
8590
  function validateTypedData(data) {
8591
8591
  const typedData = data;
8592
- return Boolean(
8593
- typedData.message && typedData.primaryType && typedData.types && identifyRevision(typedData)
8594
- );
8592
+ if (!(typedData.message && typedData.primaryType && typedData.types)) {
8593
+ return false;
8594
+ }
8595
+ const revision = identifyRevision(typedData);
8596
+ if (!revision) {
8597
+ return false;
8598
+ }
8599
+ const presetNames = Object.keys(revisionConfiguration[revision].presetTypes);
8600
+ return Object.keys(typedData.types).every((name) => !presetNames.includes(name));
8595
8601
  }
8596
8602
  function prepareSelector(selector) {
8597
8603
  return isHex(selector) ? selector : getSelectorFromName(selector);