add default account to mint menu
This commit is contained in:
parent
5ca24ad142
commit
62aecd49a0
|
@ -51,7 +51,7 @@ function mainMenu(actions) {
|
|||
subAction = (await menus.tokens()).action
|
||||
|
||||
if (subAction === 'Mint') {
|
||||
let params = (await menus.mintToken())
|
||||
let params = (await menus.mintToken(actions.web3Object().eth.defaultAccount))
|
||||
await actions.mintToken(params);
|
||||
} if (subAction === 'Approve') {
|
||||
let params = (await menus.approveToken())
|
||||
|
|
|
@ -19,7 +19,7 @@ const actions = new Actions(program.chain || "development", accounts || []);
|
|||
|
||||
actions.connect({
|
||||
url: (program.url || "ws://localhost:8556"),
|
||||
accountIndex: (program.index || 0)
|
||||
accountIndex: (program.index || 0)
|
||||
}, async () => {
|
||||
cmd(actions)
|
||||
});
|
||||
|
|
|
@ -202,7 +202,6 @@ const menus = {
|
|||
])
|
||||
},
|
||||
|
||||
|
||||
createFunder: async function() {
|
||||
return inquirer.prompt([
|
||||
{
|
||||
|
@ -240,7 +239,7 @@ const menus = {
|
|||
])
|
||||
},
|
||||
|
||||
mintToken: async function() {
|
||||
mintToken: async function(defaultAccount) {
|
||||
console.dir("note: If the transaction fails it likely means this account cannot mint the token (e.g not the owner)");
|
||||
return inquirer.prompt([
|
||||
{
|
||||
|
@ -256,6 +255,7 @@ const menus = {
|
|||
type: 'input',
|
||||
name: 'account',
|
||||
message: 'What account to mint?',
|
||||
default: defaultAccount,
|
||||
filter: String
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue