You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Crypto contract's functions to construct a signature algorithm and hash algorithm current return nil if an invalid input is provided. This is definitely good to have, but additionally, it would be nice to have additional constructors that panic with a helpful error message so users can easily see what has gone wrong. An attempt at an error message like this is included here but it would make much more sense for this to be in the Crypto contract so we can have a standard format and not have to hard code the error message in transactions.
Suggested Solution
Include new constructors for HashAlgorithm and SignatureAlgorithm that panic with a helpful error message like what was linked above if invalid inputs were provided.
Constructors like this might also be useful for other types in the Crypto contract
The text was updated successfully, but these errors were encountered:
Related: onflow/cadence#3135. It might be easiest to first move the Crypto contract out of the Cadence codebase, and then it should be more easy to make improvements to it.
Issue to be solved
The Crypto contract's functions to construct a signature algorithm and hash algorithm current return
nil
if an invalid input is provided. This is definitely good to have, but additionally, it would be nice to have additional constructors that panic with a helpful error message so users can easily see what has gone wrong. An attempt at an error message like this is included here but it would make much more sense for this to be in the Crypto contract so we can have a standard format and not have to hard code the error message in transactions.Suggested Solution
The text was updated successfully, but these errors were encountered: