From 2ac852390900b05c9fec4310dd8bf1a6e37d8b3e Mon Sep 17 00:00:00 2001 From: mrsirdev Date: Wed, 11 Oct 2023 13:26:56 +0100 Subject: [PATCH] chore: replace empty string with 0 --- api/handler/v1/erc20.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/handler/v1/erc20.go b/api/handler/v1/erc20.go index 09d43aa..db6c890 100644 --- a/api/handler/v1/erc20.go +++ b/api/handler/v1/erc20.go @@ -180,7 +180,7 @@ func ERC20ModuleBalance(ctx *fasthttp.RequestCtx) { // TODO: consider moving this to a work or remove the container mutex val, err := blockchain.GetERC20Balance(v.Erc20, ethAddress) balance := "0" - if err == nil { + if err == nil && val != "" { balance = val }