Skip to content

Commit

Permalink
fix(signing/views): allow discarding signing prop when tx in progress
Browse files Browse the repository at this point in the history
As discussed in #9977, there's an issue that the signing view popup cannot
be cancelled/discarded when a transaction is in progress.
This is because the `cancel-is-pressed` event is only conditionally applied to
the cancel button, rendering it non-functional for the time-being.

This commit changes that behaviour to always attach the event handler to
the cancel button, so that the popup can be closed even when a transaction
has been sent.

Fixes #9977
  • Loading branch information
0x-r4bbit committed Apr 21, 2020
1 parent 387b9cb commit d6bfd1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/status_im/ui/screens/signing/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@
[{:style {:color colors/black}} (displayed-name contact)]]
[react/text {:style {:margin-top 6 :color colors/gray}}
(str fee " " fee-display-symbol " " (string/lower-case (i18n/label :t/network-fee)))])]
[button/button (merge {:type :secondary
:container-style {:padding-horizontal 24}
:label (i18n/label :t/cancel)}
(when-not in-progress? {:on-press #(re-frame/dispatch [:signing.ui/cancel-is-pressed])}))]])
[button/button {:type :secondary
:container-style {:padding-horizontal 24}
:label (i18n/label :t/cancel)
:on-press #(re-frame/dispatch [:signing.ui/cancel-is-pressed])}]])

(views/defview keycard-pin-view []
(views/letsubs [pin [:hardwallet/pin]
Expand Down

0 comments on commit d6bfd1f

Please sign in to comment.