Add token gate feature flag to instance info
This commit is contained in:
parent
57c5ab3c4e
commit
6765674118
2 changed files with 8 additions and 0 deletions
|
@ -1242,6 +1242,10 @@ components:
|
||||||
description: Blockchain features.
|
description: Blockchain features.
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
gate:
|
||||||
|
description: Token gate feature flag.
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
minter:
|
minter:
|
||||||
description: Minter feature flag.
|
description: Minter feature flag.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
|
@ -14,6 +14,7 @@ struct InstanceStats {
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
struct BlockchainFeatures {
|
struct BlockchainFeatures {
|
||||||
|
gate: bool,
|
||||||
minter: bool,
|
minter: bool,
|
||||||
subscriptions: bool,
|
subscriptions: bool,
|
||||||
}
|
}
|
||||||
|
@ -63,11 +64,13 @@ impl InstanceInfo {
|
||||||
Some(BlockchainConfig::Ethereum(ethereum_config)) => {
|
Some(BlockchainConfig::Ethereum(ethereum_config)) => {
|
||||||
let features = if let Some(contract_set) = maybe_blockchain {
|
let features = if let Some(contract_set) = maybe_blockchain {
|
||||||
BlockchainFeatures {
|
BlockchainFeatures {
|
||||||
|
gate: contract_set.gate.is_some(),
|
||||||
minter: contract_set.collectible.is_some(),
|
minter: contract_set.collectible.is_some(),
|
||||||
subscriptions: contract_set.subscription.is_some(),
|
subscriptions: contract_set.subscription.is_some(),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
BlockchainFeatures {
|
BlockchainFeatures {
|
||||||
|
gate: false,
|
||||||
minter: false,
|
minter: false,
|
||||||
subscriptions: false,
|
subscriptions: false,
|
||||||
}
|
}
|
||||||
|
@ -85,6 +88,7 @@ impl InstanceInfo {
|
||||||
},
|
},
|
||||||
Some(BlockchainConfig::Monero(monero_config)) => {
|
Some(BlockchainConfig::Monero(monero_config)) => {
|
||||||
let features = BlockchainFeatures {
|
let features = BlockchainFeatures {
|
||||||
|
gate: false,
|
||||||
minter: false,
|
minter: false,
|
||||||
subscriptions: true,
|
subscriptions: true,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue