From e30962ca7550ee362975210dfb4289f8ed3112f7 Mon Sep 17 00:00:00 2001 From: andrey Date: Wed, 18 Nov 2020 13:53:14 +0100 Subject: [PATCH] [#11446] Can't sell item on opensea Signed-off-by: andrey --- src/status_im/browser/core.cljs | 4 ++-- src/status_im/ethereum/core.cljs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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))