From 0b3afdf2ca296279e8a35476a3d44efefac0d844 Mon Sep 17 00:00:00 2001 From: Lauren Ciha Date: Tue, 24 Sep 2024 09:08:01 -0700 Subject: [PATCH] Remove Newtonsoft dependency from SSHWalletWidget --- extensions/CoreWidgetProvider/CoreWidgetProvider.csproj | 1 - extensions/CoreWidgetProvider/Widgets/SSHWalletWidget.cs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/CoreWidgetProvider/CoreWidgetProvider.csproj b/extensions/CoreWidgetProvider/CoreWidgetProvider.csproj index dc95e0351f..aa114bea22 100644 --- a/extensions/CoreWidgetProvider/CoreWidgetProvider.csproj +++ b/extensions/CoreWidgetProvider/CoreWidgetProvider.csproj @@ -25,7 +25,6 @@ - diff --git a/extensions/CoreWidgetProvider/Widgets/SSHWalletWidget.cs b/extensions/CoreWidgetProvider/Widgets/SSHWalletWidget.cs index 1df6b243c7..ece45d1e3e 100644 --- a/extensions/CoreWidgetProvider/Widgets/SSHWalletWidget.cs +++ b/extensions/CoreWidgetProvider/Widgets/SSHWalletWidget.cs @@ -148,8 +148,8 @@ public override void OnCustomizationRequested(WidgetCustomizationRequestedArgs c // { "data": "hostname" } private void HandleConnect(WidgetActionInvokedArgs args) { - var jsonObject = JObject.Parse(args.Data); - var host = jsonObject["data"]?.ToString(); + var jsonObject = JsonDocument.Parse(args.Data).RootElement; + var host = jsonObject.GetProperty("data").GetString(); if (string.IsNullOrEmpty(host)) {