mirror of
https://github.com/status-im/liquid-funding-console.git
synced 2025-02-17 13:47:37 +00:00
fix identation
This commit is contained in:
parent
5091fe47c8
commit
3fda05532b
@ -95,7 +95,7 @@ class Actions {
|
||||
donate(params) {
|
||||
let text = `await LiquidPledging.methods.donate(${params.funderId}, ${params.projectId}, \"${LiquidPledging.options.address}\", web3.utils.toWei(\"${params.amount}\", \"ether\")).send({gas: 2000000});`
|
||||
doAction(text, async () => {
|
||||
let donateReceipt = await LiquidPledging.methods.donate(params.funderId, params.projectId, LiquidPledging.options.address, web3.utils.toWei(params.amount, "ether")).send({gas: 2000000});
|
||||
let donateReceipt = await LiquidPledging.methods.donate(params.funderId, params.projectId, LiquidPledging.options.address, web3.utils.toWei(params.amount, "ether")).send({gas: 2000000});
|
||||
console.dir("txHash: " + donateReceipt.transactionHash)
|
||||
});
|
||||
}
|
||||
|
12
src/cmd.js
12
src/cmd.js
@ -13,11 +13,11 @@ async function app(actions) {
|
||||
if (subAction === 'List Projects') {
|
||||
} if (subAction === 'Create Project') {
|
||||
let params = (await menus.createProject(actions.web3().eth.defaultAccount))
|
||||
actions.addProject(params);
|
||||
actions.addProject(params);
|
||||
} if (subAction === 'view Project') {
|
||||
} if (subAction === 'Donate to Project') {
|
||||
let params = (await menus.donate())
|
||||
actions.donate(params);
|
||||
actions.donate(params);
|
||||
}
|
||||
} else if (action === 'Funders') {
|
||||
subAction = (await menus.funders()).action
|
||||
@ -25,17 +25,17 @@ async function app(actions) {
|
||||
if (subAction === 'List Funders') {
|
||||
} if (subAction === 'Create Funder') {
|
||||
let params = (await menus.createProject())
|
||||
actions.addProject(params);
|
||||
actions.addProject(params);
|
||||
}
|
||||
} else if (action === 'Tokens') {
|
||||
subAction = (await menus.tokens()).action
|
||||
|
||||
if (subAction === 'Mint') {
|
||||
let params = (await menus.mintToken())
|
||||
action.mintToken(params);
|
||||
action.mintToken(params);
|
||||
} if (subAction === 'Aprove') {
|
||||
let params = (await menus.approveToken())
|
||||
action.approveToken(params);
|
||||
action.approveToken(params);
|
||||
}
|
||||
} else if (action === 'Exit') {
|
||||
process.exit()
|
||||
@ -47,6 +47,6 @@ async function app(actions) {
|
||||
const actions = new Actions();
|
||||
|
||||
actions.connect(async () => {
|
||||
app(actions)
|
||||
app(actions)
|
||||
});
|
||||
|
||||
|
30
src/menus.js
30
src/menus.js
@ -245,21 +245,21 @@ const menus = {
|
||||
message: 'What is the funder Id?',
|
||||
filter: Number
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
name: 'projectId',
|
||||
message: 'What is the projectId?',
|
||||
filter: Number
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
name: 'tokenAddress',
|
||||
message: 'What is the token address?',
|
||||
filter: String,
|
||||
validate: function(value) {
|
||||
return value.indexOf("0x") === 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
name: 'projectId',
|
||||
message: 'What is the projectId?',
|
||||
filter: Number
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
name: 'tokenAddress',
|
||||
message: 'What is the token address?',
|
||||
filter: String,
|
||||
validate: function(value) {
|
||||
return value.indexOf("0x") === 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
name: 'amount',
|
||||
|
Loading…
x
Reference in New Issue
Block a user