@snapshot-labs/snapshot.js 0.12.6 → 0.12.7
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/snapshot.cjs.js
CHANGED
|
@@ -3610,7 +3610,7 @@ function getDelegatesBySpace(network_1, space_1) {
|
|
|
3610
3610
|
}
|
|
3611
3611
|
let pivot = 0;
|
|
3612
3612
|
const result = new Map();
|
|
3613
|
-
const spaceIn = buildSpaceIn(space);
|
|
3613
|
+
const spaceIn = space ? buildSpaceIn(space) : null;
|
|
3614
3614
|
while (true) {
|
|
3615
3615
|
const newResults = yield fetchData({
|
|
3616
3616
|
url: subgraphUrl,
|
|
@@ -3656,7 +3656,6 @@ function fetchData(_a) {
|
|
|
3656
3656
|
delegations: {
|
|
3657
3657
|
__args: {
|
|
3658
3658
|
where: {
|
|
3659
|
-
space_in: spaces,
|
|
3660
3659
|
timestamp_gte: pivot
|
|
3661
3660
|
},
|
|
3662
3661
|
first: PAGE_SIZE,
|
|
@@ -3673,6 +3672,9 @@ function fetchData(_a) {
|
|
|
3673
3672
|
if (snapshot !== 'latest') {
|
|
3674
3673
|
params.delegations.__args.block = { number: snapshot };
|
|
3675
3674
|
}
|
|
3675
|
+
if (spaces !== null) {
|
|
3676
|
+
params.delegations.__args.where.space_in = spaces;
|
|
3677
|
+
}
|
|
3676
3678
|
return (yield subgraphRequest(url, params)).delegations || [];
|
|
3677
3679
|
});
|
|
3678
3680
|
}
|
package/dist/snapshot.esm.js
CHANGED
|
@@ -3600,7 +3600,7 @@ function getDelegatesBySpace(network_1, space_1) {
|
|
|
3600
3600
|
}
|
|
3601
3601
|
let pivot = 0;
|
|
3602
3602
|
const result = new Map();
|
|
3603
|
-
const spaceIn = buildSpaceIn(space);
|
|
3603
|
+
const spaceIn = space ? buildSpaceIn(space) : null;
|
|
3604
3604
|
while (true) {
|
|
3605
3605
|
const newResults = yield fetchData({
|
|
3606
3606
|
url: subgraphUrl,
|
|
@@ -3646,7 +3646,6 @@ function fetchData(_a) {
|
|
|
3646
3646
|
delegations: {
|
|
3647
3647
|
__args: {
|
|
3648
3648
|
where: {
|
|
3649
|
-
space_in: spaces,
|
|
3650
3649
|
timestamp_gte: pivot
|
|
3651
3650
|
},
|
|
3652
3651
|
first: PAGE_SIZE,
|
|
@@ -3663,6 +3662,9 @@ function fetchData(_a) {
|
|
|
3663
3662
|
if (snapshot !== 'latest') {
|
|
3664
3663
|
params.delegations.__args.block = { number: snapshot };
|
|
3665
3664
|
}
|
|
3665
|
+
if (spaces !== null) {
|
|
3666
|
+
params.delegations.__args.where.space_in = spaces;
|
|
3667
|
+
}
|
|
3666
3668
|
return (yield subgraphRequest(url, params)).delegations || [];
|
|
3667
3669
|
});
|
|
3668
3670
|
}
|