diff --git a/src/entities/projectVerificationForm.ts b/src/entities/projectVerificationForm.ts index acaf0eebb..172e0f4c4 100644 --- a/src/entities/projectVerificationForm.ts +++ b/src/entities/projectVerificationForm.ts @@ -96,6 +96,8 @@ export class FormRelatedAddress { @Field({ nullable: true }) address: string; @Field({ nullable: true }) + memo?: string; + @Field({ nullable: true }) networkId: number; @Field(_type => ChainType, { defaultValue: ChainType.EVM, nullable: true }) chainType?: ChainType; diff --git a/src/resolvers/projectVerificationFormResolver.test.ts b/src/resolvers/projectVerificationFormResolver.test.ts index d06773e09..ef45cf510 100644 --- a/src/resolvers/projectVerificationFormResolver.test.ts +++ b/src/resolvers/projectVerificationFormResolver.test.ts @@ -5,6 +5,7 @@ import { generateConfirmationEmailToken, generateRandomEtheriumAddress, generateRandomSolanaAddress, + generateRandomStellarAddress, generateTestAccessToken, graphqlUrl, saveProjectDirectlyToDb, @@ -352,6 +353,13 @@ function updateProjectVerificationFormMutationTestCases() { title: 'test title', chainType: ChainType.EVM, }, + { + address: generateRandomStellarAddress(), + networkId: NETWORK_IDS.STELLAR_MAINNET, + title: 'test title', + chainType: ChainType.STELLAR, + memo: '123123', + }, // { // address: generateRandomSolanaAddress(), // networkId: NETWORK_IDS.SOLANA_MAINNET, diff --git a/src/utils/validators/graphqlQueryValidators.ts b/src/utils/validators/graphqlQueryValidators.ts index 732f04fe6..072f62a31 100644 --- a/src/utils/validators/graphqlQueryValidators.ts +++ b/src/utils/validators/graphqlQueryValidators.ts @@ -239,7 +239,9 @@ const managingFundsValidator = Joi.object({ address: Joi.alternatives().try( Joi.string().required().pattern(ethereumWalletAddressRegex), Joi.string().required().pattern(solanaWalletAddressRegex), + Joi.string().required().pattern(stellarWalletAddressRegex), ), + memo: Joi.string().allow('', null).max(24), networkId: Joi.number()?.valid( 0, // frontend may send 0 as a network id for solana, so we should allow it NETWORK_IDS.SOLANA_MAINNET, // Solana @@ -262,9 +264,10 @@ const managingFundsValidator = Joi.object({ NETWORK_IDS.XDAI, NETWORK_IDS.ETC, NETWORK_IDS.MORDOR_ETC_TESTNET, + NETWORK_IDS.STELLAR_MAINNET, ), chainType: Joi.string() - .valid(ChainType.EVM, ChainType.SOLANA) + .valid(ChainType.EVM, ChainType.SOLANA, ChainType.STELLAR) .default(ChainType.EVM), }), ),