Skip to content

Commit

Permalink
add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryn committed Sep 27, 2019
1 parent a3211a9 commit 0e50508
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/status_im/hardwallet/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,12 @@
{:db (assoc-in db [:hardwallet :pairings] pairings)})

(fx/defn on-pair-success
"When pairing to device completed, we need to persist pairing data to
local storage. That's needed for to ensure that during keycard setup
keycard won't run out of pairings slots, ie. we don't pair same
card to same device more than one time. Also, this allows user to proceed
with setup skiping pairing step if pairing was already done during previous
unfinished setup."
[{:keys [db] :as cofx} pairing]
(let [setup-step (get-in db [:hardwallet :setup-step])
flow (get-in db [:hardwallet :flow])
Expand All @@ -1507,7 +1513,6 @@
paired-on (utils.datetime/timestamp)
pairings (assoc (get-in db [:hardwallet :pairings]) instance-uid {:pairing pairing
:paired-on paired-on})
instance-uid (get-in db [:hardwallet :application-info :instance-uid])
next-step (if (= setup-step :pair)
:begin
:card-ready)]
Expand Down

0 comments on commit 0e50508

Please sign in to comment.