From 4f40fda6a3516648c84f4f20bc30b7e9e8c89216 Mon Sep 17 00:00:00 2001 From: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> Date: Fri, 1 Nov 2024 21:09:59 +0530 Subject: [PATCH] fix(wallet)_: Chain prefix for ENS resolved address (#21504) This commit removes chain prefixes being added to ENS resolved address in send flow Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> --- src/status_im/contexts/wallet/events.cljs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/status_im/contexts/wallet/events.cljs b/src/status_im/contexts/wallet/events.cljs index 45dd2676ce..6e6c6b9ccb 100644 --- a/src/status_im/contexts/wallet/events.cljs +++ b/src/status_im/contexts/wallet/events.cljs @@ -387,23 +387,14 @@ (rf/dispatch [:wallet/set-ens-address nil ens]) (on-error-fn))))}]]]}))) -(defn- resolved-address->prefixed-address - [address networks] - (let [prefixes (->> networks - (map network-utils/network->short-name) - network-utils/short-names->network-preference-prefix)] - (str prefixes (eip55/address->checksum address)))) - (rf/reg-event-fx :wallet/set-ens-address (fn [{:keys [db]} [result ens]] - (let [networks [constants/ethereum-network-name constants/optimism-network-name] - suggestion (if result + (let [suggestion (if result [{:type item-types/address :ens ens :address (eip55/address->checksum result) - :networks networks - :full-address (resolved-address->prefixed-address result networks)}] + :full-address (eip55/address->checksum result)}] [])] {:db (-> db (assoc-in [:wallet :ui :search-address :local-suggestions] suggestion)