Remove blockchain_contract_name property from instance info

This commit is contained in:
silverpill 2022-02-05 22:18:28 +00:00
parent 0a2a145807
commit f1fd0af6bc
2 changed files with 0 additions and 7 deletions

View file

@ -610,9 +610,6 @@ components:
blockchain_explorer_url:
description: Blockchain explorer base URL.
type: string
blockchain_contract_name:
description: Blockchain contract name.
type: string
blockchain_contract_address:
description: Blockchain contract address.
type: string

View file

@ -1,7 +1,6 @@
use serde::Serialize;
use crate::config::Config;
use crate::ethereum::contracts::ADAPTER;
use crate::mastodon_api::MASTODON_API_VERSION;
#[derive(Serialize)]
@ -15,7 +14,6 @@ pub struct InstanceInfo {
login_message: String,
blockchain_explorer_url: Option<String>,
blockchain_contract_name: Option<String>,
blockchain_contract_address: Option<String>,
ipfs_gateway_url: Option<String>,
}
@ -40,8 +38,6 @@ impl From<&Config> for InstanceInfo {
login_message: config.login_message.clone(),
blockchain_explorer_url: config.blockchain.as_ref()
.and_then(|val| val.explorer_url.clone()),
blockchain_contract_name: config.blockchain.as_ref()
.and(Some(ADAPTER.into())),
blockchain_contract_address: config.blockchain.as_ref()
.map(|val| val.contract_address.clone()),
ipfs_gateway_url: config.ipfs_gateway_url.clone(),