File tree Expand file tree Collapse file tree 8 files changed +36
-24
lines changed 
quo/components/wallet/summary_info 
send/transaction_confirmation 
sheets/buy_network_selection Expand file tree Collapse file tree 8 files changed +36
-24
lines changed Original file line number Diff line number Diff line change 5555                                                       :arbitrum  25 }
5656                                    :account-props     status-account-props}])
5757    (h/is-null  (h/query-by-label-text  :networks ))))
58+ 
59+ (h/describe  " Wallet: network summary info" 
60+   (h/test  " Type of `network` title renders" 
61+     (h/render-with-theme-provider  [summary-info/view
62+                                    {:type           :network 
63+                                     :network-props  {:full-name     " Ethereum" 
64+                                                     :network-name  :ethereum }}])
65+     (h/is-truthy  (h/get-by-text  " Ethereum"  ))))
Original file line number Diff line number Diff line change 77     [:map 
88      [:type  [:enum  :status-account  :saved-account  :account  :user  :token ]]
99      [:account-props  {:optional  true } [:maybe  :map ]]
10+       [:network-props  {:optional  true } [:maybe  :map ]]
1011      [:token-props  {:optional  true } [:maybe  :map ]]
11-       [:networks?  {:optional  true } [:maybe  :boolean ]]
12-       [:values  {:optional  true } [:maybe  :map ]]]]]
12+       [:networks-to-show  {:optional  true } [:maybe  :map ]]]]]
1313   :any ])
Original file line number Diff line number Diff line change 3939   :height              32 
4040   :flex-direction      :row 
4141   :align-items         :center })
42+ 
43+ (def  network-icon 
44+   {:width   32 
45+    :height  32 })
Original file line number Diff line number Diff line change 3434   :arbitrum  " ARB" 
3535   :base      " ETH"  })
3636
37- (defn  prnt 
38-   [data]
39-   (js/console.log  " DATA: "   (clj->js  data))
40-   data )
41- 
4237(defn  networks 
4338  [networks-to-show theme]
4439  (->>  networks-to-show
5247              :divider?  (not=  (dec  i) (->  networks-to-show keys count))
5348              :theme     theme}])))
5449       (remove  nil?)
55-        (prnt )
5650       (into  [rn/view
5751              {:style                style/networks-container
5852               :accessibility-label  :networks }])))
5953
6054(defn-  view-internal 
61-   [{:keys  [type account-props token-props networks-to-show]}]
55+   [{:keys  [type account-props network-props  token-props networks-to-show]}]
6256  (let  [theme   (quo.theme/use-theme )
6357        address (or  (:address  account-props) (:address  token-props))]
6458    [rn/view
7367                         (assoc  account-props
7468                                :size      :size-32 
7569                                :neutral?  true )]
70+         :network         [rn/image
71+                          {:source  (resources/get-network  (:network-name  network-props))
72+                           :style   style/network-icon}]
7673        [user-avatar/user-avatar account-props])
7774      [rn/view {:style  {:margin-left  8 }}
78-        (when  (not=  type :account )
79-          [text/text {:weight  :semi-bold } (or  (:name  account-props) (:label  token-props))])
75+        (when  (not  (some  #{type} [:account  :network ]))
76+          [text/text
77+           {:weight  :semi-bold }
78+           (or  (:name  account-props) (:label  token-props))])
79+        (when  (=  type :network )
80+          [text/text
81+           {:weight  :semi-bold }
82+           (:full-name  network-props)])
8083       [rn/view
8184        {:style  {:flex-direction  :row 
8285                 :align-items     :center }}
8386        (when  (=  type :user )
8487          [:<> 
85-            [rn/view {:style  {:margin-right  4 }} [account-avatar/view (:status-account  account-props)]]
88+            [rn/view {:style  {:margin-right  4 }}
89+             [account-avatar/view (:status-account  account-props)]]
8690           [text/text
8791            {:size   :paragraph-2 
8892             :style  {:color  (colors/theme-colors  colors/neutral-50 colors/neutral-40 theme)}}
Original file line number Diff line number Diff line change 163163         :accessibility-label  accessibility-label}
164164        label]
165165       [quo/summary-info
166-         {:type     :network 
167-          :network   :ethereum }]])))
166+         {:type            :network 
167+          :network-props   network }]])))
168168
169169(defn-  data-item 
170170  [{:keys  [title subtitle]}]
348348         :account-to?          true 
349349         :theme                theme}]
350350       [network-summary
351-         {:label  (i18n/label  :t/on )
351+         {:label  (i18n/label  :t/on-capitalized  )
352352         :theme  theme}]]]]))
Original file line number Diff line number Diff line change 2424    {:size    :paragraph-2 
2525     :weight  :medium 
2626     :style   style/on}
27-     (i18n/label  :t/on-uppercase  )]
27+     (i18n/label  :t/on-capitalized  )]
2828   [quo/context-tag
2929    {:type             :network 
3030     :network-logo     (:logo-url  provider)
Original file line number Diff line number Diff line change 7676 :wallet/send-selected-network 
7777 :<-  [:wallet/wallet-send ]
7878 (fn  [{:keys  [to-values-by-chain]}]
79-    (let  [network-name (->  to-values-by-chain
80-                           keys
81-                           first
82-                           network-utils/id->network)]
83-      (if  (=  network-name :mainnet )
84-        :ethereum 
85-        network-name))))
79+    (->  to-values-by-chain
80+        keys
81+        first
82+        network-utils/get-network-details)))
Original file line number Diff line number Diff line change 18921892  "on-keycard" : " On Keycard"  ,
18931893  "on-status-tree" : " On Status tree"  ,
18941894  "on-the-web" : " On the web"  ,
1895-   "on-uppercase" : " On"  ,
18961895  "once-enabled-share-metadata" : " Once enabled, links posted in the chat may share your metadata with the site"  ,
18971896  "one-day" : " One day"  ,
18981897  "one-month" : " One month"  ,
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments