@fileverse-dev/formulajs 4.4.31-circles-patch-2 → 4.4.31-circles-patch-4
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/lib/browser/formula.js +26 -13
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +12 -7
- package/lib/esm/index.mjs +12 -7
- package/package.json +1 -1
package/lib/browser/formula.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @fileverse-dev/formulajs v4.4.31-circles-patch-
|
|
1
|
+
/* @fileverse-dev/formulajs v4.4.31-circles-patch-4 */
|
|
2
2
|
var _excluded = [ "confirmations", "dataDecoded" ];
|
|
3
3
|
|
|
4
4
|
function _objectWithoutProperties(e, t) {
|
|
@@ -28989,7 +28989,7 @@ function _typeof(o) {
|
|
|
28989
28989
|
}
|
|
28990
28990
|
function _CIRCLES() {
|
|
28991
28991
|
_CIRCLES = _asyncToGenerator(_regenerator().m(function _callee68() {
|
|
28992
|
-
var _argsToArray39, _argsToArray40, address, functionName, entries, resolved, dataClient, runOnePage, _args73 = arguments, _t39, _t40;
|
|
28992
|
+
var _argsToArray39, _argsToArray40, address, functionName, entries, resolved, dataClient, limit, runOnePage, res, balance, _args73 = arguments, _t39, _t40;
|
|
28993
28993
|
return _regenerator().w(function(_context73) {
|
|
28994
28994
|
while (1) switch (_context73.p = _context73.n) {
|
|
28995
28995
|
case 0:
|
|
@@ -29007,6 +29007,7 @@ function _typeof(o) {
|
|
|
29007
29007
|
case 1:
|
|
29008
29008
|
resolved = _context73.v;
|
|
29009
29009
|
dataClient = new CirclesData("https://rpc.aboutcircles.com");
|
|
29010
|
+
limit = Number.isFinite(Number(entries)) && Number(entries) > 0 ? Number(entries) : 10;
|
|
29010
29011
|
runOnePage = function() {
|
|
29011
29012
|
var _ref44 = _asyncToGenerator(_regenerator().m(function _callee67(maybeQuery) {
|
|
29012
29013
|
var q, _q$currentPage$result, _q$currentPage, has;
|
|
@@ -29039,45 +29040,57 @@ function _typeof(o) {
|
|
|
29039
29040
|
};
|
|
29040
29041
|
}();
|
|
29041
29042
|
_t39 = functionName;
|
|
29042
|
-
_context73.n = _t39 === "trust" ? 2 : _t39 === "transactions" ? 4 : _t39 === "profile" ? 6 : _t39 === "balances" ?
|
|
29043
|
+
_context73.n = _t39 === "trust" ? 2 : _t39 === "transactions" ? 4 : _t39 === "profile" ? 6 : _t39 === "balances" ? 8 : 10;
|
|
29043
29044
|
break;
|
|
29044
29045
|
|
|
29045
29046
|
case 2:
|
|
29046
29047
|
_context73.n = 3;
|
|
29047
|
-
return runOnePage(dataClient.getTrustRelations(resolved,
|
|
29048
|
+
return runOnePage(dataClient.getTrustRelations(resolved, limit));
|
|
29048
29049
|
|
|
29049
29050
|
case 3:
|
|
29050
29051
|
return _context73.a(2, _context73.v);
|
|
29051
29052
|
|
|
29052
29053
|
case 4:
|
|
29053
29054
|
_context73.n = 5;
|
|
29054
|
-
return runOnePage(dataClient.getTransactionHistory(resolved,
|
|
29055
|
+
return runOnePage(dataClient.getTransactionHistory(resolved, limit));
|
|
29055
29056
|
|
|
29056
29057
|
case 5:
|
|
29057
29058
|
return _context73.a(2, _context73.v);
|
|
29058
29059
|
|
|
29059
29060
|
case 6:
|
|
29060
|
-
|
|
29061
|
+
_context73.n = 7;
|
|
29062
|
+
return dataClient.getAvatarInfo(resolved);
|
|
29061
29063
|
|
|
29062
29064
|
case 7:
|
|
29063
|
-
|
|
29065
|
+
res = _context73.v;
|
|
29066
|
+
return _context73.a(2, [ res ]);
|
|
29064
29067
|
|
|
29065
29068
|
case 8:
|
|
29066
|
-
|
|
29069
|
+
_context73.n = 9;
|
|
29070
|
+
return dataClient.getTotalBalanceV2(resolved);
|
|
29067
29071
|
|
|
29068
29072
|
case 9:
|
|
29069
|
-
|
|
29070
|
-
|
|
29073
|
+
balance = _context73.v;
|
|
29074
|
+
return _context73.a(2, [ {
|
|
29075
|
+
"CRC Balance": balance
|
|
29076
|
+
} ]);
|
|
29071
29077
|
|
|
29072
29078
|
case 10:
|
|
29073
|
-
|
|
29079
|
+
throw new ValidationError("Unsupported functionName");
|
|
29080
|
+
|
|
29081
|
+
case 11:
|
|
29082
|
+
_context73.n = 13;
|
|
29083
|
+
break;
|
|
29084
|
+
|
|
29085
|
+
case 12:
|
|
29086
|
+
_context73.p = 12;
|
|
29074
29087
|
_t40 = _context73.v;
|
|
29075
29088
|
return _context73.a(2, errorMessageHandler(_t40, "CIRCLES"));
|
|
29076
29089
|
|
|
29077
|
-
case
|
|
29090
|
+
case 13:
|
|
29078
29091
|
return _context73.a(2);
|
|
29079
29092
|
}
|
|
29080
|
-
}, _callee68, null, [ [ 0,
|
|
29093
|
+
}, _callee68, null, [ [ 0, 12 ] ]);
|
|
29081
29094
|
}));
|
|
29082
29095
|
return _CIRCLES.apply(this, arguments);
|
|
29083
29096
|
}
|