Skip to content

Commit f81e450

Browse files
authored
Akmal / feat: re-trigger barrier validation to show any error messages hidden that were hidden behind th e action sheet (#17571)
* feat: re-trigger barrier validation to show any error messages hidden that were hidden * chore: update quill-ui librare * chore: update quill version * chore: recreate package-lock * fix: merge conflict? * chore: regenerate package-lock and revert pre-commit change in app.tsx * chore: regenerate package-lock and revert pre-commit change in app.tsx * fix: remove artificial delay from ServicesErrorSnackbar
1 parent 1bfe4a9 commit f81e450

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/trader/src/AppV2/Components/ServicesErrorSnackbar/services-error-snackbar.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import useContractDetails from 'AppV2/Hooks/useContractDetails';
99
import { checkIsServiceModalError, SERVICE_ERROR } from 'AppV2/Utils/layout-utils';
1010
import { getDisplayedContractTypes } from 'AppV2/Utils/trade-types-utils';
1111

12-
const PROLONGATED_DURATION = 8000;
13-
1412
const ServicesErrorSnackbar = observer(() => {
1513
const {
1614
common: { services_error, resetServicesError },
@@ -51,7 +49,6 @@ const ServicesErrorSnackbar = observer(() => {
5149
: '48px';
5250
const action_props = {
5351
actionText: localize('View'),
54-
delay: PROLONGATED_DURATION,
5552
onActionClick: () => window.open(getStaticUrl('tnc/trading-terms.pdf', true)),
5653
};
5754

packages/trader/src/AppV2/Components/TradeParameters/Barrier/barrier-input.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ const BarrierInput = observer(
181181
onAction: () => {
182182
if (validation_errors.barrier_1.length === 0) {
183183
onClose(true);
184+
185+
// This is a workaround to re-trigger any validation errors that were hidden behind the action sheet
186+
handleOnChange({
187+
target: { name: 'barrier_1', value: barrier_1.replace(/[+-]/g, '') },
188+
});
184189
} else {
185190
setShouldShowError(true);
186191
}

0 commit comments

Comments
 (0)