diff --git a/src/status_im/contexts/wallet/save_address/view.cljs b/src/status_im/contexts/wallet/save_address/view.cljs index a90fe36674..9a6f2542a1 100644 --- a/src/status_im/contexts/wallet/save_address/view.cljs +++ b/src/status_im/contexts/wallet/save_address/view.cljs @@ -41,7 +41,9 @@ {:content (fn [] [network-preferences/view - {:selected-networks (->> selected-networks + {:title (i18n/label :t/add-network-preferences) + :description (i18n/label :t/network-preferences-save-address-description) + :selected-networks (->> selected-networks (map :network-name) set) :account {:address address} @@ -96,7 +98,6 @@ {:address address :name address-label :customization-color address-color - :on-success (fn [] (js/alert "Address Saved")) :chain-short-names (wallet-common-utils/short-names->network-preference-prefix (map :short-name selected-networks-or-fallback))}])) @@ -135,3 +136,29 @@ {:selected-networks selected-networks-or-fallback :set-selected-networks set-selected-networks}]])) +(comment + (rf/dispatch [:wallet/get-saved-addresses]) + + ;; login + (do + (rf/dispatch [:profile/on-password-input-changed {:password " "}]) + (rf/dispatch [:profile.login/login])) + + + (rf/ref-e) + + ;; set send-to address + + (rf/reg-event-fx + :wallet-temp/set-to-address + (fn [{:keys [db]} [to-address]] + {:db (assoc-in db [:wallet :ui :send :to-address] to-address)})) + + (rf/dispatch [:wallet-temp/set-to-address + "0x26fe3219384a55e4e89fdb0e4420b15439221428"]) + + + (rf/dispatch [:navigate-to :screen/wallet.transaction-progress]) + (rf/dispatch [:open-modal :screen/wallet.save-address]) + + ) diff --git a/src/status_im/contexts/wallet/sheets/network_preferences/view.cljs b/src/status_im/contexts/wallet/sheets/network_preferences/view.cljs index 550cb16c63..f6f6d53bc4 100644 --- a/src/status_im/contexts/wallet/sheets/network_preferences/view.cljs +++ b/src/status_im/contexts/wallet/sheets/network_preferences/view.cljs @@ -10,7 +10,7 @@ [utils.re-frame :as rf])) (defn- view-internal - [{:keys [selected-networks account watch-only?]}] + [{:keys [selected-networks account watch-only? title description]}] (let [state (reagent/atom :default) {:keys [color address network-preferences-names]} (or account (rf/sub [:wallet/current-viewing-account])) @@ -50,10 +50,10 @@ :blur-amount 20 :blur-radius 25}]) [quo/drawer-top - {:title (i18n/label :t/network-preferences) - :description (if watch-only? - (i18n/label :t/network-preferences-desc-1) - (i18n/label :t/network-preferences-desc-2)) + {:title (or title (i18n/label :t/network-preferences)) + :description (or description (if watch-only? + (i18n/label :t/network-preferences-desc-1) + (i18n/label :t/network-preferences-desc-2))) :blur? blur?}] [quo/data-item {:status :default diff --git a/translations/en.json b/translations/en.json index 5e53d05956..81abe36d5f 100644 --- a/translations/en.json +++ b/translations/en.json @@ -2445,6 +2445,8 @@ "network-preferences": "Network preferences", "network-preferences-desc-1": "Select which networks this address is happy to receive funds on", "network-preferences-desc-2": "Select which networks to receive funds on", + "add-network-preferences": "Add network preferences", + "network-preferences-save-address-description": "Only change if you know which networks the address owner is happy to to receive funds on.", "layer-2": "Layer 2", "manage-tokens": "Manage tokens", "edit-derivation-path": "Edit derivation path",