From 6f23d1008427e5b560e9f85d9cafbfd40b90d69b Mon Sep 17 00:00:00 2001 From: Jason Elie Bou Kheir <5115126+jasonboukheir@users.noreply.github.com> Date: Tue, 7 Jun 2022 21:55:21 -0700 Subject: [PATCH] fix(walletconnect): fix null reference in `WebSocketExtensions` --- Runtime/CareBoo.AlgoSdk.WalletConnect/WebSocketExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Runtime/CareBoo.AlgoSdk.WalletConnect/WebSocketExtensions.cs b/Runtime/CareBoo.AlgoSdk.WalletConnect/WebSocketExtensions.cs index d404589dd..904e86e48 100644 --- a/Runtime/CareBoo.AlgoSdk.WalletConnect/WebSocketExtensions.cs +++ b/Runtime/CareBoo.AlgoSdk.WalletConnect/WebSocketExtensions.cs @@ -48,6 +48,8 @@ public static async UniTask PollUntilEvent( CancellationToken cancellationToken = default ) { + if (client == null) + return null; WebSocketEvent evt = client.Poll(); while (evt.Type == WebSocketEventType.Nothing) {