Skip to content

Commit

Permalink
fix: use checksum addresses in delegations
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR committed Nov 26, 2024
1 parent 2b025d4 commit 8c1c7bc
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 8c1c7bc

Please sign in to comment.