@@ -114,12 +114,14 @@ function fetch_electrum_nodes(currency, node_url, predefined_nodes, custom_nodes
114114 let has_nodes = false ;
115115 $ . each ( get_session_nodes , function ( index , val ) {
116116 const rpc_url = val . rpc_url2 ,
117+ v = val . v ,
117118 node_exists = objectkey_in_array ( existing_nodes , "url" , rpc_url ) ;
118119 if ( ! node_exists ) {
119120 const node_data = {
120121 "name" : "electrum" ,
121122 "url" : rpc_url ,
122- "display" : true
123+ "display" : true ,
124+ v
123125 } ,
124126 node_id = val . node_id ,
125127 is_selected = rpc_url === node_url ;
@@ -164,10 +166,12 @@ function fetch_electrum_nodes(currency, node_url, predefined_nodes, custom_nodes
164166 if ( filter_ips ) {
165167 // filter out electrum ip's and only add regular urls
166168 } else {
167- let tport = null ;
169+ let tport = null ,
170+ v = null ;
168171 if ( url ) {
169172 const port_arr = nd [ 2 ] ;
170173 if ( is_array ( port_arr ) ) {
174+ v = port_arr [ 0 ] ;
171175 tport = port_arr [ 1 ] ;
172176 }
173177 }
@@ -178,7 +182,8 @@ function fetch_electrum_nodes(currency, node_url, predefined_nodes, custom_nodes
178182 const node_data = {
179183 "name" : "electrum" ,
180184 "url" : rpc_url2 ,
181- "display" : true
185+ "display" : true ,
186+ v
182187 } ,
183188 test_tx = glob_const . test_tx [ currency ] ;
184189 api_proxy ( {
@@ -206,7 +211,8 @@ function fetch_electrum_nodes(currency, node_url, predefined_nodes, custom_nodes
206211 create_rpc_node_element ( api_options , true , node_id , node_data , is_selected , true ) ;
207212 node_list_obj . push ( {
208213 node_id,
209- rpc_url2
214+ rpc_url2,
215+ v
210216 } ) ;
211217 }
212218 } ) . always ( function ( ) {
@@ -450,7 +456,9 @@ function create_rpc_node_element(api_list, is_live, node_id, node_data, is_selec
450456 node_url = node_data . url ,
451457 vendor = node_data . vendor ,
452458 vendor_string = ( vendor ) ? " (" + vendor . slice ( 5 ) + ")" : "" ,
453- display_name = setting_sub_address ( null , node_name , node_url ) + vendor_string ,
459+ version = node_data . v ,
460+ version_string = ( version ) ? " (" + version + ")" : "" ,
461+ display_name = setting_sub_address ( null , node_name , node_url ) + vendor_string + version_string ,
454462 node_icon_url = get_node_icon ( node_name ) ,
455463 node_icon = ( node_icon_url ) ? "<img src='" + fetch_aws ( node_icon_url ) + ".png' class='icon'>" : "" ,
456464 node_element = $ ( "<div class='optionwrap" + status_class + selected_class + default_class + "' style='display:none' data-pe='none' title='" + node_url + "'><span" + node_key + " data-value='" + node_url + "' data-pe='none'>" + node_icon + display_name + "</span><div class='opt_icon_box' data-pe='none'><div class='opt_icon c_stat icon-" + status_icon + "' data-pe='none'></div><div class='opt_icon icon-bin' data-pe='none'></div></div>" ) ;
0 commit comments