@0xpolygonid/js-sdk 1.10.3 → 1.10.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.
@@ -65336,10 +65336,7 @@ class PubSignalsVerifier {
65336
65336
  }
65337
65337
  };
65338
65338
  this.checkStateExistenceForId = async (userId, userState) => {
65339
- const { latest } = await this.resolve(userId, userState.bigInt());
65340
- if (!latest) {
65341
- throw userStateError;
65342
- }
65339
+ await this.resolve(userId, userState.bigInt());
65343
65340
  };
65344
65341
  this.checkGlobalState = async (state, id) => {
65345
65342
  return this.rootResolve(state.bigInt(), id.bigInt());
@@ -65432,7 +65429,9 @@ class PubSignalsVerifier {
65432
65429
  contractState = await this._stateStorage.getStateInfoByIdAndState(idBigInt, state);
65433
65430
  }
65434
65431
  catch (e) {
65435
- if (e.errorArgs[0] === 'State does not exist') {
65432
+ const stateNotExistErr = (e?.errorArgs ?? [])[0];
65433
+ const errMsg = stateNotExistErr || e.message;
65434
+ if (errMsg === 'State does not exist') {
65436
65435
  if (isGenesis) {
65437
65436
  return {
65438
65437
  latest: true,