Fix use of ledger in main_signer
This commit is contained in:
parent
3690566b0b
commit
32348c092c
@ -116,9 +116,12 @@ let may_setup_pidfile = function
|
|||||||
trace (failure "Failed to create the pidfile: %s" pidfile) @@
|
trace (failure "Failed to create the pidfile: %s" pidfile) @@
|
||||||
Lwt_lock_file.create ~unlink_on_exit:true pidfile
|
Lwt_lock_file.create ~unlink_on_exit:true pidfile
|
||||||
|
|
||||||
let commands base_dir require_auth =
|
let commands base_dir require_auth : Client_context.full command list =
|
||||||
Client_keys_commands.commands None @
|
Tezos_signer_backends.Ledger.commands () @
|
||||||
(* 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
|
[ command ~group
|
||||||
~desc: "Launch a signer daemon over a TCP socket."
|
~desc: "Launch a signer daemon over a TCP socket."
|
||||||
(args5
|
(args5
|
||||||
@ -264,7 +267,7 @@ let commands base_dir require_auth =
|
|||||||
| Some name -> name
|
| Some name -> name
|
||||||
| None -> Signature.Public_key_hash.to_b58check pkh in
|
| None -> Signature.Public_key_hash.to_b58check pkh in
|
||||||
Handler.Authorized_key.add ~force:false cctxt name key)
|
Handler.Authorized_key.add ~force:false cctxt name key)
|
||||||
]
|
])
|
||||||
|
|
||||||
|
|
||||||
let home = try Sys.getenv "HOME" with Not_found -> "/root"
|
let home = try Sys.getenv "HOME" with Not_found -> "/root"
|
||||||
@ -333,11 +336,13 @@ let main () =
|
|||||||
(global_options ()) () original_args >>=?
|
(global_options ()) () original_args >>=?
|
||||||
fun ((base_dir, require_auth, password_filename), remaining) ->
|
fun ((base_dir, require_auth, password_filename), remaining) ->
|
||||||
let base_dir = Option.unopt ~default:default_base_dir base_dir in
|
let base_dir = Option.unopt ~default:default_base_dir base_dir in
|
||||||
let cctxt = object
|
let cctxt =
|
||||||
inherit Client_context_unix.unix_logger ~base_dir
|
new Client_context_unix.unix_full
|
||||||
inherit Client_context_unix.unix_prompter
|
~block:Client_config.default_block
|
||||||
inherit Client_context_unix.unix_wallet ~base_dir ~password_filename
|
~confirmations:None
|
||||||
end in
|
~password_filename
|
||||||
|
~base_dir
|
||||||
|
~rpc_config:RPC_client.default_config in
|
||||||
Client_keys.register_signer
|
Client_keys.register_signer
|
||||||
(module Tezos_signer_backends.Encrypted.Make(struct
|
(module Tezos_signer_backends.Encrypted.Make(struct
|
||||||
let cctxt = new Client_context_unix.unix_prompter
|
let cctxt = new Client_context_unix.unix_prompter
|
||||||
|
Loading…
Reference in New Issue
Block a user