Skip to content

Commit

Permalink
[#9975] Trim recipient address before validation
Browse files Browse the repository at this point in the history
  • Loading branch information
rasom committed Feb 7, 2020
1 parent 3d4ee8f commit 8a612a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/status_im/wallet/choose_recipient/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@

(fx/defn set-recipient
{:events [:wallet.send/set-recipient ::recipient-address-resolved]}
[{:keys [db]} recipient]
(let [chain (ethereum/chain-keyword db)]
[{:keys [db]} raw-recipient]
(let [chain (ethereum/chain-keyword db)
recipient (string/trim raw-recipient)]
(cond
(ethereum/address? recipient)
(let [checksum (eip55/address->checksum recipient)]
Expand Down

0 comments on commit 8a612a3

Please sign in to comment.