diff --git a/src/app/global/feature_flags.nim b/src/app/global/feature_flags.nim index e6bef8f717..83b1607432 100644 --- a/src/app/global/feature_flags.nim +++ b/src/app/global/feature_flags.nim @@ -3,6 +3,7 @@ import os const DEFAULT_FLAG_DAPPS_ENABLED = false const DEFAULT_FLAG_SWAP_ENABLED = false +const DEFAULT_FLAG_CONNECTOR_ENABLED = false proc boolToEnv(defaultValue: bool): string = return if defaultValue: "1" else: "0" @@ -11,11 +12,13 @@ QtObject: type FeatureFlags* = ref object of QObject dappsEnabled: bool swapEnabled: bool + connectorEnabled: bool proc setup(self: FeatureFlags) = self.QObject.setup() self.dappsEnabled = getEnv("FLAG_DAPPS_ENABLED", boolToEnv(DEFAULT_FLAG_DAPPS_ENABLED)) != "0" self.swapEnabled = getEnv("FLAG_SWAP_ENABLED", boolToEnv(DEFAULT_FLAG_SWAP_ENABLED)) != "0" + self.connectorEnabled = getEnv("FLAG_CONNECTOR_ENABLED", boolToEnv(DEFAULT_FLAG_CONNECTOR_ENABLED)) != "0" proc delete*(self: FeatureFlags) = self.QObject.delete() @@ -35,3 +38,9 @@ QtObject: QtProperty[bool] swapEnabled: read = getSwapEnabled + + proc getConnectorEnabled*(self: FeatureFlags): bool {.slot.} = + return self.connectorEnabled + + QtProperty[bool] connectorEnabled: + read = getConnectorEnabled \ No newline at end of file