@ethereansos/interfaces-core 0.4.122 → 0.4.125

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