Skip to content

Commit

Permalink
minor code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ost-ptk committed Dec 13, 2023
1 parent f31be09 commit d4cfc45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/apps/popup/pages/add-contact/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ export const AddContactPage = () => {
const onSubmit = ({ name, publicKey }: ContactFromValues) => {
const lastModified = new Date().toISOString();

const trimmedName = name.trim();

dispatchToMainStore(
newContactAdded({
name: trimmedName,
name: name.trim(),
publicKey,
lastModified
})
Expand Down
4 changes: 1 addition & 3 deletions src/apps/popup/pages/contact-details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,10 @@ export const ContactDetailsPage = () => {

const { name: newName, publicKey } = getValues();

const trimmedName = newName.trim();

dispatchToMainStore(
contactUpdated({
oldName: contact.name,
name: trimmedName,
name: newName.trim(),
publicKey,
lastModified
})
Expand Down

0 comments on commit d4cfc45

Please sign in to comment.