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: blockchain_explorer_url:
description: Blockchain explorer base URL. description: Blockchain explorer base URL.
type: string type: string
blockchain_contract_name:
description: Blockchain contract name.
type: string
blockchain_contract_address: blockchain_contract_address:
description: Blockchain contract address. description: Blockchain contract address.
type: string type: string

View file

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