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.
|
||||
type: object
|
||||
properties:
|
||||
gate:
|
||||
description: Token gate feature flag.
|
||||
type: boolean
|
||||
example: true
|
||||
minter:
|
||||
description: Minter feature flag.
|
||||
type: boolean
|
||||
|
|
|
@ -14,6 +14,7 @@ struct InstanceStats {
|
|||
|
||||
#[derive(Serialize)]
|
||||
struct BlockchainFeatures {
|
||||
gate: bool,
|
||||
minter: bool,
|
||||
subscriptions: bool,
|
||||
}
|
||||
|
@ -63,11 +64,13 @@ impl InstanceInfo {
|
|||
Some(BlockchainConfig::Ethereum(ethereum_config)) => {
|
||||
let features = if let Some(contract_set) = maybe_blockchain {
|
||||
BlockchainFeatures {
|
||||
gate: contract_set.gate.is_some(),
|
||||
minter: contract_set.collectible.is_some(),
|
||||
subscriptions: contract_set.subscription.is_some(),
|
||||
}
|
||||
} else {
|
||||
BlockchainFeatures {
|
||||
gate: false,
|
||||
minter: false,
|
||||
subscriptions: false,
|
||||
}
|
||||
|
@ -85,6 +88,7 @@ impl InstanceInfo {
|
|||
},
|
||||
Some(BlockchainConfig::Monero(monero_config)) => {
|
||||
let features = BlockchainFeatures {
|
||||
gate: false,
|
||||
minter: false,
|
||||
subscriptions: true,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue