Fix use of ledger in main_signer

This commit is contained in:
Sebastien Mondet 2019-02-20 16:24:52 -05:00 committed by Pierre Boutillier
parent 3690566b0b
commit 32348c092c
No known key found for this signature in database
GPG Key ID: C2F73508B56A193C

View File

@ -116,9 +116,12 @@ let may_setup_pidfile = function
trace (failure "Failed to create the pidfile: %s" pidfile) @@
Lwt_lock_file.create ~unlink_on_exit:true pidfile
let commands base_dir require_auth =
Client_keys_commands.commands None @
(* Tezos_signer_backends.Ledger.commands () @ *)
let commands base_dir require_auth : Client_context.full command list =
Tezos_signer_backends.Ledger.commands () @
List.map
(Clic.map_command
(fun (o : Client_context.full) -> (o :> Client_context.io_wallet)))
(Client_keys_commands.commands None @
[ command ~group
~desc: "Launch a signer daemon over a TCP socket."
(args5
@ -264,7 +267,7 @@ let commands base_dir require_auth =
| Some name -> name
| None -> Signature.Public_key_hash.to_b58check pkh in
Handler.Authorized_key.add ~force:false cctxt name key)
]
])
let home = try Sys.getenv "HOME" with Not_found -> "/root"
@ -333,11 +336,13 @@ let main () =
(global_options ()) () original_args >>=?
fun ((base_dir, require_auth, password_filename), remaining) ->
let base_dir = Option.unopt ~default:default_base_dir base_dir in
let cctxt = object
inherit Client_context_unix.unix_logger ~base_dir
inherit Client_context_unix.unix_prompter
inherit Client_context_unix.unix_wallet ~base_dir ~password_filename
end in
let cctxt =
new Client_context_unix.unix_full
~block:Client_config.default_block
~confirmations:None
~password_filename
~base_dir
~rpc_config:RPC_client.default_config in
Client_keys.register_signer
(module Tezos_signer_backends.Encrypted.Make(struct
let cctxt = new Client_context_unix.unix_prompter