[BUG] Nil pointer dereference in internal thornode API

A nil pointer dereference error occurs when issuing POST requests to any of the internal thornodel API endpoints with missing fee amount values. When a POST request is received by the thornode API, ValidateBasic, implemented in the comos-sdk library, is called on a request object. This method in turn calls isZero on an array of fees submitted by users. The amount value is never checked against nil before isZero checks the amount against zero. As a result, fees with missing amount values will cause nil dereference errors.

func newDepositHandler(cliCtx client.Context) http.HandlerFunc {
   return func(w http.ResponseWriter, r *http.Request) {
       var req deposit
       [...]
       baseReq := req.BaseReq.Sanitize()
       if !baseReq.ValidateBasic(w) {
return
}

Figure 4.1: The API calls ValidateBasic on the request object (thornode/x/thorchain/client/rest/tx.go#L21-L33) Figure 4.1: A fee amount is checked against zero without first checking for nil (cosmos/cosmos-sdk/types/coin.go#L60-L62)