The fromMultibase() utility was throwing an error on plain string/non-multibase inputs, when it should instead have been returning undefined. The line this was coming from, codec.decode(), has now been warpped in a try-catch block in order to return undefined on this error, as is the expected behaviour.
Previously a fix was pushed to only catch Syntax Errors, however this was insufficient and instead all errors should be caught,
Tasks
[x] Modify the catch handler on codec.decode() to return on all errors
Description
The
fromMultibase()
utility was throwing an error on plain string/non-multibase inputs, when it should instead have been returningundefined
. The line this was coming from,codec.decode()
, has now been warpped in a try-catch block in order to return undefined on this error, as is the expected behaviour.Previously a fix was pushed to only catch Syntax Errors, however this was insufficient and instead all errors should be caught,
Tasks
codec.decode()
to return on all errorsFinal checklist