A few small issues were causing the CLI to crash when certain commands were input.
Implementation
Anytime a new chain was being created the request for if the name was used would error and exit the command, in some cases this wasn't being awaited and would cause the CLI to exit once the handler was reached. Await was added in these cases.
In other cases the check would error when it shouldn't. A new function was added queryChainConfigSafe which returns undefined if the chain config isn't found, similarly to how it was handled previously.
Motivation
A few small issues were causing the CLI to crash when certain commands were input.
Implementation
Anytime a new chain was being created the request for if the name was used would error and exit the command, in some cases this wasn't being awaited and would cause the CLI to exit once the handler was reached. Await was added in these cases.
In other cases the check would error when it shouldn't. A new function was added
queryChainConfigSafe
which returnsundefined
if the chain config isn't found, similarly to how it was handled previously.Testing
N/A
Notes
N/A
Future work
N/A