cosmos-sdk/types/tx
Alex Megalokonomos 96e162b8a3
fix: null guard for tx fee amounts (#10327)
## Description

It is possible to submit a TX with a fees object containing a Coin with a nil amount. This results in a rather cryptic redacted panic response when the basic validation checks fee Coins for negative amounts.

This PR adds an additional check for nil to provide a friendlier error message.

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification (note: No issue exists)
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) (note: First PR against the SDK so please comment with what needs to be done)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
2021-10-12 09:11:14 +00:00
..
signing revert: Revert SIGN_MODE_DIRECT_JSON proto files (#10305) 2021-10-05 11:46:10 +00:00
middleware.go refactor!: BaseApp {Check,Deliver}Tx with middleware design (#9920) 2021-08-25 14:40:33 +00:00
msgs.go feat: Add group module proto definitions and basic types (#9631) 2021-07-09 07:36:16 +00:00
service.pb.go Prefer sending tx_bytes to Simulate gRPC endpoint (#8926) 2021-03-25 10:52:54 +00:00
service.pb.gw.go gRPC gateway issue with colons in the account url path (#8649) 2021-02-22 11:30:45 +00:00
tx.pb.go revert: Revert SIGN_MODE_DIRECT_JSON proto files (#10305) 2021-10-05 11:46:10 +00:00
types.go fix: null guard for tx fee amounts (#10327) 2021-10-12 09:11:14 +00:00