import inquirer from 'inquirer' import { Answer, NodeTypeValue } from '../../models/choice' import { AppConfig } from '../../models/app_config' export async function stakeQuestion(nodeType: NodeTypeValue, network: AppConfig): Promise { let prettyNodeTypeName switch (nodeType) { case NodeTypeValue.CDN: prettyNodeTypeName = 'CDN' break case NodeTypeValue.Storage: prettyNodeTypeName = 'Storage' break default: throw new Error(`Unknown node type: ${nodeType}`) } return inquirer.prompt([ { name: 'clusterId', type: 'number', message: `Provide a stake to DDC Staking as a ${prettyNodeTypeName} node at ${network.stakingDashboardUrl} \nAnd enter cluster ID you staked to:`, }, ]) }