Skip to content

Commit e95de56

Browse files
committed
refactor: derive installation modes from feature defaults instead of stack name
1 parent 2e3cedf commit e95de56

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

source/constants/config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,10 @@ export function getDefaultFeatureNames(stack: Stack): FeatureName[] {
205205
.map(([name]) => name)
206206
}
207207

208-
// Available installation modes per stack. `default` (keep only default:true features) is Canton-only:
209-
// EVM has no default:false features, so default would be identical to full there.
208+
// Available installation modes per stack. `default` (keep only default:true features) is offered
209+
// only when the stack has at least one opt-out (default:false) feature; otherwise it would be
210+
// identical to `full`. Today that means Canton only (EVM's features are all default:true).
210211
export function getInstallationModes(stack: Stack): InstallationType[] {
211-
return stack === 'canton' ? ['default', 'full', 'custom'] : ['full', 'custom']
212+
const hasOptOutFeature = getDefaultFeatureNames(stack).length < getFeatureNames(stack).length
213+
return hasOptOutFeature ? ['default', 'full', 'custom'] : ['full', 'custom']
212214
}

0 commit comments

Comments
 (0)