Some formatting and fixes

This commit is contained in:
Basti 2017-05-06 14:58:21 +02:00
parent 6b67c04e0a
commit b4186d5062
3 changed files with 43 additions and 10 deletions

35
.jshintrc Normal file
View File

@ -0,0 +1,35 @@
{
"predef": [
"global",
"Promise",
"require",
"process",
"module",
"exports"
],
"browser": false,
"boss": true,
"curly": true,
"debug": false,
"devel": true,
"eqeqeq": true,
"evil": true,
"forin": false,
"immed": false,
"laxbreak": false,
"newcap": true,
"noarg": true,
"noempty": false,
"nonew": false,
"nomen": false,
"onevar": false,
"plusplus": false,
"regexp": false,
"undef": true,
"sub": true,
"strict": false,
"white": false,
"eqnull": true,
"esnext": true,
"unused": true
}

View File

@ -7,14 +7,9 @@
// KREDITS_WALLET_PATH: Path to a etherum wallet JSON file
// KREDITS_WALLET_PASSWORD: Wallet password
//
// Authors:
// Sebastian Kippe <sebastian@kip.pe>
// const fs = require('fs');
//
const fs = require('fs');
const fetch = require('node-fetch');
const kreditsContracts = require('kredits-contracts');
const fs = require('fs');
const ProviderEngine = require('web3-provider-engine');
const Wallet = require('ethereumjs-wallet');
const WalletSubprovider = require('ethereumjs-wallet/provider-engine');
@ -36,12 +31,11 @@ engine.start();
let web3 = new Web3(engine);
let contracts = kreditsContracts(web3);
let Kredits = contracts['Kredits'];
let Token = contracts['Token'];
console.log('[HUBOT-KREDITS] wallet address: ' + hubotWalletAddress);
web3.eth.getBalance('eee2de74de31d2e3ef24cb0f6959fd88b59267bd', function (err, balance) {
web3.eth.getBalance(hubotWalletAddress, function (err, balance) {
if (err) { console.log('[HUBOT-KREDITS] error checking balance'); return; }
if (!balance > 0) {
if (balance <= 0) {
console.log('[HUBOT-KREDITS] Hubot is broke. Please sond some eth to ' + hubotWalletAddress);
}
});

View File

@ -20,7 +20,11 @@
"keywords": [
"kosmos"
],
"author": "Sebastian Kippe <sebastian@kip.pe>",
"author": "Kosmos Developers <mail@kosmos.org>",
"contributors": [
"Sebastian Kippe <sebastian@kip.pe>",
"Michael Bumann <hello@michaelbumann.com>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/67P/hubot-kredits/issues"