Skip to content

Commit

Permalink
watch wallet trim input (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-schrammel authored and BrodyHughes committed Jul 5, 2023
1 parent 05cb98a commit bf01288
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/entries/popup/components/WatchWallet/WatchWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export const WatchWallet = ({
isLoading,
isValid: inputIsValid,
error,
} = useValidateInput(input);
} = useValidateInput(input.trim());

const addressesToImport = useMemo(
() => [address, ...Object.keys(selectedAddresses)].filter(Boolean),
Expand Down Expand Up @@ -333,7 +333,7 @@ export const WatchWallet = ({
placeholder={i18n.t('watch_wallet.placeholder')}
value={input}
onKeyDown={(e) => {
if (e.key === 'Enter') handleWatchWallet();
if (isValid && e.key === 'Enter') handleWatchWallet();
}}
tabIndex={1}
autoFocus
Expand Down

0 comments on commit bf01288

Please sign in to comment.