From 580206eb85577dbb509f836fafd662c26581954b Mon Sep 17 00:00:00 2001 From: Mrsirdev <111534516+Mrsirdev@users.noreply.github.com> Date: Wed, 11 Oct 2023 13:32:07 +0100 Subject: [PATCH] chore: replace empty string with 0 (#63) --- 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 }