From 9fd7f9057aa64078b82deae5454ee359c74a44f0 Mon Sep 17 00:00:00 2001 From: moisses89 <7888669+moisses89@users.noreply.github.com> Date: Fri, 14 Jun 2024 13:35:29 +0200 Subject: [PATCH 1/2] Add support for double quotation of derivation path --- src/safe_cli/operators/hw_wallets/hw_wallet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/safe_cli/operators/hw_wallets/hw_wallet.py b/src/safe_cli/operators/hw_wallets/hw_wallet.py index 337b429..8343323 100644 --- a/src/safe_cli/operators/hw_wallets/hw_wallet.py +++ b/src/safe_cli/operators/hw_wallets/hw_wallet.py @@ -9,7 +9,8 @@ class HwWallet(ABC): def __init__(self, derivation_path: str): - derivation_path = derivation_path.replace("m/", "") + # Remove quoting and unnecessary + derivation_path = derivation_path.replace('"', "").replace("m/", "") if self._is_valid_derivation_path(derivation_path): self.derivation_path = derivation_path self.address = self.get_address() From a5daf36776a6a86e59f09a4d63bb3cf8602807c7 Mon Sep 17 00:00:00 2001 From: moisses89 <7888669+moisses89@users.noreply.github.com> Date: Fri, 14 Jun 2024 16:36:22 +0200 Subject: [PATCH 2/2] Fix comment --- src/safe_cli/operators/hw_wallets/hw_wallet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/safe_cli/operators/hw_wallets/hw_wallet.py b/src/safe_cli/operators/hw_wallets/hw_wallet.py index 8343323..516e655 100644 --- a/src/safe_cli/operators/hw_wallets/hw_wallet.py +++ b/src/safe_cli/operators/hw_wallets/hw_wallet.py @@ -9,7 +9,7 @@ class HwWallet(ABC): def __init__(self, derivation_path: str): - # Remove quoting and unnecessary + # Remove quoting and optional start m/ derivation_path = derivation_path.replace('"', "").replace("m/", "") if self._is_valid_derivation_path(derivation_path): self.derivation_path = derivation_path