@ethereansos/interfaces-core 0.4.133 → 0.4.135

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.esm.js CHANGED
@@ -23754,22 +23754,18 @@ function instrumentProvider(_x, _x2) {
23754
23754
 
23755
23755
  function _instrumentProvider() {
23756
23756
  _instrumentProvider = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee(provider, method) {
23757
- var _instrumentableMethod2;
23758
-
23759
- var instrumentableMethods, _instrumentableMethod, entry, chainId, _ref, chainProvider;
23757
+ var instrumentableMethods, entry, chainId, _ref, chainProvider;
23760
23758
 
23761
23759
  return regeneratorRuntime.wrap(function _callee$(_context) {
23762
23760
  while (1) {
23763
23761
  switch (_context.prev = _context.next) {
23764
23762
  case 0:
23765
- instrumentableMethods = [];
23763
+ instrumentableMethods = [].concat(defaultInstrumentableMethods);
23766
23764
 
23767
23765
  try {
23768
- (_instrumentableMethod = instrumentableMethods).push.apply(_instrumentableMethod, _toConsumableArray(sendAsync.context.providerInstrumentableMethods || []));
23766
+ instrumentableMethods = _toConsumableArray(sendAsync.context.providerInstrumentableMethods || []);
23769
23767
  } catch (e) {}
23770
23768
 
23771
- (_instrumentableMethod2 = instrumentableMethods).push.apply(_instrumentableMethod2, defaultInstrumentableMethods);
23772
-
23773
23769
  instrumentableMethods = instrumentableMethods.map(function (it) {
23774
23770
  return it.toLowerCase();
23775
23771
  }).filter(function (it, i, arr) {
@@ -23777,30 +23773,30 @@ function _instrumentProvider() {
23777
23773
  });
23778
23774
 
23779
23775
  if (!(instrumentableMethods.indexOf(method.toLowerCase()) === -1)) {
23780
- _context.next = 6;
23776
+ _context.next = 5;
23781
23777
  break;
23782
23778
  }
23783
23779
 
23784
23780
  return _context.abrupt("return", provider);
23785
23781
 
23786
- case 6:
23782
+ case 5:
23787
23783
  entry = sendAsync.instrumentedProviders.filter(function (it) {
23788
23784
  return it.provider === provider;
23789
23785
  })[0];
23790
23786
 
23791
23787
  if (!entry) {
23792
- _context.next = 9;
23788
+ _context.next = 8;
23793
23789
  break;
23794
23790
  }
23795
23791
 
23796
23792
  return _context.abrupt("return", entry.instrumentedProvider);
23797
23793
 
23798
- case 9:
23794
+ case 8:
23799
23795
  _context.t0 = parseInt;
23800
- _context.next = 12;
23796
+ _context.next = 11;
23801
23797
  return sendAsync(provider, 'eth_chainId');
23802
23798
 
23803
- case 12:
23799
+ case 11:
23804
23800
  _context.t1 = _context.sent;
23805
23801
  chainId = (0, _context.t0)(_context.t1);
23806
23802
  entry = {
@@ -23814,7 +23810,7 @@ function _instrumentProvider() {
23814
23810
  }, chainProvider = _ref.chainProvider;
23815
23811
  return _context.abrupt("return", entry.instrumentedProvider = chainId !== 1 && chainProvider[chainId] ? new Web3.providers.HttpProvider(chainProvider[chainId]) : provider);
23816
23812
 
23817
- case 18:
23813
+ case 17:
23818
23814
  case "end":
23819
23815
  return _context.stop();
23820
23816
  }