[FIX #1602] Trim whitespace from passphrase during account recovery

Currently account recovery includes whitespace on either side of the
passphrase, preventing recovery of the desired account.

We trim that whitespace in the account-recovery-fx
This commit is contained in:
angusiguess 2017-08-22 14:17:59 -03:00 committed by Roman Volosovskyi
parent 2585a32c7a
commit 52c8fc967d
1 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,10 @@
(reg-fx (reg-fx
::recover-account-fx ::recover-account-fx
(fn [[passphrase password]] (fn [[passphrase password]]
(status/recover-account passphrase password #(dispatch [:account-recovered %])))) (status/recover-account
(str/trim passphrase)
password
#(dispatch [:account-recovered %]))))
;;;; Handlers ;;;; Handlers
@ -45,4 +48,3 @@
:recover-account :recover-account
(fn [_ [_ passphrase password]] (fn [_ [_ passphrase password]]
{::recover-account-fx [passphrase password]})) {::recover-account-fx [passphrase password]}))