[#9975] Trim recipient address before validation

This commit is contained in:
Roman Volosovskyi 2020-02-07 16:29:57 +02:00
parent 3d4ee8fe6a
commit 8a612a3807
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 3 additions and 2 deletions

View File

@ -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)]