@@ -178,6 +178,7 @@ const BridgeViewContent = ({ latestSourceBalance }: BridgeViewContentProps) => {
178178 sourceToken,
179179 onSourceAmountChange : handleSourceAmountChange ,
180180 } ) ;
181+ const { resetToTokenMode, syncFiatAmountToTokenAmount } = sourceAmountInput ;
181182
182183 /** The entry point location for analytics (e.g. Main View, Token View, Trending Explore) */
183184 const location = route . params ?. location ;
@@ -339,7 +340,7 @@ const BridgeViewContent = ({ latestSourceBalance }: BridgeViewContentProps) => {
339340 balance ,
340341 MAX_INPUT_LENGTH ,
341342 ) ;
342- sourceAmountInput . syncFiatAmountToTokenAmount ( cleaned ) ;
343+ syncFiatAmountToTokenAmount ( cleaned ) ;
343344 dispatch ( setSourceAmountAsMax ( cleaned ) ) ;
344345 }
345346 } ;
@@ -350,10 +351,10 @@ const BridgeViewContent = ({ latestSourceBalance }: BridgeViewContentProps) => {
350351 // current cursor position, so clear the cursor state before updating.
351352 const normalizedValue =
352353 normalizeSourceAmountToMaxLength ( value , MAX_INPUT_LENGTH ) || undefined ;
353- sourceAmountInput . syncFiatAmountToTokenAmount ( normalizedValue ) ;
354+ syncFiatAmountToTokenAmount ( normalizedValue ) ;
354355 dispatch ( setSourceAmount ( normalizedValue ) ) ;
355356 } ,
356- [ dispatch , sourceAmountInput ] ,
357+ [ dispatch , syncFiatAmountToTokenAmount ] ,
357358 ) ;
358359
359360 const handleSourceTokenPress = ( ) =>
@@ -362,9 +363,9 @@ const BridgeViewContent = ({ latestSourceBalance }: BridgeViewContentProps) => {
362363 } ) ;
363364
364365 const handleFlipTokensPress = useCallback ( ( ) => {
365- sourceAmountInput . resetToTokenMode ( ) ;
366+ resetToTokenMode ( ) ;
366367 handleSwitchTokens ( destTokenAmount ) ( ) ;
367- } , [ destTokenAmount , handleSwitchTokens , sourceAmountInput ] ) ;
368+ } , [ destTokenAmount , handleSwitchTokens , resetToTokenMode ] ) ;
368369
369370 const handleDestTokenPress = ( ) =>
370371 navigation . navigate ( Routes . BRIDGE . TOKEN_SELECTOR , {
0 commit comments