Skip to content

Commit

Permalink
Backend/Ether: refactor null checks
Browse files Browse the repository at this point in the history
Make all null checks use isNull function as it's the most
reliable way to test if value is null.
  • Loading branch information
webwarrior-ws committed Sep 2, 2024
1 parent c46a3da commit f05dd7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GWallet.Backend/Ether/EtherServer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f05dd7a

Please sign in to comment.