diff --git a/src/status_im/browser/core.cljs b/src/status_im/browser/core.cljs index dda195b8db..dbb2aeea60 100644 --- a/src/status_im/browser/core.cljs +++ b/src/status_im/browser/core.cljs @@ -317,7 +317,7 @@ (defn normalize-message "NOTE (andrey) there is no spec for this, so this implementation just to be compatible with MM" [message] - (if (ethereum/hex-to-utf8 message) + (if (string/starts-with? message "0x") message (ethereum/utf8-to-hex message))) @@ -330,7 +330,7 @@ (ethereum/address? first-param) [first-param (if typed? second-param (normalize-message second-param))] (ethereum/address? second-param) - [second-param (if typed? second-param (normalize-message first-param))])))) + [second-param (if typed? first-param (normalize-message first-param))])))) (fx/defn send-to-bridge [cofx message] diff --git a/src/status_im/ethereum/core.cljs b/src/status_im/ethereum/core.cljs index 92a506deb2..c40e15ec23 100644 --- a/src/status_im/ethereum/core.cljs +++ b/src/status_im/ethereum/core.cljs @@ -140,4 +140,4 @@ (defn hex->text "Converts a hexstring to UTF8 text." [data] - (hex-to-utf8 data)) + (or (hex-to-utf8 data) data))