@fileverse-dev/formulajs 4.4.31-circles-patch-2 → 4.4.31-circles-patch-3
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 +27 -13
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +13 -7
- package/lib/esm/index.mjs +13 -7
- package/package.json +1 -1
package/lib/cjs/index.cjs
CHANGED
|
@@ -29777,6 +29777,8 @@ async function CIRCLES() {
|
|
|
29777
29777
|
const resolved = await fromEnsNameToAddress$1.validateAndGetAddress(address);
|
|
29778
29778
|
const dataClient = new CirclesData('https://rpc.aboutcircles.com');
|
|
29779
29779
|
|
|
29780
|
+
const limit = Number.isFinite(Number(entries)) && Number(entries) > 0 ? Number(entries) : 10;
|
|
29781
|
+
|
|
29780
29782
|
const runOnePage = async (maybeQuery) => {
|
|
29781
29783
|
const q = await maybeQuery;
|
|
29782
29784
|
if (q && typeof q.queryNextPage === 'function') {
|
|
@@ -29788,17 +29790,21 @@ async function CIRCLES() {
|
|
|
29788
29790
|
|
|
29789
29791
|
switch (functionName) {
|
|
29790
29792
|
case 'trust':
|
|
29791
|
-
return await runOnePage(dataClient.getTrustRelations(resolved,
|
|
29793
|
+
return await runOnePage(dataClient.getTrustRelations(resolved, limit))
|
|
29792
29794
|
|
|
29793
29795
|
case 'transactions':
|
|
29794
|
-
return await runOnePage(dataClient.getTransactionHistory(resolved,
|
|
29795
|
-
|
|
29796
|
-
case 'profile':
|
|
29797
|
-
return dataClient.getAvatarInfo(resolved)
|
|
29796
|
+
return await runOnePage(dataClient.getTransactionHistory(resolved, limit))
|
|
29798
29797
|
|
|
29799
|
-
case '
|
|
29800
|
-
|
|
29798
|
+
case 'profile': {
|
|
29799
|
+
const res = await dataClient.getAvatarInfo(resolved);
|
|
29800
|
+
const flat = flattenObject(res);
|
|
29801
|
+
return flat
|
|
29802
|
+
}
|
|
29801
29803
|
|
|
29804
|
+
case 'balances': {
|
|
29805
|
+
const balance = await dataClient.getTotalBalanceV2(resolved);
|
|
29806
|
+
return [{ 'CRC Balance': balance }]
|
|
29807
|
+
}
|
|
29802
29808
|
default:
|
|
29803
29809
|
throw new ValidationError('Unsupported functionName')
|
|
29804
29810
|
}
|
package/lib/esm/index.mjs
CHANGED
|
@@ -29775,6 +29775,8 @@ async function CIRCLES() {
|
|
|
29775
29775
|
const resolved = await fromEnsNameToAddress$1.validateAndGetAddress(address);
|
|
29776
29776
|
const dataClient = new CirclesData('https://rpc.aboutcircles.com');
|
|
29777
29777
|
|
|
29778
|
+
const limit = Number.isFinite(Number(entries)) && Number(entries) > 0 ? Number(entries) : 10;
|
|
29779
|
+
|
|
29778
29780
|
const runOnePage = async (maybeQuery) => {
|
|
29779
29781
|
const q = await maybeQuery;
|
|
29780
29782
|
if (q && typeof q.queryNextPage === 'function') {
|
|
@@ -29786,17 +29788,21 @@ async function CIRCLES() {
|
|
|
29786
29788
|
|
|
29787
29789
|
switch (functionName) {
|
|
29788
29790
|
case 'trust':
|
|
29789
|
-
return await runOnePage(dataClient.getTrustRelations(resolved,
|
|
29791
|
+
return await runOnePage(dataClient.getTrustRelations(resolved, limit))
|
|
29790
29792
|
|
|
29791
29793
|
case 'transactions':
|
|
29792
|
-
return await runOnePage(dataClient.getTransactionHistory(resolved,
|
|
29793
|
-
|
|
29794
|
-
case 'profile':
|
|
29795
|
-
return dataClient.getAvatarInfo(resolved)
|
|
29794
|
+
return await runOnePage(dataClient.getTransactionHistory(resolved, limit))
|
|
29796
29795
|
|
|
29797
|
-
case '
|
|
29798
|
-
|
|
29796
|
+
case 'profile': {
|
|
29797
|
+
const res = await dataClient.getAvatarInfo(resolved);
|
|
29798
|
+
const flat = flattenObject(res);
|
|
29799
|
+
return flat
|
|
29800
|
+
}
|
|
29799
29801
|
|
|
29802
|
+
case 'balances': {
|
|
29803
|
+
const balance = await dataClient.getTotalBalanceV2(resolved);
|
|
29804
|
+
return [{ 'CRC Balance': balance }]
|
|
29805
|
+
}
|
|
29800
29806
|
default:
|
|
29801
29807
|
throw new ValidationError('Unsupported functionName')
|
|
29802
29808
|
}
|
package/package.json
CHANGED