Shell: offer exception-less functions in Hex
Related issue: #1888 (closed)
Previous MR for fixing Hex in the protocol: !3267 (merged)
Description
In this MR, Hex.to_* functions in the shell are changed to return optional values instead of raising an error when passed an invalid argument. This change prevents unintended exception occurrence.
Implementation
I added lib_stdlib/tzHex.ml, which overwrites default Hex if Tezos_stdlib is opened.
In some code (bin_sandbox/command_ledger_wallet.ml, lib_client_base/test/bip39_tests.ml, and bin_sandbox/command_ledger_wallet.ml), the Hex is used without opening Tezos_stdlib, so I replaced them with Tezos_stdlib.Hex.
Edited by satos