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

Commit 2c6ee77

Browse files
authored
Merge pull request #202 from sanjam-deriv/markupvalue
2 parents d3be49a + 5f37277 commit 2c6ee77

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

docs/guides/markup-calculation/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description: How is markup calculated?
2121

2222
## Markup
2323

24-
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%.
24+
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%.
2525

2626
Below is an example of how the markup is calculated.
2727

src/features/dashboard/components/AppForm/__tests__/app-form.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ describe('App Form', () => {
158158
await userEvent.click(submitButton);
159159

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

164164
expect(appMarkupPercentageError).toBeInTheDocument();

src/features/dashboard/components/AppForm/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ const AppForm = ({
163163
<label htmlFor='app_markup_percentage'>Markup percentage (optional)</label>
164164
</div>
165165
<Text as='p' type='paragraph-1' className={styles.helperText}>
166-
If you don&lsquo;t want to earn a markup, enter 0 here. Otherwise, enter a number
167-
up to 5. Maximum: 5.00%.
166+
Enter 0 if you don&lsquo;t want to earn a markup. Max markup: 3%
168167
</Text>
169168
{errors && errors?.app_markup_percentage && (
170169
<Text as='span' type='paragraph-1' className='error-message'>

src/features/dashboard/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as yup from 'yup';
22

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

66
const base_schema = {
@@ -34,7 +34,7 @@ const base_schema = {
3434
.max(4, 'Your markup value cannot be more than 4 characters.')
3535
.matches(
3636
markupPercentageRegex,
37-
'Your markup value must be equal to or above 0.00 and no more than 5.00.',
37+
'Your markup value must be equal to or above 0.00 and no more than 3.00.',
3838
),
3939
app_id: yup.number(),
4040
};

0 commit comments

Comments
 (0)