From 7903fab31c982faed2208db8ffd2280f0d141b58 Mon Sep 17 00:00:00 2001 From: skibitsky Date: Fri, 24 Nov 2023 11:59:54 +0900 Subject: [PATCH] fix: Engine uses OrderedKeys which can be empty --- WalletConnectSharp.Sign/Engine.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WalletConnectSharp.Sign/Engine.cs b/WalletConnectSharp.Sign/Engine.cs index 8006a5d..411e6e6 100644 --- a/WalletConnectSharp.Sign/Engine.cs +++ b/WalletConnectSharp.Sign/Engine.cs @@ -683,7 +683,7 @@ public async Task Request(string topic, T data, string chainId = null if (string.IsNullOrWhiteSpace(chainId)) { var sessionData = Client.Session.Get(topic); - var firstRequiredNamespace = sessionData.RequiredNamespaces.OrderedKeys[0]; + var firstRequiredNamespace = sessionData.RequiredNamespaces.Keys.First(); defaultChainId = sessionData.RequiredNamespaces[firstRequiredNamespace].Chains[0]; } else