From 9199bc8e07df8d616cb50da73c0d93bd9df79d60 Mon Sep 17 00:00:00 2001 From: IshaVenikar <145848618+IshaVenikar@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:26:45 +0530 Subject: [PATCH] Add validation in add account from hd path (#30) * Add validation in add account from hd path * Change app name --- android/app/src/main/res/values/strings.xml | 2 +- components/HDPath.tsx | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 473aa6a..766a8eb 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - laconic_wallet + Laconic diff --git a/components/HDPath.tsx b/components/HDPath.tsx index 9b4d44f..59ff7eb 100644 --- a/components/HDPath.tsx +++ b/components/HDPath.tsx @@ -25,6 +25,10 @@ const HDPath = ({ }); const handleChange = (key: keyof PathState, value: string) => { + if (key === 'secondNumber' && value !== '' && !['0', '1'].includes(value)) { + return; + } + setPath({ ...path, [key]: value.replace(/[^0-9]/g, ''),