From e26f5452b9179eae0e1bc41ec811a54a5dbcdbc8 Mon Sep 17 00:00:00 2001 From: Vitaliy Vlasov Date: Mon, 18 May 2020 16:17:21 +0300 Subject: [PATCH] Do not use signer arg for keycard_signTypedData Signed-off-by: Vitaliy Vlasov --- src/status_im/browser/core.cljs | 6 +++++- src/status_im/ui/screens/signing/views.cljs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/status_im/browser/core.cljs b/src/status_im/browser/core.cljs index 72bc2a1a14..2fd48c5cf7 100644 --- a/src/status_im/browser/core.cljs +++ b/src/status_im/browser/core.cljs @@ -325,7 +325,11 @@ (let [message? (constants/web3-sign-message? method) dapps-address (get-in cofx [:db :multiaccount :dapps-address])] (if (or message? (= constants/web3-send-transaction method)) - (let [[address data] (when message? (normalize-sign-message-params params))] + (let [[address data] (cond (= method constants/web3-keycard-sign-typed-data) + ;; We don't use signer argument for keycard sign-typed-data + ["0x0" params] + message? (normalize-sign-message-params params) + :else [nil nil])] (when (or (not message?) (and address data)) (signing/sign cofx (merge (if message? diff --git a/src/status_im/ui/screens/signing/views.cljs b/src/status_im/ui/screens/signing/views.cljs index 31ecb00dfd..35c51e52c2 100644 --- a/src/status_im/ui/screens/signing/views.cljs +++ b/src/status_im/ui/screens/signing/views.cljs @@ -148,7 +148,7 @@ :signing :t/try-keeping-the-card-still :error :t/tap-card-again :success :t/transaction-signed)] - [react/view (assoc styles/message :padding-vertical 16 :align-items :center) + [react/view (assoc (styles/message) :padding-vertical 16 :align-items :center) [react/view {:style {:align-self :flex-start :padding-left 16 :margin-bottom 24}} [react/text {:style {:font-size (if small-screen? 15 17) :font-weight "700"}} (i18n/label :t/confirmation-request)]]