mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-11 09:18:54 +00:00
build + android + wallet + ui: new lib to get IPs, egui, android and grin deps, add input from soft keyboard to text edit, receive txs, filter txs by account, finalize input (in rework), wallet creation copy/paste buttons
This commit is contained in:
+5
-3
@@ -24,6 +24,7 @@ use grin_core::global::ChainTypes;
|
||||
use grin_p2p::{PeerAddr, Seeding};
|
||||
use grin_p2p::msg::PeerAddrs;
|
||||
use grin_servers::common::types::ChainValidationMode;
|
||||
use local_ip_address::list_afinet_netifas;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{AppConfig, Settings};
|
||||
@@ -244,10 +245,11 @@ impl NodeConfig {
|
||||
/// List of available IP addresses.
|
||||
pub fn get_ip_addrs() -> Vec<String> {
|
||||
let mut ip_addrs = Vec::new();
|
||||
for net_if in pnet::datalink::interfaces() {
|
||||
for ip in net_if.ips {
|
||||
let network_interfaces = list_afinet_netifas();
|
||||
if let Ok(network_interfaces) = network_interfaces {
|
||||
for (_, ip) in network_interfaces.iter() {
|
||||
if ip.is_ipv4() {
|
||||
ip_addrs.push(ip.ip().to_string());
|
||||
ip_addrs.push(ip.to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user