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.js CHANGED
@@ -3311,7 +3311,7 @@ var AbiParser1 = class {
3311
3311
  parsingStrategy;
3312
3312
  constructor(abi, parsingStrategy) {
3313
3313
  this.abi = abi;
3314
- this.parsingStrategy = parsingStrategy || fastParsingStrategy;
3314
+ this.parsingStrategy = parsingStrategy || hdParsingStrategy;
3315
3315
  }
3316
3316
  getRequestParser(abiType) {
3317
3317
  if (this.parsingStrategy.request[abiType]) {
@@ -3357,7 +3357,7 @@ var AbiParser2 = class {
3357
3357
  parsingStrategy;
3358
3358
  constructor(abi, parsingStrategy) {
3359
3359
  this.abi = abi;
3360
- this.parsingStrategy = parsingStrategy || fastParsingStrategy;
3360
+ this.parsingStrategy = parsingStrategy || hdParsingStrategy;
3361
3361
  }
3362
3362
  getRequestParser(abiType) {
3363
3363
  if (this.parsingStrategy.request[abiType]) {
@@ -8774,9 +8774,15 @@ function getHex(value) {
8774
8774
  }
8775
8775
  function validateTypedData(data) {
8776
8776
  const typedData = data;
8777
- return Boolean(
8778
- typedData.message && typedData.primaryType && typedData.types && identifyRevision(typedData)
8779
- );
8777
+ if (!(typedData.message && typedData.primaryType && typedData.types)) {
8778
+ return false;
8779
+ }
8780
+ const revision = identifyRevision(typedData);
8781
+ if (!revision) {
8782
+ return false;
8783
+ }
8784
+ const presetNames = Object.keys(revisionConfiguration[revision].presetTypes);
8785
+ return Object.keys(typedData.types).every((name) => !presetNames.includes(name));
8780
8786
  }
8781
8787
  function prepareSelector(selector) {
8782
8788
  return isHex(selector) ? selector : getSelectorFromName(selector);