diff --git a/src/services/DappsStakingEvents.ts b/src/services/DappsStakingEvents.ts index bb2d034..a225024 100644 --- a/src/services/DappsStakingEvents.ts +++ b/src/services/DappsStakingEvents.ts @@ -354,14 +354,15 @@ export class DappsStakingEvents extends ServiceBase implements IDappsStakingEven } ) { stakersCount + stakersAmount id } }`, }); const stakersCount = result.data.data.stakersCountAggregatedDailies.map( - (node: { id: string; stakersCount: number }) => { - return [node.id, node.stakersCount]; + (node: { id: string; stakersCount: number; stakersAmount: number }) => { + return [node.id, node.stakersCount, node.stakersAmount]; }, ); @@ -404,13 +405,8 @@ export class DappsStakingEvents extends ServiceBase implements IDappsStakingEven private getApiUrl(network: NetworkType): string { // For local development: `http://localhost:4350/graphql`; - switch (network) { - case 'astar': - return 'https://squid.subsquid.io/dapps-staking-indexer/graphql'; - case 'shibuya': - return 'https://squid.subsquid.io/dapps-staking-indexer-shibuya/v/v1/graphql'; - default: - return 'https://squid.subsquid.io/dapps-staking-indexer/graphql'; - } + return ['astar', 'shiden', 'shibuya'].includes(network) + ? `https://squid.subsquid.io/dapps-staking-indexer-${network}/graphql` + : ''; } }