restore explorer-api
This commit is contained in:
@@ -41,7 +41,7 @@ pub struct NymNetworkDetails {
|
||||
pub chain_details: ChainDetails,
|
||||
pub endpoints: Vec<ValidatorDetails>,
|
||||
pub contracts: NymContracts,
|
||||
pub explorer_api_url: Option<String>,
|
||||
pub explorer_api: Option<String>,
|
||||
pub nym_vpn_api_url: Option<String>,
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ impl NymNetworkDetails {
|
||||
},
|
||||
endpoints: Default::default(),
|
||||
contracts: Default::default(),
|
||||
explorer_api_url: Default::default(),
|
||||
explorer_api: Default::default(),
|
||||
nym_vpn_api_url: Default::default(),
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ impl NymNetworkDetails {
|
||||
.with_group_contract(get_optional_env(var_names::GROUP_CONTRACT_ADDRESS))
|
||||
.with_multisig_contract(get_optional_env(var_names::MULTISIG_CONTRACT_ADDRESS))
|
||||
.with_coconut_dkg_contract(get_optional_env(var_names::COCONUT_DKG_CONTRACT_ADDRESS))
|
||||
.with_explorer_api_url(get_optional_env(var_names::EXPLORER_API))
|
||||
.with_explorer_api(get_optional_env(var_names::EXPLORER_API))
|
||||
.with_nym_vpn_api_url(get_optional_env(var_names::NYM_VPN_API))
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ impl NymNetworkDetails {
|
||||
mainnet::COCONUT_DKG_CONTRACT_ADDRESS,
|
||||
),
|
||||
},
|
||||
explorer_api_url: parse_optional_str(mainnet::EXPLORER_API),
|
||||
explorer_api: parse_optional_str(mainnet::EXPLORER_API),
|
||||
nym_vpn_api_url: parse_optional_str(mainnet::NYM_VPN_API),
|
||||
}
|
||||
}
|
||||
@@ -263,8 +263,8 @@ impl NymNetworkDetails {
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn with_explorer_api_url<S: Into<String>>(mut self, endpoint: Option<S>) -> Self {
|
||||
self.explorer_api_url = endpoint.map(Into::into);
|
||||
pub fn with_explorer_api<S: Into<String>>(mut self, endpoint: Option<S>) -> Self {
|
||||
self.explorer_api = endpoint.map(Into::into);
|
||||
self
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,6 @@ pub(crate) fn network_details() -> nym_network_defaults::NymNetworkDetails {
|
||||
multisig_contract_address: parse_optional_str(MULTISIG_CONTRACT_ADDRESS),
|
||||
coconut_dkg_contract_address: parse_optional_str(COCONUT_DKG_CONTRACT_ADDRESS),
|
||||
},
|
||||
explorer_api_url: parse_optional_str(EXPLORER_API),
|
||||
explorer_api: parse_optional_str(EXPLORER_API),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,6 +55,6 @@ pub(crate) fn network_details() -> nym_network_defaults::NymNetworkDetails {
|
||||
multisig_contract_address: parse_optional_str(MULTISIG_CONTRACT_ADDRESS),
|
||||
coconut_dkg_contract_address: parse_optional_str(COCONUT_DKG_CONTRACT_ADDRESS),
|
||||
},
|
||||
explorer_api_url: parse_optional_str(EXPLORER_API),
|
||||
explorer_api: parse_optional_str(EXPLORER_API),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user