update web3 references
This commit is contained in:
parent
ca599dd50f
commit
0a18d6e8a4
|
@ -114,8 +114,8 @@ class Actions {
|
||||||
async withdraw(params) {
|
async withdraw(params) {
|
||||||
let text = `await LiquidPledging.methods.withdraw(\"${params.id}\", web3.utils.toWei(\"${params.amount}\", "ether")).send({gas: 2000000})`;
|
let text = `await LiquidPledging.methods.withdraw(\"${params.id}\", web3.utils.toWei(\"${params.amount}\", "ether")).send({gas: 2000000})`;
|
||||||
return doAction(text, async () => {
|
return doAction(text, async () => {
|
||||||
const toSend = this.contracts.LiquidPledging.methods.withdraw(params.id.toString(), web3.utils.toWei(params.amount.toString(), "ether"));
|
const toSend = this.contracts.LiquidPledging.methods.withdraw(params.id.toString(), this.web3.utils.toWei(params.amount.toString(), "ether"));
|
||||||
const receipt = await TrxUtils.executeAndWait(toSend, web3.eth.defaultAccount);
|
const receipt = await TrxUtils.executeAndWait(toSend, this.web3.eth.defaultAccount);
|
||||||
console.dir("txHash: " + receipt.transactionHash);
|
console.dir("txHash: " + receipt.transactionHash);
|
||||||
const paymentId = receipt.events.AuthorizePayment.returnValues.idPayment;
|
const paymentId = receipt.events.AuthorizePayment.returnValues.idPayment;
|
||||||
console.log("Payment ID: " , paymentId);
|
console.log("Payment ID: " , paymentId);
|
||||||
|
@ -126,7 +126,7 @@ class Actions {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
const pledges = await PledgeUtils.getPledges(this.contracts.LiquidPledging);
|
const pledges = await PledgeUtils.getPledges(this.contracts.LiquidPledging);
|
||||||
PledgeUtils.printTable(pledges, web3);
|
PledgeUtils.printTable(pledges, this.web3);
|
||||||
} catch(error){
|
} catch(error){
|
||||||
console.log(error);
|
console.log(error);
|
||||||
console.log("Couldn't obtain the list of pledges: ", error.message);
|
console.log("Couldn't obtain the list of pledges: ", error.message);
|
||||||
|
|
Loading…
Reference in New Issue