Build on aragonOS #62

Merged
bumi merged 51 commits from aragonos into master 2019-04-02 19:36:36 +00:00
5 changed files with 22 additions and 12 deletions
Showing only changes of commit 9cc237fbf4 - Show all commits

View File

@@ -3,10 +3,12 @@ const promptly = require('promptly');
const ethers = require('ethers');
fsmanuel commented 2019-03-29 14:39:10 +00:00 (Migrated from github.com)
Review

❤️

❤️
bumi commented 2019-03-29 17:16:27 +00:00 (Migrated from github.com)
Review

is it actually init_kredits.js or initKredits.js` as file name?

is it actually `init_kredits.js` or initKredits.js` as file name?
fsmanuel commented 2019-03-30 13:32:30 +00:00 (Migrated from github.com)
Review

I think JS folks use require('./helpers/init-kredits'); You don't need the .js

I think JS folks use `require('./helpers/init-kredits');` You don't need the `.js`
const Kredits = require('../lib/kredits');
const getNetworkId = require('./helpers/networkid.js')
module.exports = async function(callback) {
const networkId = parseInt(web3.version.network);
const networkId = await getNetworkId(web3)
const provider = new ethers.providers.Web3Provider(
web3.currentProvider, { chainId: networkId }
web3.currentProvider, { chainId: parseInt(networkId) }
);
const kredits = await new Kredits(provider, provider.getSigner()).init();

View File

@@ -3,6 +3,8 @@ const promptly = require('promptly');
const ethers = require('ethers');
const Kredits = require('../lib/kredits');
const getNetworkId = require('./helpers/networkid.js')
async function prompt(message, options) {
if (!options) {
options = {default: ''}
@@ -11,9 +13,9 @@ async function prompt(message, options) {
}
module.exports = async function(callback) {
const networkId = parseInt(web3.version.network);
const networkId = await getNetworkId(web3)
const provider = new ethers.providers.Web3Provider(
web3.currentProvider, { chainId: networkId }
web3.currentProvider, { chainId: parseInt(networkId) }
);
const kredits = await new Kredits(provider, provider.getSigner()).init();

View File

@@ -3,10 +3,12 @@ const promptly = require('promptly');
const ethers = require('ethers');
const Kredits = require('../lib/kredits');
const getNetworkId = require('./helpers/networkid.js')
module.exports = async function(callback) {
const networkId = parseInt(web3.version.network);
const networkId = await getNetworkId(web3)
const provider = new ethers.providers.Web3Provider(
web3.currentProvider, { chainId: networkId }
web3.currentProvider, { chainId: parseInt(networkId) }
);
const kredits = await new Kredits(provider, provider.getSigner()).init();

View File

@@ -4,10 +4,12 @@ const promptly = require('promptly');
const ethers = require('ethers');
const Kredits = require('../lib/kredits');
module.exports = function(callback) {
const networkId = parseInt(web3.version.network);
const getNetworkId = require('./helpers/networkid.js')
module.exports = async function(callback) {
const networkId = await getNetworkId(web3)
const provider = new ethers.providers.Web3Provider(
web3.currentProvider, { chainId: networkId }
web3.currentProvider, { chainId: parseInt(networkId) }
);
new Kredits(provider, provider.getSigner()).init().then(async function(kredits) {

View File

@@ -3,10 +3,12 @@ const REPL = require('repl');
const ethers = require('ethers');
const Kredits = require('../lib/kredits');
module.exports = function(callback) {
const networkId = parseInt(web3.version.network);
const getNetworkId = require('./helpers/networkid.js')
module.exports = async function(callback) {
const networkId = await getNetworkId(web3)
const provider = new ethers.providers.Web3Provider(
web3.currentProvider, { chainId: networkId }
web3.currentProvider, { chainId: parseInt(networkId) }
);
new Kredits(provider, provider.getSigner()).init().then((kredits) => {