Skip to content

Commit

Permalink
fix operation settings #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ridel1e committed Jan 4, 2024
1 parent d02c372 commit cccdf87
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/OperationSettings/OperationSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,9 @@ export const OperationSettings: FC<OperationSettingsProps> = ({
useSubscription(
form.controls.slippage.valueChanges$.pipe(
skip(1),
filter(
(value) => !!value && value >= MIN_SLIPPAGE && value <= MAX_SLIPPAGE,
),
filter((value) => !!value && value >= MIN_SLIPPAGE),
),
(slippage) => setSlippage(slippage),
(slippage) => setSlippage(Math.min(slippage, MAX_SLIPPAGE)),
[slippage, nitro],
);

Expand Down

0 comments on commit cccdf87

Please sign in to comment.