Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
skibitsky committed Nov 13, 2024
1 parent 90f7b97 commit 782d831
Show file tree
Hide file tree
Showing 9 changed files with 619 additions and 124 deletions.
2 changes: 1 addition & 1 deletion sample/Reown.AppKit.Unity/Assets/Scripts/Dapp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private void BuildButtons()
{
new ButtonStruct
{
Text = "Connect 1CA",
Text = "Connect",
OnClick = OnConnectButton,
AccountRequired = false
},
Expand Down
1 change: 1 addition & 0 deletions sample/Reown.AppKit.Unity/Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"com.skibitsky.scene-reference": "1.1.1",
"com.unity.ide.rider": "3.0.34",
"com.unity.ide.visualstudio": "2.0.22",
"com.unity.mobile.android-logcat": "1.4.3",
"com.unity.nuget.newtonsoft-json": "3.2.1",
"com.unity.render-pipelines.universal": "14.0.11",
"com.unity.test-framework": "1.1.33",
Expand Down
7 changes: 7 additions & 0 deletions sample/Reown.AppKit.Unity/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.mobile.android-logcat": {
"version": "1.4.3",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "3.2.1",
"depth": 0,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ private void ModalOpenStateChangedHandler(object _, ModalOpenStateChangedEventAr
if (!e.IsOpen)
{
View.leftSlot.style.visibility = Visibility.Hidden;
View.rightSlot.style.visibility = Visibility.Hidden;
}
}

Expand Down
10 changes: 9 additions & 1 deletion src/Reown.AppKit.Unity/Runtime/Presenters/SiwePresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,15 @@ public async void RejectButtonClickedHandler()
{
View.ButtonsEnabled = false;
AppKit.NotificationController.Notify(NotificationType.Info, "Disconnecting...");
await _lastSignatureRequest.RejectAsync();

if (_lastSignatureRequest == null) // This shouldn't happen, but it's better to have a fallback
{
await AppKit.ConnectorController.DisconnectAsync();
}
else
{
await _lastSignatureRequest.RejectAsync();
}
}
catch (Exception)
{
Expand Down

0 comments on commit 782d831

Please sign in to comment.