Skip to content

Commit

Permalink
Fix pure proxy setting, #919
Browse files Browse the repository at this point in the history
  • Loading branch information
wliyongfeng committed Aug 21, 2024
1 parent 3db9ddc commit a815f9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/packages/pallet-proxy-scan/src/play.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
(async () => {
await initPalletProxyScanDb();
await subscribeFinalizedHeight();
const blockHeights = [188889, 744556];
const blockHeights = [246631, 18644209];

const api = await getApi();
for (const height of blockHeights) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { generateProxyId } = require("../../../common/hash");
const {
palletProxy: { upsertProxyIfNo, getProxyTimelineCol },
palletProxy: { upsertProxyIfNo, getProxyTimelineCol, isPureProxyDelegator },
} = require("@statescan/mongo");

async function handleProxyAdded(event, indexer) {
Expand All @@ -10,14 +10,15 @@ async function handleProxyAdded(event, indexer) {
const delay = event.data[3].toNumber();
const proxyId = generateProxyId(delegator, delegatee, type, delay);

const isPure = await isPureProxyDelegator(delegator);
await upsertProxyIfNo({
proxyId,
delegator,
delegatee,
type,
delay,
isRemoved: false,
isPure: false,
isPure,
indexer,
});

Expand Down

0 comments on commit a815f9d

Please sign in to comment.