UNPKG

vasku

Version:

TVM-Solidity contract development framework

41 lines (40 loc) 1.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.showGiverActionsMenu = void 0; const showGiverMenu_1 = require("./showGiverMenu"); const showGiverSendForm_1 = require("./showGiverSendForm"); const giver_1 = require("../actions/giver"); const help_1 = require("../actions/help"); const enquirer_1 = require("./enquirer"); const commands_1 = require("../commands"); async function showGiverActionsMenu(config, network) { const choice = await (new enquirer_1.Select({ message: 'Giver', choices: [ commands_1.GIVER_ACTIONS.INFO, commands_1.GIVER_ACTIONS.SEND + enquirer_1.ELLIPSIS, commands_1.GIVER_ACTIONS.DEPLOY, enquirer_1.HELP, enquirer_1.BACK ] })).run(); switch (choice) { case commands_1.GIVER_ACTIONS.INFO: await (0, giver_1.giverInfo)(config, network); break; case commands_1.GIVER_ACTIONS.SEND + enquirer_1.ELLIPSIS: await (0, showGiverSendForm_1.showGiverSendForm)(config, network); break; case commands_1.GIVER_ACTIONS.DEPLOY: await (0, giver_1.giverDeploy)(config, network); break; case enquirer_1.HELP: (0, help_1.help)(); break; case enquirer_1.BACK: --process.argv.length; await (0, showGiverMenu_1.showGiverMenu)(config); break; } } exports.showGiverActionsMenu = showGiverActionsMenu;