Commit 611a4d5b authored by Max's avatar Max

Merge branch 'recovery-field' into 'next'

Node/Ui: add recovery field in account info

See merge request !62
parents e1d54203 87e5a55a
......@@ -1488,23 +1488,23 @@ module Account = struct
node_ai_counter; node_ai_script; node_ai_nrolls; node_ai_maxrolls;
node_ai_nrolls_avail; node_ai_delegation; node_ai_admin;
node_ai_white_list; node_ai_is_inactive; node_ai_desactivation_cycle;
node_ai_kyc}
node_ai_kyc; node_ai_recovery}
-> (node_ai_balance, node_ai_frozen_balance, node_ai_delegate,
node_ai_counter, node_ai_script, node_ai_nrolls, node_ai_maxrolls,
node_ai_nrolls_avail, node_ai_delegation, node_ai_admin,
node_ai_white_list, node_ai_is_inactive, node_ai_desactivation_cycle,
node_ai_kyc))
node_ai_kyc, node_ai_recovery))
(fun (node_ai_balance, node_ai_frozen_balance, node_ai_delegate,
node_ai_counter, node_ai_script, node_ai_nrolls, node_ai_maxrolls,
node_ai_nrolls_avail, node_ai_delegation, node_ai_admin,
node_ai_white_list, node_ai_is_inactive, node_ai_desactivation_cycle,
node_ai_kyc)
node_ai_kyc, node_ai_recovery)
-> {node_ai_balance; node_ai_frozen_balance; node_ai_delegate;
node_ai_counter; node_ai_script; node_ai_nrolls; node_ai_maxrolls;
node_ai_nrolls_avail; node_ai_delegation; node_ai_admin;
node_ai_white_list; node_ai_is_inactive; node_ai_desactivation_cycle;
node_ai_kyc}) @@
EzEncoding.obj14
node_ai_kyc; node_ai_recovery}) @@
EzEncoding.obj15
(req "balance" int64)
(req "frozen_balance" int64)
(opt "delegate" string)
......@@ -1523,5 +1523,6 @@ module Account = struct
(opt "is_inactive" bool)
(opt "desactivation_cycle" int)
(opt "kyc" int)
(opt "recovery" string)
end
......@@ -442,4 +442,5 @@ type node_account_info = {
node_ai_is_inactive : bool option ;
node_ai_desactivation_cycle : int option ;
node_ai_kyc : int option ;
node_ai_recovery : account_hash option ;
}
......@@ -92,13 +92,17 @@ let update_account_info state =
| Some d ->
Some (txt "Delegation",
if d then txt "open" else txt "closed") in
let recovery = match ai.Dune_types_min.node_ai_recovery with
| None -> None
| Some dn ->
Some (txt "Recovery", account_w_blockies ~crop_len:10 state.ho_net {dn; alias = None}) in
let info_content = List.rev @@ List.fold_left (fun acc x -> match x with
| None -> acc
| Some (lab, value) ->
div ~a:[ a_class [Grid.row; Spacing.py2] ] [
div ~a:[ a_class [Grid.col6] ] [lab];
div ~a:[ a_class [Grid.col6] ] [value] ] :: acc) []
[maxrolls; admin; white_list; delegation] in
[maxrolls; admin; white_list; delegation; recovery] in
if info_content = [] then
hide account_info_home_id
else (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment