Skip to content

Commit

Permalink
fix: use checksum addresses in delegations (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR authored Nov 27, 2024
1 parent 67b07bd commit 3594434
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/compute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,18 @@ async function getNetworkDelegations(network: string) {
return cache.data;
}

const delegations = await snapshotjs.utils.getDelegatesBySpace(
const delegationsData = await snapshotjs.utils.getDelegatesBySpace(
network,
null,
'latest'
);

const delegations = delegationsData.map(delegation => ({
...delegation,
delegate: snapshotjs.utils.getFormattedAddress(delegation.delegate, 'evm'),
delegator: snapshotjs.utils.getFormattedAddress(delegation.delegator, 'evm')
}));

networkDelegationsCache.set(network, {
timestamp: now,
data: delegations
Expand Down

0 comments on commit 3594434

Please sign in to comment.