Skip to content

Commit

Permalink
Add debug logging for network switch failure
Browse files Browse the repository at this point in the history
  • Loading branch information
borre-haechi committed Oct 7, 2024
1 parent e2d4199 commit d3d931c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions haechi.face.unity.sdk/Runtime/Module/Wallet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using haechi.face.unity.sdk.Runtime.Client.Face;
using haechi.face.unity.sdk.Runtime.Exception;
using haechi.face.unity.sdk.Runtime.Type;
using haechi.face.unity.sdk.Runtime.Utils;
using UnityEngine;

namespace haechi.face.unity.sdk.Runtime.Module
Expand Down Expand Up @@ -139,6 +140,7 @@ public async Task<FaceRpcResponse> SwitchNetwork(BlockchainNetwork network)
FaceRpcResponse response = await this._provider.SendFaceRpcAsync(rpcRequest);
if (!response.CastResult<string>().Equals(network.ToNetworkString()))
{
DebugLogging.DebugLog($"Failed to switch network to {network.ToNetworkString()}, received {response.CastResult<string>()}");
throw new SwitchNetworkFailedException();
}
FaceSettings.Instance.SetNetwork(network);
Expand Down

0 comments on commit d3d931c

Please sign in to comment.