@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/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,20 @@ 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
|
+
return [res]
|
|
29801
|
+
}
|
|
29801
29802
|
|
|
29803
|
+
case 'balances': {
|
|
29804
|
+
const balance = await dataClient.getTotalBalanceV2(resolved);
|
|
29805
|
+
return [{ 'CRC Balance': balance }]
|
|
29806
|
+
}
|
|
29802
29807
|
default:
|
|
29803
29808
|
throw new ValidationError('Unsupported functionName')
|
|
29804
29809
|
}
|
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,20 @@ 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
|
+
return [res]
|
|
29799
|
+
}
|
|
29799
29800
|
|
|
29801
|
+
case 'balances': {
|
|
29802
|
+
const balance = await dataClient.getTotalBalanceV2(resolved);
|
|
29803
|
+
return [{ 'CRC Balance': balance }]
|
|
29804
|
+
}
|
|
29800
29805
|
default:
|
|
29801
29806
|
throw new ValidationError('Unsupported functionName')
|
|
29802
29807
|
}
|
package/package.json
CHANGED