From 0a18d6e8a4fd6d392bd4a5d8a4c916643f82c5ae Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 23 May 2019 15:15:17 -0400 Subject: [PATCH] update web3 references --- src/actions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/actions.js b/src/actions.js index a9de182..4b93f01 100644 --- a/src/actions.js +++ b/src/actions.js @@ -114,8 +114,8 @@ class Actions { async withdraw(params) { let text = `await LiquidPledging.methods.withdraw(\"${params.id}\", web3.utils.toWei(\"${params.amount}\", "ether")).send({gas: 2000000})`; return doAction(text, async () => { - const toSend = this.contracts.LiquidPledging.methods.withdraw(params.id.toString(), web3.utils.toWei(params.amount.toString(), "ether")); - const receipt = await TrxUtils.executeAndWait(toSend, web3.eth.defaultAccount); + const toSend = this.contracts.LiquidPledging.methods.withdraw(params.id.toString(), this.web3.utils.toWei(params.amount.toString(), "ether")); + const receipt = await TrxUtils.executeAndWait(toSend, this.web3.eth.defaultAccount); console.dir("txHash: " + receipt.transactionHash); const paymentId = receipt.events.AuthorizePayment.returnValues.idPayment; console.log("Payment ID: " , paymentId); @@ -126,7 +126,7 @@ class Actions { return new Promise(async (resolve, reject) => { try { const pledges = await PledgeUtils.getPledges(this.contracts.LiquidPledging); - PledgeUtils.printTable(pledges, web3); + PledgeUtils.printTable(pledges, this.web3); } catch(error){ console.log(error); console.log("Couldn't obtain the list of pledges: ", error.message);