Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions Assets/BoomDao/Scripts/Candid/CandidApiManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,13 @@ IAgent CreateAgentWithRandomIdentity(bool useLocalHost = false)
IAgent randomAgent = null;

var httpClient = new UnityHttpClient();
#if UNITY_WEBGL && !UNITY_EDITOR
var bls = new WebGlBlsCryptography();
#else
var bls = new WasmBlsCryptography();
#endif

try
{
if (useLocalHost)
randomAgent = new HttpAgent(Ed25519Identity.Generate(), new Uri("http://localhost:4943"), bls);
randomAgent = new HttpAgent(Ed25519Identity.Generate(), new Uri("http://localhost:4943"));
else
randomAgent = new HttpAgent(httpClient, Ed25519Identity.Generate(), bls);
randomAgent = new HttpAgent(httpClient, Ed25519Identity.Generate());
}
catch (Exception e)
{
Expand Down Expand Up @@ -178,14 +173,8 @@ public async UniTaskVoid CreateAgentUsingIdentityJson(string json, bool useLocal
var identity = Identity.DeserializeJsonToIdentity(json);

var httpClient = new UnityHttpClient();

#if UNITY_WEBGL && !UNITY_EDITOR
var bls = new WebGlBlsCryptography();
#else
var bls = new WasmBlsCryptography();
#endif
if (useLocalHost) await InitializeCandidApis(new HttpAgent(identity, new Uri("http://localhost:4943"), bls));
else await InitializeCandidApis(new HttpAgent(httpClient, identity, bls));
if (useLocalHost) await InitializeCandidApis(new HttpAgent(identity, new Uri("http://localhost:4943")));
else await InitializeCandidApis(new HttpAgent(httpClient, identity));

Debug.Log("You have logged in");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Boom.Values;
using System.Linq;
using UnityEngine;
using Wasmtime;
using static Env;

public static class TokenUtil
Expand Down
2 changes: 1 addition & 1 deletion Assets/BoomDao/Scripts/Core/Utilities/WebSocketManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async void OnDestroy()
cancellationTokenSource.Cancel(); // Cancel any ongoing operations
if (this.agent != null)
{
if (this.agent.State == System.Net.WebSockets.WebSocketState.Aborted) return;
if (!this.agent.IsOpen) return;
await this.agent.DisposeAsync();
}
}
Expand Down
186 changes: 186 additions & 0 deletions Assets/Plugins/ICP.Net/API.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions Assets/Plugins/ICP.Net/Bls.jslib

This file was deleted.

Binary file added Assets/Plugins/ICP.Net/Castle.Core.dll
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading