-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kate/87485/add Turbos to the Trade types list #74
Changes from 4 commits
9f4ad33
4adf88d
9a2d186
88c14cd
f9ed9f1
8113f26
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -71,7 +71,7 @@ const IconTradeTypes = ({ type, className, ...props }) => { | |||||||||
return <Icon icon='IcTradetypeTicklow' className={className} color='brand' {...props} />; | ||||||||||
case 'turboslong': | ||||||||||
return <Icon icon='IcTradetypeMultdown' className={className} color='brand' {...props} />; | ||||||||||
case 'turbosshort': | ||||||||||
case 'turbosshot': | ||||||||||
return <Icon icon='IcTradetypeMultup' className={className} color='brand' {...props} />; | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
case 'upordown': | ||||||||||
return <Icon icon='IcTradetypeUpordown' className={className} color='brand' {...props} />; | ||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,51 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import React from 'react'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { localize } from '@deriv/translations'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
export const TurbosLongTradeDescription = () => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const content = [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'paragraph', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
text: localize( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'Predict the market direction, size and also how confident you are that the spot price will not touch the barrier.' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'paragraph', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
text: localize( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'If you select “Long”, you will earn a payout if the spot price never touches the barrier, that is the spot price is always above the barrier. Your payout will grow proportionally according to the distance between the market price and the barrier, with the condition that the spot didn’t cross the barrier at any time during the trade. If the spot price touches or breaches the barrier during the trade, then there won’t be a payout. Select a “Long” contract if you think the market will grow strongly without falling.' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+4
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if only 1 paragraph differs, we can reuse the component 🙂:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the difference between final text will be minor, I'll reuse that component. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'paragraph', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
text: localize( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'Barrier is the level where if the spot price crosses this, then this option will go worthless. This is also used in the calculation of the payout per point. It is expressed in a distance from the spot. Select a further distance to have a lower chance of options getting worthless. We’ve limited the maximum payout for every contract, and it differs for every asset. Your contract will be closed automatically when the maximum payout is reached.' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'paragraph', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
text: localize('You will earn a profit if the payout is higher than the stake.'), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'paragraph', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
text: localize( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'You can determine the expiry for your contract by setting the duration and you can also sell your contract early.' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<React.Fragment> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{content.map(({ type, text }, index) => | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/* We're using the array’s indexes as keys in this “static” list, which is never re-ordered, for better performance. https://www.developerway.com/posts/react-key-attribute | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
We're not using text itself as keys here because text will update each time platform language is changed. */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type === 'heading' ? ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<h2 key={index}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<strong>{text}</strong> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</h2> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
) : ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<p key={index}>{text}</p> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
)} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</React.Fragment> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from 'react'; | ||
import { localize } from '@deriv/translations'; | ||
|
||
export const TurbosShortTradeDescription = () => { | ||
const content = [ | ||
{ | ||
type: 'paragraph', | ||
text: localize( | ||
'Predict the market direction, size and also how confident you are that the spot price will not touch the barrier.' | ||
), | ||
}, | ||
{ | ||
type: 'paragraph', | ||
text: localize( | ||
'If you select “Short”, you will earn a payout if the spot price never touches the barrier, that is the spot price is always below the barrier. Your payout will grow proportionally according to the distance between the market price and the barrier, with the condition that the spot didn’t cross the barrier at any time during the trade. If the spot price touches or breaches the barrier during the trade, then there won’t be a payout. Select a “Short” contract if you think the market will decay strongly without rising.' | ||
), | ||
}, | ||
{ | ||
type: 'paragraph', | ||
text: localize( | ||
'Barrier is the level where if the spot price crosses this, then this option will go worthless. This is also used in the calculation of the payout per point. It is expressed in a distance from the spot. Select a further distance to have a lower chance of options getting worthless. We’ve limited the maximum payout for every contract, and it differs for every asset. Your contract will be closed automatically when the maximum payout is reached.' | ||
), | ||
}, | ||
{ | ||
type: 'paragraph', | ||
text: localize('You will earn a profit if the payout is higher than the stake.'), | ||
}, | ||
{ | ||
type: 'paragraph', | ||
text: localize( | ||
'You can determine the expiry for your contract by setting the duration and you can also sell your contract early.' | ||
), | ||
}, | ||
]; | ||
|
||
return ( | ||
<React.Fragment> | ||
{content.map(({ type, text }, index) => | ||
/* We're using the array’s indexes as keys in this “static” list, which is never re-ordered, for better performance. https://www.developerway.com/posts/react-key-attribute | ||
We're not using text itself as keys here because text will update each time platform language is changed. */ | ||
type === 'heading' ? ( | ||
<h2 key={index}> | ||
<strong>{text}</strong> | ||
</h2> | ||
) : ( | ||
<p key={index}>{text}</p> | ||
) | ||
)} | ||
</React.Fragment> | ||
); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.