Skip to content

Commit

Permalink
feat: Fix checking for mint subaccounts
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpiotzh committed Mar 21, 2023
1 parent 276c30c commit 7e599a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions http_server/handle/sub_account_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ func (h *HttpHandle) doSubAccountCheckList(req *ReqSubAccountCreate, apiResp *ap
tmp.Status = CheckStatusFail
tmp.Message = fmt.Sprintf("account len more than: %d", maxLength)
isOk = false
}
if accLen <= 0 {
tmp.Status = CheckStatusFail
tmp.Message = fmt.Sprintf("account length is 0")
isOk = false
} else if indexAcc, ok := subAccountMap[accountId]; ok {
resp.Result[indexAcc].Status = CheckStatusFail
resp.Result[indexAcc].Message = fmt.Sprintf("same account")
Expand Down

0 comments on commit 7e599a3

Please sign in to comment.