@@ -69,7 +69,6 @@ import useDcaAllowanceTarget from '@hooks/useDcaAllowanceTarget';
6969import { abs } from '@common/utils/bigint' ;
7070import ChangesSummary from './components/changes-summary' ;
7171import { AddPositionToCalendarButton } from '../add-position-to-calendar' ;
72- import { Chains } from '@balmy/sdk' ;
7372
7473const StyledSummaryContainer = styled . div `
7574 display: flex;
@@ -584,7 +583,6 @@ const ModifySettingsModal = ({ position, open, onCancel }: ModifySettingsModalPr
584583
585584 const minimumTokensNeeded = usdPriceToToken ( from , minimumToUse , usdPrice ) ;
586585
587- const shouldDisableIncrease = position . chainId === Chains . ROOTSTOCK . chainId ;
588586 let actions : {
589587 label : React . ReactNode ;
590588 onClick : ( ) => void ;
@@ -609,7 +607,7 @@ const ModifySettingsModal = ({ position, open, onCancel }: ModifySettingsModalPr
609607 />
610608 ) ,
611609 onClick : ( ) => handleApproveToken ( ) ,
612- disabled : ! ! hasPendingApproval || shouldDisableByUsd || shouldDisableIncrease ,
610+ disabled : ! ! hasPendingApproval || shouldDisableByUsd || isIncreasingPosition ,
613611 options : [
614612 {
615613 text : (
@@ -627,7 +625,7 @@ const ModifySettingsModal = ({ position, open, onCancel }: ModifySettingsModalPr
627625 } }
628626 />
629627 ) ,
630- disabled : ! ! hasPendingApproval || shouldDisableByUsd || shouldDisableIncrease ,
628+ disabled : ! ! hasPendingApproval || shouldDisableByUsd || isIncreasingPosition ,
631629 onClick : ( ) => handleApproveToken ( true ) ,
632630 } ,
633631 ] ,
@@ -668,7 +666,7 @@ const ModifySettingsModal = ({ position, open, onCancel }: ModifySettingsModalPr
668666 variant : 'contained' ,
669667 label : < FormattedMessage description = "modifyPositionPermit2" defaultMessage = "Authorize and modify position" /> ,
670668 onClick : handleModifyRateAndSwaps ,
671- disabled : ! ! cantFund || frequencyValue === '0' || shouldDisableByUsd || shouldDisableIncrease ,
669+ disabled : ! ! cantFund || frequencyValue === '0' || shouldDisableByUsd || isIncreasingPosition ,
672670 } ,
673671 ] ;
674672 }
@@ -680,8 +678,7 @@ const ModifySettingsModal = ({ position, open, onCancel }: ModifySettingsModalPr
680678 variant : 'contained' ,
681679 label : < FormattedMessage description = "modifyPosition" defaultMessage = "Modify position" /> ,
682680 onClick : handleModifyRateAndSwaps ,
683- disabled :
684- ! ! cantFund || frequencyValue === '0' || shouldDisableByUsd || ( isIncreasingPosition && shouldDisableIncrease ) ,
681+ disabled : ! ! cantFund || frequencyValue === '0' || shouldDisableByUsd || isIncreasingPosition ,
685682 } ,
686683 ] ;
687684 }
@@ -693,8 +690,7 @@ const ModifySettingsModal = ({ position, open, onCancel }: ModifySettingsModalPr
693690 variant : 'contained' ,
694691 label : < FormattedMessage description = "modifyPositionSafe" defaultMessage = "Authorize and modify position" /> ,
695692 onClick : handleModifyRateAndSwapsSafe ,
696- disabled :
697- ! ! cantFund || frequencyValue === '0' || shouldDisableByUsd || ( isIncreasingPosition && shouldDisableIncrease ) ,
693+ disabled : ! ! cantFund || frequencyValue === '0' || shouldDisableByUsd || isIncreasingPosition ,
698694 } ,
699695 ] ;
700696 }
@@ -706,8 +702,7 @@ const ModifySettingsModal = ({ position, open, onCancel }: ModifySettingsModalPr
706702 variant : 'contained' ,
707703 label : < FormattedMessage description = "modifyPosition" defaultMessage = "Modify position" /> ,
708704 onClick : handleModifyRateAndSwapsSafe ,
709- disabled :
710- ! ! cantFund || frequencyValue === '0' || shouldDisableByUsd || ( isIncreasingPosition && shouldDisableIncrease ) ,
705+ disabled : ! ! cantFund || frequencyValue === '0' || shouldDisableByUsd || isIncreasingPosition ,
711706 } ,
712707 ] ;
713708 }
0 commit comments