From f05dd7ada5627f0e51bef3f25190a77b96e0736e Mon Sep 17 00:00:00 2001 From: webwarrior Date: Wed, 21 Aug 2024 13:57:17 +0200 Subject: [PATCH] Backend/Ether: refactor null checks Make all null checks use isNull function as it's the most reliable way to test if value is null. --- src/GWallet.Backend/Ether/EtherServer.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GWallet.Backend/Ether/EtherServer.fs b/src/GWallet.Backend/Ether/EtherServer.fs index 7a7487ade..2263b08f7 100644 --- a/src/GWallet.Backend/Ether/EtherServer.fs +++ b/src/GWallet.Backend/Ether/EtherServer.fs @@ -549,7 +549,7 @@ module Server = let task = web3.Eth.GetBalance.SendRequestAsync (address, null, cancelToken) return! Async.AwaitTask task } - if Object.ReferenceEquals(balance, null) then + if isNull balance then raise <| AbnormalNullValueInJsonResponseException AbnormalNullValueInJsonResponseException.BalanceJobErrorMessage