File tree 1 file changed +7
-1
lines changed 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -731,6 +731,7 @@ async def update_endpoint_for_did(
731
731
endorser_did: DID of the endorser to use for the transaction
732
732
routing_keys: List of routing keys
733
733
"""
734
+ routing_keys = routing_keys or [] # Ensure list type if None was passed
734
735
public_info = await self .get_wallet_public_did ()
735
736
if not public_info :
736
737
raise BadLedgerRequestError (
@@ -749,8 +750,13 @@ async def update_endpoint_for_did(
749
750
existing_routing_keys = (
750
751
all_exist_endpoints .get ("routingKeys" ) if all_exist_endpoints else None
751
752
)
753
+ existing_routing_keys = existing_routing_keys or []
752
754
753
- if exist_endpoint_of_type != endpoint or existing_routing_keys != routing_keys :
755
+ endpoint_changed = exist_endpoint_of_type != endpoint
756
+ routing_keys_changed = set (existing_routing_keys ) != set (routing_keys )
757
+
758
+ if endpoint_changed or routing_keys_changed :
759
+ LOGGER .info ("Endpoint or routing keys have changed, updating endpoint" )
754
760
if self .read_only :
755
761
raise LedgerError (
756
762
"Error cannot update endpoint when ledger is in read only mode"
You can’t perform that action at this time.
0 commit comments