@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.cjs.js CHANGED
@@ -23780,35 +23780,25 @@ function _sendAsync() {
23780
23780
  provider = inputProvider;
23781
23781
 
23782
23782
  if (!(method !== 'eth_chainId')) {
23783
- _context2.next = 12;
23783
+ _context2.next = 9;
23784
23784
  break;
23785
23785
  }
23786
23786
 
23787
23787
  _context2.t0 = parseInt;
23788
- _context2.t1 = provider.chainId;
23789
-
23790
- if (_context2.t1) {
23791
- _context2.next = 8;
23792
- break;
23793
- }
23794
-
23795
- _context2.next = 7;
23788
+ _context2.next = 5;
23796
23789
  return sendAsync(provider, 'eth_chainId');
23797
23790
 
23798
- case 7:
23791
+ case 5:
23799
23792
  _context2.t1 = _context2.sent;
23800
-
23801
- case 8:
23802
- _context2.t2 = _context2.t1;
23803
- chainId = provider.chainId = (0, _context2.t0)(_context2.t2);
23793
+ chainId = (0, _context2.t0)(_context2.t1);
23804
23794
  _ref = sendAsync.context || {
23805
23795
  chainProvider: {}
23806
23796
  }, chainProvider = _ref.chainProvider;
23807
23797
  provider = chainId !== 1 && chainProvider[chainId] ? instrumentedProviders[chainId] = instrumentedProviders[chainId] || new Web3__default["default"].providers.HttpProvider(chainProvider[chainId]) : provider;
23808
23798
 
23809
- case 12:
23799
+ case 9:
23810
23800
  params = Array.prototype.slice.call(_args2).slice(2) || [];
23811
- _context2.next = 15;
23801
+ _context2.next = 12;
23812
23802
  return new Promise( /*#__PURE__*/function () {
23813
23803
  var _ref2 = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee(ok, ko) {
23814
23804
  return regeneratorRuntime.wrap(function _callee$(_context) {
@@ -23848,10 +23838,10 @@ function _sendAsync() {
23848
23838
  };
23849
23839
  }());
23850
23840
 
23851
- case 15:
23841
+ case 12:
23852
23842
  return _context2.abrupt("return", _context2.sent);
23853
23843
 
23854
- case 16:
23844
+ case 13:
23855
23845
  case "end":
23856
23846
  return _context2.stop();
23857
23847
  }
@@ -49111,11 +49101,19 @@ var Web3ContextInitializer = function Web3ContextInitializer(_ref) {
49111
49101
 
49112
49102
  return globalContracts[index];
49113
49103
  };
49104
+ /*useEffect(() => {
49105
+ chainId &&
49106
+ web3Instance &&
49107
+ web3Instance.currentProvider &&
49108
+ !web3Instance.currentProvider.chainId &&
49109
+ (web3Instance.currentProvider.chainId = chainId)
49110
+ dualChainId &&
49111
+ dualChainWeb3 &&
49112
+ dualChainWeb3.currentProvider &&
49113
+ !dualChainWeb3.currentProvider.chainId &&
49114
+ (dualChainWeb3.currentProvider.chainId = dualChainId)
49115
+ }, [chainId, web3Instance, dualChainId, dualChainWeb3])*/
49114
49116
 
49115
- React.useEffect(function () {
49116
- chainId && web3Instance && web3Instance.currentProvider && !web3Instance.currentProvider.chainId && (web3Instance.currentProvider.chainId = chainId);
49117
- dualChainId && dualChainWeb3 && dualChainWeb3.currentProvider && !dualChainWeb3.currentProvider.chainId && (dualChainWeb3.currentProvider.chainId = dualChainId);
49118
- }, [chainId, web3Instance, dualChainId, dualChainWeb3]);
49119
49117
 
49120
49118
  window.setAccount = /*#__PURE__*/function () {
49121
49119
  var _setAccount = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(acc) {