Skip to content

Commit

Permalink
fix: allow to delegate only on active workers
Browse files Browse the repository at this point in the history
  • Loading branch information
belopash committed May 8, 2024
1 parent 7f9a243 commit b9a6a6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/subsquid-network-squid/workers-graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
useWorkerDaysUptimeByIdQuery,
WorkerFragmentFragment,
WorkerFullFragmentFragment,
WorkerStatus,
} from './graphql';
import { useNetworkSettings } from './settings-graphql';

Expand Down Expand Up @@ -64,7 +65,7 @@ export class BlockchainApiWorker {
capacity,
utilizedPercent: totalDelegation.div(delegationLimit).mul(100),
},
delegationEnabled: true,
delegationEnabled: worker.status === WorkerStatus.Active,
ownedByMe: worker.realOwner?.id === address,
});

Expand Down

0 comments on commit b9a6a6d

Please sign in to comment.