Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.
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
4 changes: 2 additions & 2 deletions config/v3/app_register/send.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"enum": [1]
},
"app_markup_percentage": {
"description": "[Optional] Markup to be added to contract prices (as a percentage of contract payout).",
"description": "[Optional] Markup to be added to contract prices (as a percentage of contract payout). Max markup: 3%.",
"type": "number",
"maximum": 5,
"maximum": 3,
"minimum": 0
},
"appstore": {
Expand Down
4 changes: 2 additions & 2 deletions config/v3/app_update/send.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"type": "integer"
},
"app_markup_percentage": {
"description": "[Optional] Markup to be added to contract prices (as a percentage of contract payout).",
"description": "[Optional] Markup to be added to contract prices (as a percentage of contract payout). Max markup: 3%.",
"type": "number",
"maximum": 5,
"maximum": 3,
"minimum": 0
},
"appstore": {
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/markup-calculation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ description: How is markup calculated?

## Markup

Increase your earnings by charging markups on each contract purchased through the trading app you've created with the Deriv API. The markup is defined by you and can be up to 5%.
Increase your earnings by charging markups on each contract purchased through the trading app you've created with the Deriv API. The markup is defined by you and can be up to 3%.

Below is an example of how the markup is calculated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ describe('App Form', () => {
await userEvent.click(submitButton);

const appMarkupPercentageError = await screen.findByText(
'Your markup value must be equal to or above 0.00 and no more than 5.00.',
'Your markup value must be equal to or above 0.00 and no more than 3.00.',
);

expect(appMarkupPercentageError).toBeInTheDocument();
Expand Down
4 changes: 2 additions & 2 deletions src/features/dashboard/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as yup from 'yup';

const markupPercentageRegex = /^((([0-4]\.([0-9]([0-9])?)?))||([5]\.([0]([0])?)?)||([0-5]))$/;
const markupPercentageRegex = /^((([0-2]\.([0-9]([0-9])?)?))||([3]\.([0]([0])?)?)||([0-3]))$/;
const urlRegex = /^[a-z][a-z0-9.+-]*:\/\/[0-9a-zA-Z.-]+[%/\w .-]*$/;

const base_schema = {
Expand Down Expand Up @@ -46,7 +46,7 @@ const base_schema = {
.max(4, 'Your markup value cannot be more than 4 characters.')
.matches(
markupPercentageRegex,
'Your markup value must be equal to or above 0.00 and no more than 5.00.',
'Your markup value must be equal to or above 0.00 and no more than 3.00.',
),
app_id: yup.number(),
};
Expand Down