[#7848] Fix crash on logout with opened transactions details

This commit is contained in:
Roman Volosovskyi 2019-05-01 20:59:29 +03:00
parent 082188eea9
commit 62e94ed4d4
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 9 additions and 6 deletions

View File

@ -61,7 +61,8 @@
[list/touchable-item #(when-not hide-details? (re-frame/dispatch [:show-transaction-details hash]))
[react/view {:accessibility-label :transaction-item}
[list/item
[list/item-icon (transaction-type->icon (keyword type))]
(when type
[list/item-icon (transaction-type->icon (keyword type))])
[list/item-content
[react/view {:style styles/amount-time}
[react/nested-text {:style styles/tx-amount
@ -124,10 +125,11 @@
content]]])
(defn- render-item-filter [{:keys [id label checked?]}]
[item-filter {:icon (transaction-type->icon id) :checked? checked? :path {:type id}}
[list/item-content
[list/item-primary-only {:accessibility-label :filter-name-text}
label]]])
(when id
[item-filter {:icon (transaction-type->icon id) :checked? checked? :path {:type id}}
[list/item-content
[list/item-primary-only {:accessibility-label :filter-name-text}
label]]]))
(defn- wrap-filter-data [m]
[{:title (i18n/label :t/transactions-filter-type)
@ -168,7 +170,8 @@
(let [asset (tokens/asset-for all-tokens (ethereum/network->chain-keyword network) symbol)]
[react/view {:style styles/details-header}
[react/view {:style styles/details-header-icon}
[list/item-icon (transaction-type->icon type)]]
(when type
[list/item-icon (transaction-type->icon type)])]
[react/view {:style styles/details-header-infos}
[react/nested-text {:style styles/details-header-value}
[{:accessibility-label :amount-text}