fix incoming/outgoing bug

Signed-off-by: yenda <eric@status.im>
This commit is contained in:
yenda 2020-05-08 14:01:55 +02:00
parent 5d11fb0549
commit 461e67a46b
No known key found for this signature in database
GPG Key ID: 0095623C0069DCE6
5 changed files with 20 additions and 18 deletions

View File

@ -369,13 +369,16 @@
"keycard-multiacc?" keycard-multiaccount?)
(fx/merge cofx
{:db (assoc db :auth-method auth-method)}
#(case auth-method
keychain/auth-method-biometric
#(cond
(= auth-method
keychain/auth-method-biometric)
(biometric/biometric-auth %)
keychain/auth-method-password
(= auth-method
keychain/auth-method-password)
(get-credentials % key-uid)
;;nil or "none" or "biometric-prepare"
:else
(open-login-callback % nil)))))
(fx/defn biometric-auth-done

View File

@ -181,14 +181,13 @@
(str amount-fiat " " code)]]]))
(defn calculate-direction [outgoing command-state]
(case command-state
(constants/command-state-request-address-for-transaction-accepted
constants/command-state-request-address-for-transaction-declined
constants/command-state-request-transaction)
(if (#{constants/command-state-request-address-for-transaction-accepted
constants/command-state-request-address-for-transaction-declined
constants/command-state-request-transaction} command-state)
(if outgoing :incoming :outgoing)
(if outgoing :outgoing :incoming)))
(defn comand-content
(defn command-content
[wrapper {:keys [message-id
chat-id
outgoing

View File

@ -269,14 +269,14 @@
(defn chat-message [{:keys [content content-type] :as message}]
(if (= content-type constants/content-type-command)
[message.command/comand-content message-content-wrapper message]
[message.command/command-content message-content-wrapper message]
(if (= content-type constants/content-type-system-text)
[system-message-content-wrapper message [system-text-message message]]
[react/touchable-highlight (message-press-handlers message)
[message-content-wrapper
message
(if (= content-type constants/content-type-text)
; text message
;; text message
[text-message message]
(if (= content-type constants/content-type-status)
[message-content-status message]

View File

@ -2,6 +2,7 @@
(:require-macros [status-im.utils.views :as views])
(:require [re-frame.core :as re-frame]
[status-im.i18n :as i18n]
[status-im.constants :as constants]
[status-im.ui.components.react :as react]
[status-im.ui.components.list.views :as list]
[status-im.ui.components.colors :as colors]
@ -22,9 +23,11 @@
(defn prepare-items-manage [name]
(fn [permission]
{:title (case permission
constants/dapp-permission-web3 name
constants/dapp-permission-contact-code :t/contact-code)
{:title (cond
(= permission constants/dapp-permission-web3)
name
(= permission constants/dapp-permission-contact-code)
:t/contact-code)
:type :small
:accessories [:main-icons/check]}))

View File

@ -15,11 +15,8 @@
"Status.im"]])
(views/defview tab-views []
(views/letsubs [{:keys [tab-view-id]} [:desktop/desktop]]
(let [component (case tab-view-id
react/view)]
[react/view {:style {:flex 1}}
[component]])))
[react/view {:style {:flex 1}}
[react/view]])
(views/defview popup-view []
(views/letsubs [{:keys [popup]} [:desktop]]