Skip to content

Commit

Permalink
cleanup unused field
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasir Shariff committed Sep 13, 2023
1 parent 482c194 commit f70a594
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions workspaces/src/network/betanet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use crate::network::builder::{FromNetworkBuilder, NetworkBuilder};
use crate::network::{Info, NetworkClient, NetworkInfo};
use crate::rpc::client::Client;

use std::path::PathBuf;

/// URL to the betanet RPC node provided by near.org.
pub const RPC_URL: &str = "https://rpc.betanet.near.org";

Expand Down Expand Up @@ -37,7 +35,6 @@ impl FromNetworkBuilder for Betanet {
info: Info {
name: build.name.into(),
root_id: "near".parse().unwrap(),
keystore_path: PathBuf::from(".near-credentials/betanet/"),
rpc_url: Url::parse(&rpc_url).expect("url is hardcoded"),
},
})
Expand Down
4 changes: 0 additions & 4 deletions workspaces/src/network/info.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
use std::path::PathBuf;

use crate::types::AccountId;

pub struct Info {
/// Name of the network itself
pub name: String,
/// Root Account ID of the network. Mainnet has `near`, testnet has `testnet`.
pub root_id: AccountId,
/// Path to the keystore directory
pub keystore_path: PathBuf,

/// Rpc endpoint to point our client to
pub rpc_url: url::Url,
Expand Down
2 changes: 0 additions & 2 deletions workspaces/src/network/mainnet.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::network::{Info, NetworkClient, NetworkInfo};
use crate::result::Result;
use crate::rpc::client::Client;
use std::path::PathBuf;

use super::builder::{FromNetworkBuilder, NetworkBuilder};

Expand Down Expand Up @@ -38,7 +37,6 @@ impl FromNetworkBuilder for Mainnet {
info: Info {
name: build.name.into(),
root_id: "near".parse().unwrap(),
keystore_path: PathBuf::from(".near-credentials/mainnet/"),
rpc_url: url::Url::parse(&rpc_url).expect("url is hardcodeed"),
},
})
Expand Down
2 changes: 0 additions & 2 deletions workspaces/src/network/sandbox.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::path::PathBuf;
use std::str::FromStr;

use async_trait::async_trait;
Expand Down Expand Up @@ -97,7 +96,6 @@ impl FromNetworkBuilder for Sandbox {
let info = Info {
name: build.name.into(),
root_id: AccountId::from_str("test.near").unwrap(),
keystore_path: PathBuf::from(".near-credentials/sandbox/"),
rpc_url: url::Url::parse(&server.rpc_addr()).expect("url is hardcoded"),
};

Expand Down
2 changes: 0 additions & 2 deletions workspaces/src/network/testnet.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::path::PathBuf;
use std::str::FromStr;

use async_trait::async_trait;
Expand Down Expand Up @@ -47,7 +46,6 @@ impl FromNetworkBuilder for Testnet {
info: Info {
name: build.name.into(),
root_id: AccountId::from_str("testnet").unwrap(),
keystore_path: PathBuf::from(".near-credentials/testnet/"),
rpc_url: Url::parse(&rpc_url).expect("url is hardcoded"),
},
})
Expand Down

0 comments on commit f70a594

Please sign in to comment.