Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function ProgramPayoutSettingsModalInner({
Payout holding period
</h4>
<p className="text-sm font-medium text-neutral-500">
Set how long to hold funds before they can be withdrawn.
Set how long to hold funds before they are eligible for payout.
</p>
</div>
<div>
Expand All @@ -139,7 +139,8 @@ function ProgramPayoutSettingsModalInner({
Minimum payout amount
</h4>
<p className="text-sm font-medium text-neutral-500">
Set the minimum amount required for payouts to be processed.
Set the minimum amount required for funds to be eligible for
payout.
</p>
</div>

Expand Down
4 changes: 2 additions & 2 deletions apps/web/lib/zod/schemas/rewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ export const rewardConditionSchema = z.object({
export const PERCENTAGE_REWARD_AMOUNT_SCHEMA = z
.number()
.min(0, { message: "Reward percentage amount cannot be less than 0%" })
.max(99.99, {
message: "Reward percentage amount cannot be greater than 99.99%",
.max(100, {
message: "Reward percentage amount cannot be greater than 100%",
});

export const FLAT_REWARD_AMOUNT_SCHEMA = z
Expand Down
2 changes: 1 addition & 1 deletion packages/prisma/schema/reward.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ model Reward {
event EventType
type RewardStructure @default(percentage)
amountInCents Int?
amountInPercentage Decimal? @db.Decimal(4, 2)
amountInPercentage Decimal? @db.Decimal(5, 2)
amount Int @default(0) // TODO: Remove after migration
maxDuration Int? // in months (0 -> not recurring, null -> infinite)
modifiers Json? @db.Json
Expand Down