Commit c6d7017
committed
Return TokenizationError instead of panicking on invalid content metadata length
mint() used .unwrap() on BytesValidator::validate_length() for title,
description, and content_hash, so an out-of-range value (e.g. a
content_hash that isn't exactly 32 bytes) panicked the whole invocation
instead of returning a recoverable contract error. Propagate
TokenizationError::InvalidMetadata via ? instead.
Closes #4851 parent 34c710b commit c6d7017
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
0 commit comments