diff --git a/docs/guides/markup-calculation/index.md b/docs/guides/markup-calculation/index.md index 63010168b..a5881aba2 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 20fe8017f..376e1a30b 100644 --- a/src/features/dashboard/components/AppForm/__tests__/app-form.test.tsx +++ b/src/features/dashboard/components/AppForm/__tests__/app-form.test.tsx @@ -158,7 +158,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/components/AppForm/index.tsx b/src/features/dashboard/components/AppForm/index.tsx index 7942915d2..c61f238a5 100644 --- a/src/features/dashboard/components/AppForm/index.tsx +++ b/src/features/dashboard/components/AppForm/index.tsx @@ -163,8 +163,7 @@ const AppForm = ({ - If you don‘t want to earn a markup, enter 0 here. Otherwise, enter a number - up to 5. Maximum: 5.00%. + Enter 0 if you don‘t want to earn a markup. Max markup: 3% {errors && errors?.app_markup_percentage && ( diff --git a/src/features/dashboard/types.ts b/src/features/dashboard/types.ts index f4bd28df5..1f6925ab3 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 = { @@ -34,7 +34,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(), };