starknet 10.7.3 → 10.7.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.mjs CHANGED
@@ -3126,7 +3126,7 @@ var AbiParser1 = class {
3126
3126
  parsingStrategy;
3127
3127
  constructor(abi, parsingStrategy) {
3128
3128
  this.abi = abi;
3129
- this.parsingStrategy = parsingStrategy || fastParsingStrategy;
3129
+ this.parsingStrategy = parsingStrategy || hdParsingStrategy;
3130
3130
  }
3131
3131
  getRequestParser(abiType) {
3132
3132
  if (this.parsingStrategy.request[abiType]) {
@@ -3172,7 +3172,7 @@ var AbiParser2 = class {
3172
3172
  parsingStrategy;
3173
3173
  constructor(abi, parsingStrategy) {
3174
3174
  this.abi = abi;
3175
- this.parsingStrategy = parsingStrategy || fastParsingStrategy;
3175
+ this.parsingStrategy = parsingStrategy || hdParsingStrategy;
3176
3176
  }
3177
3177
  getRequestParser(abiType) {
3178
3178
  if (this.parsingStrategy.request[abiType]) {
@@ -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);