From 04d053a0e99358341191119a623fe6ece42521d1 Mon Sep 17 00:00:00 2001 From: William Grant Date: Wed, 17 Apr 2024 16:19:51 +1000 Subject: [PATCH] fix: used better naming for value changed in restore account --- ts/components/registration/stages/RestoreAccount.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ts/components/registration/stages/RestoreAccount.tsx b/ts/components/registration/stages/RestoreAccount.tsx index b7afc4365..503924885 100644 --- a/ts/components/registration/stages/RestoreAccount.tsx +++ b/ts/components/registration/stages/RestoreAccount.tsx @@ -259,9 +259,13 @@ export const RestoreAccount = () => { type="text" placeholder={window.i18n('enterDisplayName')} value={displayName} - onValueChanged={(_name: string) => { - const name = sanitizeDisplayNameOrToast(_name, setDisplayNameError, dispatch); - dispatch(setDisplayName(name)); + onValueChanged={(name: string) => { + const sanitizedName = sanitizeDisplayNameOrToast( + name, + setDisplayNameError, + dispatch + ); + dispatch(setDisplayName(sanitizedName)); }} onEnterPressed={recoverAndEnterDisplayName} error={displayNameError}