Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 20c5456

Browse files
will pankiewiczwill pankiewicz
authored andcommitted
add kyc validity check
1 parent f837720 commit 20c5456

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/common/src/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export type ConfigSchema = {
3131
minSelfStake: number;
3232
commission: number;
3333
unclaimedEraThreshold: number;
34+
enableKYC: boolean;
3435
};
3536
cron: {
3637
monitor: string;

packages/common/src/constraints/CheckCandidates.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
checkConnectionTime,
99
checkIdentity,
1010
checkKusamaRank,
11+
checkKYC,
1112
checkLatestClientVersion,
1213
checkOffline,
1314
checkOnline,
@@ -129,8 +130,10 @@ export const checkCandidate = async (
129130
logger.info(`${candidate.name} beefy keys not valid`, constraintsLabel);
130131
}
131132

132-
// TODO: enable at deadline
133-
const kycValid = true; //await checkKYC(candidate);
133+
const kycValid =
134+
constraints.config?.constraints?.enableKYC == true
135+
? await checkKYC(candidate)
136+
: true;
134137
if (!kycValid) {
135138
logger.info(`${candidate.name} kyc not valid`, constraintsLabel);
136139
}

0 commit comments

Comments
 (0)