Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: automatic address change #2955

Merged
merged 5 commits into from
Dec 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {useIsFocused} from '@react-navigation/native'
import _ from 'lodash'
import React from 'react'
import {ScrollView, StyleSheet, View, ViewProps} from 'react-native'
Expand Down Expand Up @@ -26,6 +27,7 @@ export const StartMultiTokenTxScreen = () => {
const navigateTo = useNavigateTo()
const wallet = useSelectedWallet()
const {track} = useMetrics()
const isFocused = useIsFocused()

React.useEffect(() => {
track.sendInitiated()
Expand Down Expand Up @@ -62,7 +64,10 @@ export const StartMultiTokenTxScreen = () => {
navigateTo.selectedTokens()
}
}
const handleOnChangeReceiver = (text: string) => receiverResolveChanged(text)
const handleOnChangeReceiver = (text: string) => {
if (!isFocused) return // prevent automatic calls when the screen is not focused. RN TextInput bug
receiverResolveChanged(text)
}
const handleOnChangeMemo = (text: string) => memoChanged(text)

return (
Expand Down
Loading