Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #211 from hubert-deriv/markupvalue2
Browse files Browse the repository at this point in the history
  • Loading branch information
hubert-deriv authored Aug 7, 2023
2 parents 469e975 + e470ef2 commit 589c884
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
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

1 comment on commit 589c884

@vercel
Copy link

@vercel vercel bot commented on 589c884 Aug 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-api-docs – ./

deriv-api-docs.binary.sx
deriv-api-docs-git-master.binary.sx

Please sign in to comment.