@ethereansos/interfaces-core 0.4.136 → 0.4.139
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 +93 -21
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +93 -21
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -23758,7 +23758,7 @@ var URL_REGEXP = new RegExp('(http://www.|https://www.|http://|https://)?[a-z0-9
|
|
23758
23758
|
var solidityImportRule = new RegExp('import( )+"(\\d+)"( )*;', 'gs');
|
23759
23759
|
var pragmaSolidityRule = new RegExp('pragma( )+solidity( )*(\\^|>)\\d+.\\d+.\\d+;', 'gs');
|
23760
23760
|
|
23761
|
-
var defaultInstrumentableMethods = ['
|
23761
|
+
var defaultInstrumentableMethods = ['eth_getLogs'];
|
23762
23762
|
|
23763
23763
|
function instrumentProvider(_x, _x2) {
|
23764
23764
|
return _instrumentProvider.apply(this, arguments);
|
@@ -23792,7 +23792,7 @@ function _instrumentProvider() {
|
|
23792
23792
|
return _context.abrupt("return", provider);
|
23793
23793
|
|
23794
23794
|
case 5:
|
23795
|
-
entry = sendAsync.instrumentedProviders.filter(function (it) {
|
23795
|
+
entry = (sendAsync.instrumentedProviders = sendAsync.instrumentedProviders || []).filter(function (it) {
|
23796
23796
|
return it.provider === provider;
|
23797
23797
|
})[0];
|
23798
23798
|
|
@@ -23816,7 +23816,7 @@ function _instrumentProvider() {
|
|
23816
23816
|
provider: provider,
|
23817
23817
|
instrumentedProvider: provider
|
23818
23818
|
};
|
23819
|
-
sendAsync.instrumentedProviders.
|
23819
|
+
sendAsync.instrumentedProviders = [].concat(_toConsumableArray(sendAsync.instrumentProvider || []), [entry]);
|
23820
23820
|
_ref = sendAsync.context || {
|
23821
23821
|
chainProvider: {}
|
23822
23822
|
}, chainProvider = _ref.chainProvider;
|
@@ -23832,26 +23832,17 @@ function _instrumentProvider() {
|
|
23832
23832
|
return _instrumentProvider.apply(this, arguments);
|
23833
23833
|
}
|
23834
23834
|
|
23835
|
-
function
|
23836
|
-
return
|
23835
|
+
function sendAsyncInternal(_x3, _x4, _x5) {
|
23836
|
+
return _sendAsyncInternal.apply(this, arguments);
|
23837
23837
|
}
|
23838
23838
|
|
23839
|
-
function
|
23840
|
-
|
23841
|
-
var provider,
|
23842
|
-
params,
|
23843
|
-
_args3 = arguments;
|
23839
|
+
function _sendAsyncInternal() {
|
23840
|
+
_sendAsyncInternal = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(provider, method, params) {
|
23844
23841
|
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
23845
23842
|
while (1) {
|
23846
23843
|
switch (_context3.prev = _context3.next) {
|
23847
23844
|
case 0:
|
23848
23845
|
_context3.next = 2;
|
23849
|
-
return instrumentProvider(inputProvider, method);
|
23850
|
-
|
23851
|
-
case 2:
|
23852
|
-
provider = _context3.sent;
|
23853
|
-
params = Array.prototype.slice.call(_args3).slice(2) || [];
|
23854
|
-
_context3.next = 6;
|
23855
23846
|
return new Promise( /*#__PURE__*/function () {
|
23856
23847
|
var _ref2 = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(ok, ko) {
|
23857
23848
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
@@ -23886,25 +23877,106 @@ function _sendAsync() {
|
|
23886
23877
|
}, _callee2, null, [[0, 5]]);
|
23887
23878
|
}));
|
23888
23879
|
|
23889
|
-
return function (
|
23880
|
+
return function (_x8, _x9) {
|
23890
23881
|
return _ref2.apply(this, arguments);
|
23891
23882
|
};
|
23892
23883
|
}());
|
23893
23884
|
|
23894
|
-
case
|
23885
|
+
case 2:
|
23895
23886
|
return _context3.abrupt("return", _context3.sent);
|
23896
23887
|
|
23897
|
-
case
|
23888
|
+
case 3:
|
23898
23889
|
case "end":
|
23899
23890
|
return _context3.stop();
|
23900
23891
|
}
|
23901
23892
|
}
|
23902
23893
|
}, _callee3);
|
23903
23894
|
}));
|
23895
|
+
return _sendAsyncInternal.apply(this, arguments);
|
23896
|
+
}
|
23897
|
+
|
23898
|
+
function sendAsync(_x6, _x7) {
|
23904
23899
|
return _sendAsync.apply(this, arguments);
|
23905
23900
|
}
|
23906
23901
|
|
23907
|
-
|
23902
|
+
function _sendAsync() {
|
23903
|
+
_sendAsync = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(provider, method) {
|
23904
|
+
var params,
|
23905
|
+
message,
|
23906
|
+
instrumentedProvider,
|
23907
|
+
_args4 = arguments;
|
23908
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
23909
|
+
while (1) {
|
23910
|
+
switch (_context4.prev = _context4.next) {
|
23911
|
+
case 0:
|
23912
|
+
params = Array.prototype.slice.call(_args4).slice(2) || [];
|
23913
|
+
|
23914
|
+
case 1:
|
23915
|
+
|
23916
|
+
_context4.prev = 2;
|
23917
|
+
_context4.next = 5;
|
23918
|
+
return sendAsyncInternal(provider, method, params);
|
23919
|
+
|
23920
|
+
case 5:
|
23921
|
+
return _context4.abrupt("return", _context4.sent);
|
23922
|
+
|
23923
|
+
case 8:
|
23924
|
+
_context4.prev = 8;
|
23925
|
+
_context4.t0 = _context4["catch"](2);
|
23926
|
+
message = (_context4.t0.stack || _context4.t0.message || _context4.t0.toString()).toLowerCase();
|
23927
|
+
|
23928
|
+
if (!(message.indexOf('execution reverted') !== -1 || message.indexOf('zero result') !== -1)) {
|
23929
|
+
_context4.next = 13;
|
23930
|
+
break;
|
23931
|
+
}
|
23932
|
+
|
23933
|
+
throw _context4.t0;
|
23934
|
+
|
23935
|
+
case 13:
|
23936
|
+
if (!(message.indexOf('429') !== -1)) {
|
23937
|
+
_context4.next = 22;
|
23938
|
+
break;
|
23939
|
+
}
|
23940
|
+
|
23941
|
+
_context4.next = 16;
|
23942
|
+
return instrumentProvider(provider, method);
|
23943
|
+
|
23944
|
+
case 16:
|
23945
|
+
instrumentedProvider = _context4.sent;
|
23946
|
+
|
23947
|
+
if (!(provider === instrumentedProvider)) {
|
23948
|
+
_context4.next = 19;
|
23949
|
+
break;
|
23950
|
+
}
|
23951
|
+
|
23952
|
+
throw _context4.t0;
|
23953
|
+
|
23954
|
+
case 19:
|
23955
|
+
_context4.next = 21;
|
23956
|
+
return sendAsyncInternal(instrumentedProvider, method, params);
|
23957
|
+
|
23958
|
+
case 21:
|
23959
|
+
return _context4.abrupt("return", _context4.sent);
|
23960
|
+
|
23961
|
+
case 22:
|
23962
|
+
_context4.next = 24;
|
23963
|
+
return new Promise(function (ok) {
|
23964
|
+
return setTimeout(ok, 700);
|
23965
|
+
});
|
23966
|
+
|
23967
|
+
case 24:
|
23968
|
+
_context4.next = 1;
|
23969
|
+
break;
|
23970
|
+
|
23971
|
+
case 26:
|
23972
|
+
case "end":
|
23973
|
+
return _context4.stop();
|
23974
|
+
}
|
23975
|
+
}
|
23976
|
+
}, _callee4, null, [[2, 8]]);
|
23977
|
+
}));
|
23978
|
+
return _sendAsync.apply(this, arguments);
|
23979
|
+
}
|
23908
23980
|
|
23909
23981
|
/**
|
23910
23982
|
* Get current ethereum address
|
@@ -48896,7 +48968,7 @@ var useWeb3 = function useWeb3() {
|
|
48896
48968
|
};
|
48897
48969
|
var Web3ContextProvider = function Web3ContextProvider(props) {
|
48898
48970
|
var context = useEthosContext();
|
48899
|
-
sendAsync.context = sendAsync.context || context;
|
48971
|
+
sendAsync.context = sendAsync.context || _objectSpread2({}, context);
|
48900
48972
|
var connectors = context.useWalletSettings.reduce(function (acc, connector) {
|
48901
48973
|
return _objectSpread2(_objectSpread2({}, acc), _defineProperty({}, connector.id, _objectSpread2(_objectSpread2({}, connector.settings), {}, {
|
48902
48974
|
buttonText: connector.buttonText
|