mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-24 15:25:18 +00:00
return after writing error response when owner address is invalid (#699)
This commit is contained in:
parent
fabeee93cc
commit
c02ce618da
@ -67,6 +67,7 @@ func queryDepositsHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
|
||||
depositOwner, err = sdk.AccAddressFromBech32(depositOwnerStr)
|
||||
if err != nil {
|
||||
rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("cannot parse address from deposit owner %s", depositOwnerStr))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,6 +126,7 @@ func queryClaimsHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
|
||||
claimOwner, err = sdk.AccAddressFromBech32(claimOwnerStr)
|
||||
if err != nil {
|
||||
rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("cannot parse address from claim owner %s", claimOwnerStr))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user