File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
packages/kit/src/views/Swap/pages/components Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -225,10 +225,10 @@ const SwapSlippageCustomContent = ({
225225const SwapSettingsDialogContent = ( ) => {
226226 const intl = useIntl ( ) ;
227227 const { slippageItem } = useSwapSlippagePercentageModeInfo ( ) ;
228- const [ { swapEnableRecipientAddress } , setSettings ] = useSettingsAtom ( ) ;
228+ const [ { swapEnableRecipientAddress } , setNoPersistSettings ] =
229+ useSettingsAtom ( ) ;
229230 const [ { swapBatchApproveAndSwap } , setPersistSettings ] =
230231 useSettingsPersistAtom ( ) ;
231- const [ , setNoPersistSettings ] = useSettingsAtom ( ) ;
232232 const rightTrigger = useMemo (
233233 ( ) => (
234234 < SegmentControl
@@ -308,14 +308,16 @@ const SwapSettingsDialogContent = () => {
308308 } ) }
309309 value = { swapEnableRecipientAddress }
310310 onChange = { ( v ) => {
311- setSettings ( ( s ) => ( {
312- ...s ,
313- swapEnableRecipientAddress : v ,
314- } ) ) ;
315- if ( ! v ) {
311+ if ( v ) {
312+ setNoPersistSettings ( ( s ) => ( {
313+ ...s ,
314+ swapEnableRecipientAddress : v ,
315+ } ) ) ;
316+ } else {
316317 setNoPersistSettings ( ( s ) => ( {
317318 ...s ,
318- swapToAnotherAccountSwitchOn : false ,
319+ swapEnableRecipientAddress : v ,
320+ swapToAnotherAccountSwitchOn : v ,
319321 } ) ) ;
320322 }
321323 } }
You can’t perform that action at this time.
0 commit comments