diff --git a/packages/account/src/Components/account-limits/account-limits.jsx b/packages/account/src/Components/account-limits/account-limits.jsx index c98aa33ea542..1871c9aa832c 100644 --- a/packages/account/src/Components/account-limits/account-limits.jsx +++ b/packages/account/src/Components/account-limits/account-limits.jsx @@ -97,7 +97,14 @@ const AccountLimits = ({ const { commodities, forex, indices, synthetic_index } = { ...market_specific }; const forex_ordered = forex?.slice().sort((a, b) => (a.name > b.name ? 1 : b.name > a.name ? -1 : 0)); - const derived_ordered = synthetic_index?.slice().sort((b, a) => (a.level < b.level ? 1 : -1)); + // sort submarkets by names alphabetically and put 'market' at the beginning + const derived_ordered = synthetic_index + ?.slice() + .sort((a, b) => + a.level === 'submarket' && b.level === 'submarket' + ? a.name.localeCompare(b.name) + : a.level.localeCompare(b.level) + ); const context_value = { currency, diff --git a/packages/account/src/Components/api-token/api-token.tsx b/packages/account/src/Components/api-token/api-token.tsx index d1e7d45f3de5..0c6dbb2e9170 100644 --- a/packages/account/src/Components/api-token/api-token.tsx +++ b/packages/account/src/Components/api-token/api-token.tsx @@ -224,7 +224,7 @@ const ApiToken = ({ footer_ref, is_app_settings, is_switching, overlay_ref, setI setFieldTouched, }) => (