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

Mahdiyeh/ remove_cryptocurrency_market#1547

Merged
mustofa-binary merged 3 commits intobinary-com:masterfrom
mahdiyeh-deriv:remove_cryptocurrency_market
Jun 23, 2021
Merged

Mahdiyeh/ remove_cryptocurrency_market#1547
mustofa-binary merged 3 commits intobinary-com:masterfrom
mahdiyeh-deriv:remove_cryptocurrency_market

Conversation

@mahdiyeh-deriv
Copy link
Contributor

No description provided.

Copy link
Contributor

@matin-deriv matin-deriv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason behind disabling cryptocurrencies is that Crypto only supports Multipliers in contracts_for, it is the same case for Jump indices. Since we don't have Multipliers in platforms other than Deriv-app, we are trying to hide based on the markets, but it is best to filter out based on shortcodes using regex to make sure it will handle other cases and avoid double work in future.
So I suggest using \(?:JD[0-9])|(?:cry_[A-Z])\ to filter out shortcodes. JD for Jump indices and cry for Cryptos.
Feel free to have a look into Zaki's changes in this PR https://redmine.deriv.cloud/issues/30826

Copy link
Contributor

@matin-deriv matin-deriv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help to update the PR

@mahdiyeh-deriv
Copy link
Contributor Author

regex

sure, I will work on that

@mahdiyeh-deriv mahdiyeh-deriv changed the title remove_cryptocurrency_market Mahdiyeh/ remove_cryptocurrency_market Jun 7, 2021
};

export const refreshMenu = (root, markets, callback) => {
const non_crypto = symbol => !/^(cry|JD)/i.test(symbol);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a more descriptive name for this function!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@mustofa-binary mustofa-binary merged commit 37adaf4 into binary-com:master Jun 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants