From deacaa0ce93ae00e21865188291f81ed7c0540c5 Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Thu, 2 Mar 2023 13:23:30 -0500 Subject: [PATCH] fix: return tag_value if no value_key (#12) This fixes what seems to have been a bug in the handling of plaintext tags Signed-off-by: Daniel Bluhm --- acapy_wallet_upgrade/strategies.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/acapy_wallet_upgrade/strategies.py b/acapy_wallet_upgrade/strategies.py index 784a5cb..5cb56ea 100644 --- a/acapy_wallet_upgrade/strategies.py +++ b/acapy_wallet_upgrade/strategies.py @@ -124,7 +124,9 @@ def decrypt_tags( for tag in tags.split(","): tag_name, tag_value = map(bytes.fromhex, tag.split(":")) name = self.decrypt_merged(tag_name, name_key) - value = self.decrypt_merged(tag_value, value_key) if value_key else tag[1] + value = ( + self.decrypt_merged(tag_value, value_key) if value_key else tag_value + ) yield name, value def decrypt_item(self, row: tuple, keys: dict, b64: bool = False):