From 449cc7b927e67cf520c1d905dade1214e4c3f1de Mon Sep 17 00:00:00 2001 From: maeda Date: Mon, 17 Aug 2020 14:23:31 +0900 Subject: [PATCH] use default user information --- src/cljs/tsca_webapp/chain_clerk/views.cljs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/cljs/tsca_webapp/chain_clerk/views.cljs b/src/cljs/tsca_webapp/chain_clerk/views.cljs index 1ea9f61..c5911c0 100644 --- a/src/cljs/tsca_webapp/chain_clerk/views.cljs +++ b/src/cljs/tsca_webapp/chain_clerk/views.cljs @@ -194,10 +194,18 @@ [:div.gap] [proceed-button state]]) +(defn- load-default-user-info [] + (let [{:strs [name email srcaddr]} (-> (js/window.TSCAInternalInterface.Proto0.defaultClerkUserInfo) + js->clj)] + {:name name :e-mail email :source-address srcaddr})) + + + (defn clerk-top [] - (let [state (reagent/atom {:entering {} + (let [state (reagent/atom {:entering (load-default-user-info) :ledger-pubkey {:show false}})] - [:div.docs-content [:div.columns + [:div.docs-content + [:div.columns [:div.column.col-4.col-xl-12 [:div.card [:div.card-header [:h4 "Chain Clerk"]]