more reliable address comparison
Signed-off-by: Michele Balistreri <michele@bitgamma.com>
This commit is contained in:
parent
b136602322
commit
ca3db6b889
|
@ -153,8 +153,8 @@
|
|||
|
||||
(defn address= [address1 address2]
|
||||
(and address1 address2
|
||||
(= (normalized-hex address1)
|
||||
(normalized-hex address2))))
|
||||
(= (string/lower-case (normalized-hex address1))
|
||||
(string/lower-case (normalized-hex address2)))))
|
||||
|
||||
(defn public-key->address [public-key]
|
||||
(let [length (count public-key)
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
from (or (get-in db [:signing/tx :from :address]) (get-in db [:signing/tx :message :from]) (ethereum/default-address db))
|
||||
path (reduce
|
||||
(fn [_ {:keys [address path]}]
|
||||
(when (= from address)
|
||||
(when (ethereum/address= from address)
|
||||
(reduced path)))
|
||||
nil
|
||||
(:multiaccount/accounts db))]
|
||||
|
|
Loading…
Reference in New Issue