StableCoinBalance defines query for stable coin balance.
(rw http.ResponseWriter, r *http.Request)
| 37 | |
| 38 | // StableCoinBalance defines query for stable coin balance. |
| 39 | func (a *accountAPI) StableCoinBalance(rw http.ResponseWriter, r *http.Request) { |
| 40 | var balance uint64 |
| 41 | var err error |
| 42 | |
| 43 | if balance, err = client.GetTokenBalance(types.Particle); err != nil { |
| 44 | sendResponse(http.StatusInternalServerError, false, err, nil, rw) |
| 45 | } else { |
| 46 | sendResponse(http.StatusOK, true, nil, map[string]interface{}{ |
| 47 | "balance": balance, |
| 48 | }, rw) |
| 49 | } |
| 50 | |
| 51 | log.WithField("stableBalance", balance).WithError(err).Debug("get stable coin balance") |
| 52 | |
| 53 | return |
| 54 | } |
| 55 | |
| 56 | // CovenantCoinBalance defines query for covenant coin balance. |
| 57 | func (a *accountAPI) CovenantCoinBalance(rw http.ResponseWriter, r *http.Request) { |
nothing calls this directly
no test coverage detected