Skip to content

Commit

Permalink
Merge pull request #21 from Giveth/fix/givpower_unlock_amount_type
Browse files Browse the repository at this point in the history
Changed givpower unlock method type
  • Loading branch information
aminlatifi authored Dec 22, 2022
2 parents e5c40e5 + 1b1e6b0 commit 9504056
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/routes/v1/notificationRouter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1327,8 +1327,11 @@ function sendNotificationTestCases() {
sendSegment: false,
userWalletAddress: generateRandomEthereumAddress(),
metadata: {
amount: 10,
poolName: 'GIVpower',
amount: '10',
round: 13,
transactionHash: generateRandomTxHash(),
network: 100,
},
};

Expand All @@ -1349,7 +1352,10 @@ function sendNotificationTestCases() {
sendSegment: false,
userWalletAddress: generateRandomEthereumAddress(),
metadata: {
round: 11
round: 11,
poolName: 'GIVpower',
transactionHash: generateRandomTxHash(),
network: 100,
},
};

Expand Down
11 changes: 9 additions & 2 deletions src/utils/validators/segmentAndMetadataValidators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,18 @@ const projectBoostedSchema = Joi.object({
});

const givPowerLockedSchema = Joi.object({
amount: Joi.number()?.greater(0).required(),
poolName: Joi.string().required(),
amount: Joi.string().required(),
round: Joi.number()?.greater(0).required(),
transactionHash: Joi.string().required(),
network: Joi.number().required(),
});
const givPowerUnLockedSchema = Joi.object({
amount: Joi.number()?.greater(0).required(),
poolName: Joi.string().required(),
amount: Joi.string().required(),
round: Joi.number()?.greater(0).required(),
transactionHash: Joi.string().required(),
network: Joi.number().required(),
});

const donationTrackerSchema = Joi.object({
Expand Down

0 comments on commit 9504056

Please sign in to comment.