2022-11-30 14:46:32 +01:00
|
|
|
|
2022-11-30 15:04:45 +01:00
|
|
|
import {Database,Settings} from './database'
|
|
|
|
import prompt = require('prompts');
|
|
|
|
import logger from "./logger"
|
2022-11-30 14:46:32 +01:00
|
|
|
const db=new Database();
|
|
|
|
const settings=new Settings();
|
|
|
|
|
2022-11-30 15:04:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// menu
|
|
|
|
(async ()=> {
|
|
|
|
while (true){
|
|
|
|
|
|
|
|
const answer=await prompt({
|
|
|
|
type: 'select',
|
|
|
|
name: 'menu',
|
|
|
|
message: 'Choose action',
|
|
|
|
choices: [
|
|
|
|
{ title: 'Add accounts', description: 'Adds accounts', value: 'addAccounts' },
|
|
|
|
{ title: 'Start',description: 'Starting farm', value: 'start' },
|
|
|
|
{ title: 'Check balances', value: 'checkBalances', disabled: true },
|
|
|
|
{ title: 'Withdraw', value: 'withdraw', disabled: true },
|
|
|
|
]
|
|
|
|
})
|
|
|
|
|
|
|
|
switch (answer.menu) {
|
|
|
|
case 'addAccounts':
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 'start':
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
})();
|