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