diff --git a/src/entities/projectVerificationForm.ts b/src/entities/projectVerificationForm.ts index 9e2f1decd..e38bf3213 100644 --- a/src/entities/projectVerificationForm.ts +++ b/src/entities/projectVerificationForm.ts @@ -16,6 +16,7 @@ import { Field, ID, ObjectType } from 'type-graphql'; import { Project } from './project'; import { User } from './user'; import { SocialProfile } from './socialProfile'; +import { ChainType } from '../types/network'; export enum PROJECT_VERIFICATION_STATUSES { VERIFIED = 'verified', @@ -96,6 +97,8 @@ export class FormRelatedAddress { address: string; @Field({ nullable: true }) networkId: number; + @Field(type => ChainType, { defaultValue: ChainType.EVM }) + chainType?: ChainType; } @ObjectType() diff --git a/src/utils/validators/graphqlQueryValidators.ts b/src/utils/validators/graphqlQueryValidators.ts index e5f602f8c..a55f39f2e 100644 --- a/src/utils/validators/graphqlQueryValidators.ts +++ b/src/utils/validators/graphqlQueryValidators.ts @@ -10,6 +10,7 @@ import { NETWORK_IDS } from '../../provider'; import { DONATION_STATUS } from '../../entities/donation'; import { PROJECT_VERIFICATION_STATUSES } from '../../entities/projectVerificationForm'; import { countriesList } from '../utils'; +import { ChainType } from '../../types/network'; const filterDateRegex = new RegExp('^[0-9]{8} [0-9]{2}:[0-9]{2}:[0-9]{2}$'); const resourcePerDateRegex = new RegExp( @@ -156,6 +157,7 @@ const managingFundsValidator = Joi.object({ title: Joi.string().required(), address: Joi.string().required().pattern(ethereumWalletAddressRegex), networkId: Joi.number()?.valid( + 0, // Solana NETWORK_IDS.MAIN_NET, NETWORK_IDS.ROPSTEN, NETWORK_IDS.GOERLI, @@ -165,6 +167,9 @@ const managingFundsValidator = Joi.object({ NETWORK_IDS.OPTIMISTIC, NETWORK_IDS.XDAI, ), + chainType: Joi.string() + .valid(ChainType.EVM, ChainType.SOLANA) + .default(ChainType.EVM), }), ), });