From f217fddaf63a60cea0c3e0dc9051b09c069df15c Mon Sep 17 00:00:00 2001 From: sanjam chhatwal Date: Mon, 3 Jul 2023 15:54:32 +0400 Subject: [PATCH 1/3] chore: markup change --- docs/guides/markup-calculation/index.md | 2 +- src/features/dashboard/components/AppForm/index.tsx | 2 +- src/features/dashboard/types.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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/index.tsx b/src/features/dashboard/components/AppForm/index.tsx index 7942915d..88aaab1f 100644 --- a/src/features/dashboard/components/AppForm/index.tsx +++ b/src/features/dashboard/components/AppForm/index.tsx @@ -164,7 +164,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%. + up to 3. Maximum: 3.00%. {errors && errors?.app_markup_percentage && ( diff --git a/src/features/dashboard/types.ts b/src/features/dashboard/types.ts index f4bd28df..1f6925ab 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(), }; From f4a3ed8297eee591c1def6d472ce836e7d1c1f3b Mon Sep 17 00:00:00 2001 From: sanjam chhatwal Date: Tue, 4 Jul 2023 10:10:34 +0400 Subject: [PATCH 2/3] chore: markup change --- .../dashboard/components/AppForm/__tests__/app-form.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 20fe8017..376e1a30 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(); From 5f37277a471bfbb7014ffc3a9827f4cfa8ffd497 Mon Sep 17 00:00:00 2001 From: sanjam chhatwal Date: Wed, 5 Jul 2023 16:17:34 +0400 Subject: [PATCH 3/3] chore: markup sentence change --- src/features/dashboard/components/AppForm/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/features/dashboard/components/AppForm/index.tsx b/src/features/dashboard/components/AppForm/index.tsx index 88aaab1f..c61f238a 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 3. Maximum: 3.00%. + Enter 0 if you don‘t want to earn a markup. Max markup: 3% {errors && errors?.app_markup_percentage && (