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: Swap - confirm with password error reset #2745

Merged
merged 70 commits into from
Oct 10, 2023

Conversation

SorinC6
Copy link
Contributor

@SorinC6 SorinC6 commented Oct 9, 2023

part of the task: https://emurgo.atlassian.net/browse/YOMO-827

@SorinC6 SorinC6 changed the base branch from develop to swap/complete-orders October 9, 2023 10:10
shelleyTheme
title={strings.sign}
onPress={() => onSubmit?.(spendingPassword)}
disabled={spendingPassword?.length === 0}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe instead of ?. the . only will work here, as it should be always a string

const spendingPasswordRef = React.useRef<RNTextInput>(null)
const [spendingPassword, setSpendingPassword] = React.useState(
features.prefillWalletInfo ? debugWalletInfo.PASSWORD : '',
)
const strings = useStrings()

React.useEffect(() => {
setErrorData && setErrorData({errorMessage: '', errorLogs: ''})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's just for clearing the error state, then maybe a onPasswordChange() prop should be good enough. In the parent then we can do <ConfirmWithSpendingPassword onPasswordChange={() => setErrorData({errorMessage: '', errorLogs: ''})} />

@stackchain stackchain merged commit d9c65cf into swap/complete-orders Oct 10, 2023
2 checks passed
@stackchain stackchain deleted the passwoard-error-reset branch October 10, 2023 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants