kava icon indicating copy to clipboard operation
kava copied to clipboard

Check for nil coins in genesis and msg Validate funcs

Open rhuairahrighairidh opened this issue 4 years ago • 1 comments

Many of our modules call IsValid on coin types received from a msg or a genesis file.

This will panic if a coin contains a nil sdk.Int value, which can happen if a msg or genesis file is incomplete.

We should add nil checks to msg and genesis validate functions.

rhuairahrighairidh avatar May 08 '20 15:05 rhuairahrighairidh

Can you give an example, especially with regards to a message? It seems like validate basic should always catch this at the handler.

karzak avatar May 08 '20 21:05 karzak