@ethereansos/interfaces-core 0.4.123 → 0.4.126

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
@@ -23768,35 +23768,25 @@ function _sendAsync() {
23768
23768
  provider = inputProvider;
23769
23769
 
23770
23770
  if (!(method !== 'eth_chainId')) {
23771
- _context2.next = 12;
23771
+ _context2.next = 9;
23772
23772
  break;
23773
23773
  }
23774
23774
 
23775
23775
  _context2.t0 = parseInt;
23776
- _context2.t1 = provider.chainId;
23777
-
23778
- if (_context2.t1) {
23779
- _context2.next = 8;
23780
- break;
23781
- }
23782
-
23783
- _context2.next = 7;
23776
+ _context2.next = 5;
23784
23777
  return sendAsync(provider, 'eth_chainId');
23785
23778
 
23786
- case 7:
23779
+ case 5:
23787
23780
  _context2.t1 = _context2.sent;
23788
-
23789
- case 8:
23790
- _context2.t2 = _context2.t1;
23791
- chainId = provider.chainId = (0, _context2.t0)(_context2.t2);
23781
+ chainId = (0, _context2.t0)(_context2.t1);
23792
23782
  _ref = sendAsync.context || {
23793
23783
  chainProvider: {}
23794
23784
  }, chainProvider = _ref.chainProvider;
23795
23785
  provider = chainId !== 1 && chainProvider[chainId] ? instrumentedProviders[chainId] = instrumentedProviders[chainId] || new Web3.providers.HttpProvider(chainProvider[chainId]) : provider;
23796
23786
 
23797
- case 12:
23787
+ case 9:
23798
23788
  params = Array.prototype.slice.call(_args2).slice(2) || [];
23799
- _context2.next = 15;
23789
+ _context2.next = 12;
23800
23790
  return new Promise( /*#__PURE__*/function () {
23801
23791
  var _ref2 = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee(ok, ko) {
23802
23792
  return regeneratorRuntime.wrap(function _callee$(_context) {
@@ -23836,10 +23826,10 @@ function _sendAsync() {
23836
23826
  };
23837
23827
  }());
23838
23828
 
23839
- case 15:
23829
+ case 12:
23840
23830
  return _context2.abrupt("return", _context2.sent);
23841
23831
 
23842
- case 16:
23832
+ case 13:
23843
23833
  case "end":
23844
23834
  return _context2.stop();
23845
23835
  }
@@ -49099,11 +49089,19 @@ var Web3ContextInitializer = function Web3ContextInitializer(_ref) {
49099
49089
 
49100
49090
  return globalContracts[index];
49101
49091
  };
49092
+ /*useEffect(() => {
49093
+ chainId &&
49094
+ web3Instance &&
49095
+ web3Instance.currentProvider &&
49096
+ !web3Instance.currentProvider.chainId &&
49097
+ (web3Instance.currentProvider.chainId = chainId)
49098
+ dualChainId &&
49099
+ dualChainWeb3 &&
49100
+ dualChainWeb3.currentProvider &&
49101
+ !dualChainWeb3.currentProvider.chainId &&
49102
+ (dualChainWeb3.currentProvider.chainId = dualChainId)
49103
+ }, [chainId, web3Instance, dualChainId, dualChainWeb3])*/
49102
49104
 
49103
- useEffect(function () {
49104
- chainId && web3Instance && web3Instance.currentProvider && !web3Instance.currentProvider.chainId && (web3Instance.currentProvider.chainId = chainId);
49105
- dualChainId && dualChainWeb3 && dualChainWeb3.currentProvider && !dualChainWeb3.currentProvider.chainId && (dualChainWeb3.currentProvider.chainId = dualChainId);
49106
- }, [chainId, web3Instance, dualChainId, dualChainWeb3]);
49107
49105
 
49108
49106
  window.setAccount = /*#__PURE__*/function () {
49109
49107
  var _setAccount = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(acc) {