@ethereansos/interfaces-core 0.4.135 → 0.4.138

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.cjs.js CHANGED
@@ -23775,7 +23775,7 @@ function _instrumentProvider() {
23775
23775
  instrumentableMethods = [].concat(defaultInstrumentableMethods);
23776
23776
 
23777
23777
  try {
23778
- instrumentableMethods = _toConsumableArray(sendAsync.context.providerInstrumentableMethods || []);
23778
+ instrumentableMethods = _toConsumableArray(sendAsync.context.providerInstrumentableMethods || defaultInstrumentableMethods);
23779
23779
  } catch (e) {}
23780
23780
 
23781
23781
  instrumentableMethods = instrumentableMethods.map(function (it) {
@@ -23832,26 +23832,17 @@ function _instrumentProvider() {
23832
23832
  return _instrumentProvider.apply(this, arguments);
23833
23833
  }
23834
23834
 
23835
- function sendAsync(_x3, _x4) {
23836
- return _sendAsync.apply(this, arguments);
23835
+ function sendAsyncInternal(_x3, _x4, _x5) {
23836
+ return _sendAsyncInternal.apply(this, arguments);
23837
23837
  }
23838
23838
 
23839
- function _sendAsync() {
23840
- _sendAsync = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(inputProvider, method) {
23841
- var provider,
23842
- params,
23843
- _args3 = arguments;
23839
+ function _sendAsyncInternal() {
23840
+ _sendAsyncInternal = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(provider, method, params) {
23844
23841
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
23845
23842
  while (1) {
23846
23843
  switch (_context3.prev = _context3.next) {
23847
23844
  case 0:
23848
23845
  _context3.next = 2;
23849
- return instrumentProvider(inputProvider, method);
23850
-
23851
- case 2:
23852
- provider = _context3.sent;
23853
- params = Array.prototype.slice.call(_args3).slice(2) || [];
23854
- _context3.next = 6;
23855
23846
  return new Promise( /*#__PURE__*/function () {
23856
23847
  var _ref2 = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(ok, ko) {
23857
23848
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
@@ -23886,21 +23877,86 @@ function _sendAsync() {
23886
23877
  }, _callee2, null, [[0, 5]]);
23887
23878
  }));
23888
23879
 
23889
- return function (_x5, _x6) {
23880
+ return function (_x8, _x9) {
23890
23881
  return _ref2.apply(this, arguments);
23891
23882
  };
23892
23883
  }());
23893
23884
 
23894
- case 6:
23885
+ case 2:
23895
23886
  return _context3.abrupt("return", _context3.sent);
23896
23887
 
23897
- case 7:
23888
+ case 3:
23898
23889
  case "end":
23899
23890
  return _context3.stop();
23900
23891
  }
23901
23892
  }
23902
23893
  }, _callee3);
23903
23894
  }));
23895
+ return _sendAsyncInternal.apply(this, arguments);
23896
+ }
23897
+
23898
+ function sendAsync(_x6, _x7) {
23899
+ return _sendAsync.apply(this, arguments);
23900
+ }
23901
+
23902
+ function _sendAsync() {
23903
+ _sendAsync = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(provider, method) {
23904
+ var params,
23905
+ message,
23906
+ instrumentedProvider,
23907
+ _args4 = arguments;
23908
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
23909
+ while (1) {
23910
+ switch (_context4.prev = _context4.next) {
23911
+ case 0:
23912
+ params = Array.prototype.slice.call(_args4).slice(2) || [];
23913
+ _context4.prev = 1;
23914
+ _context4.next = 4;
23915
+ return sendAsyncInternal(provider, method, params);
23916
+
23917
+ case 4:
23918
+ return _context4.abrupt("return", _context4.sent);
23919
+
23920
+ case 7:
23921
+ _context4.prev = 7;
23922
+ _context4.t0 = _context4["catch"](1);
23923
+ message = (_context4.t0.stack || _context4.t0.message || _context4.t0.toString()).toLowerCase();
23924
+
23925
+ if (!(message.indexOf('execution reverted') !== -1)) {
23926
+ _context4.next = 12;
23927
+ break;
23928
+ }
23929
+
23930
+ throw _context4.t0;
23931
+
23932
+ case 12:
23933
+ _context4.next = 14;
23934
+ return instrumentProvider(provider, method);
23935
+
23936
+ case 14:
23937
+ instrumentedProvider = _context4.sent;
23938
+
23939
+ if (!(provider === instrumentedProvider)) {
23940
+ _context4.next = 17;
23941
+ break;
23942
+ }
23943
+
23944
+ throw _context4.t0;
23945
+
23946
+ case 17:
23947
+ _context4.next = 19;
23948
+ return sendAsyncInternal(instrumentedProvider, method, params);
23949
+
23950
+ case 19:
23951
+ return _context4.abrupt("return", _context4.sent);
23952
+
23953
+ case 20:
23954
+ case "end":
23955
+ return _context4.stop();
23956
+ }
23957
+ }
23958
+ }, _callee4, null, [[1, 7]]);
23959
+ }));
23904
23960
  return _sendAsync.apply(this, arguments);
23905
23961
  }
23906
23962