diff --git a/config/v3/app_register/send.json b/config/v3/app_register/send.json index 7d77cf71..6cb77b97 100644 --- a/config/v3/app_register/send.json +++ b/config/v3/app_register/send.json @@ -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": { diff --git a/config/v3/app_update/send.json b/config/v3/app_update/send.json index a152741f..5389e3ed 100644 --- a/config/v3/app_update/send.json +++ b/config/v3/app_update/send.json @@ -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": { diff --git a/docs/guides/markup-calculation/index.md b/docs/guides/markup-calculation/index.md index 63010168..a5881aba 100644 --- a/docs/guides/markup-calculation/index.md +++ b/docs/guides/markup-calculation/index.md @@ -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. diff --git a/src/features/dashboard/components/AppForm/__tests__/app-form.test.tsx b/src/features/dashboard/components/AppForm/__tests__/app-form.test.tsx index 36c2d58c..8092728e 100644 --- a/src/features/dashboard/components/AppForm/__tests__/app-form.test.tsx +++ b/src/features/dashboard/components/AppForm/__tests__/app-form.test.tsx @@ -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(); diff --git a/src/features/dashboard/types.ts b/src/features/dashboard/types.ts index f9cf8a73..553629bf 100644 --- a/src/features/dashboard/types.ts +++ b/src/features/dashboard/types.ts @@ -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 = { @@ -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(), };