@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.
@@ -86238,10 +86238,7 @@ var PolygonIdSdk = (function (exports) {
86238
86238
  }
86239
86239
  };
86240
86240
  this.checkStateExistenceForId = async (userId, userState) => {
86241
- const { latest } = await this.resolve(userId, userState.bigInt());
86242
- if (!latest) {
86243
- throw userStateError;
86244
- }
86241
+ await this.resolve(userId, userState.bigInt());
86245
86242
  };
86246
86243
  this.checkGlobalState = async (state, id) => {
86247
86244
  return this.rootResolve(state.bigInt(), id.bigInt());
@@ -86334,7 +86331,9 @@ var PolygonIdSdk = (function (exports) {
86334
86331
  contractState = await this._stateStorage.getStateInfoByIdAndState(idBigInt, state);
86335
86332
  }
86336
86333
  catch (e) {
86337
- if (e.errorArgs[0] === 'State does not exist') {
86334
+ const stateNotExistErr = (e?.errorArgs ?? [])[0];
86335
+ const errMsg = stateNotExistErr || e.message;
86336
+ if (errMsg === 'State does not exist') {
86338
86337
  if (isGenesis) {
86339
86338
  return {
86340
86339
  latest: true,