Skip to content

Commit

Permalink
weird web3 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
santisiri committed Feb 7, 2020
1 parent 1b9711e commit 14523f8
Show file tree
Hide file tree
Showing 3 changed files with 2,529 additions and 1,180 deletions.
6 changes: 3 additions & 3 deletions lib/web3.js
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ const _callMethod = async (collective, methodName) => {
const abi = JSON.parse(contract.abi);
const dao = await new web3.eth.Contract(abi, contract.publicAddress);

await dao.methods[methodName].call({}, (err, res) => {
await dao.methods[methodName]().call({}, (err, res) => {
if (err) {
console.log(err);
}
Expand Down Expand Up @@ -1119,7 +1119,8 @@ const _askOracle = async (coin) => {
const abi = JSON.parse(coin.abi);
const contract = await new web3.eth.Contract(abi, coin.contractAddress);
let response;
await contract.methods[coin.method].call({}, (err, res) => {
console.log(coin.method);
await contract.methods[coin.method]().call({}, (err, res) => {
if (err) {
console.log(err);
}
Expand Down Expand Up @@ -1162,7 +1163,6 @@ const _getTransfers = async (coin, publicAddress, eventName, fromBlock, toBlock,
const _generateDataset = async (feed, coin) => {
const dataset = [];
let block;
console.log(feed);
for (let i = 0; i < feed.length; i += 1) {
block = await _getEventBlock(feed[i].blockNumber);
dataset.push({
Expand Down
Loading

0 comments on commit 14523f8

Please sign in to comment.