Skip to content

Commit fde6583

Browse files
authored
Merge pull request #12 from Rishi556/master
Works on hive post hf + defaults to hive
2 parents d511945 + c8103c3 commit fde6583

7 files changed

Lines changed: 203 additions & 181 deletions

File tree

app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22
/**
33
*
4-
* Node.JS pricefeed script for steem
4+
* Node.JS pricefeed script for hive
55
* Created by @Someguy213
66
* https://github.com/someguy123
77
* Updated by @Rishi556
@@ -13,7 +13,7 @@
1313
var settings = require('./lib/settings');
1414
var exchange = require('./lib/exchange');
1515
var request = require('request');
16-
var steem = require('steem');
16+
var steem = require('@hiveio/hive-js');
1717

1818
var config = settings.config,
1919
retry_conf = settings.retry_conf;
@@ -48,7 +48,7 @@ class SteemAcc {
4848
* @throws {Error<string:msg>} If private key is invalid
4949
*/
5050
if(!steem.auth.isWif(config.wif)) {
51-
throw new Error('The private key you specified is not valid. Be aware Steem private keys start with a 5.');
51+
throw new Error('The private key you specified is not valid. Be aware Hive private keys start with a 5.');
5252
}
5353
this.user_data = {username, active_wif};
5454
this.wif_valid = null;

config.advanced.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"name": "your steem name",
2+
"name": "your hive name",
33
"wif": "your active private key",
44
"interval": 60,
55
"peg": false,
66
"peg_multi": 1.0,
7-
"node": "https://steemd.privex.io",
8-
"ex_symbol": "steem",
7+
"node": "https://hivded.privex.io",
8+
"ex_symbol": "hive",
99
"ex_compare": "usd",
10-
"base_symbol": "SBD",
11-
"quote_symbol": "STEEM",
10+
"base_symbol": "HBD",
11+
"quote_symbol": "HIVE",
1212
"read_this_disable": [
1313
"If an exchange is down, or has issues resulting in inaccurate prices,",
1414
"then you can add exchanges to the disable_exchanges list, resulting in those ",
@@ -19,12 +19,12 @@
1919
],
2020
"exchanges_no_provide": {
2121
"read_this": [
22-
"The below example, disables the use of the BTC:STEEM pair for Poloniex.",
22+
"The below example, disables the use of the BTC:HIVE pair for Poloniex.",
2323
"This feature allows you to disable specific pairs per exchange, if they're",
2424
"unstable, broken, or reporting bad data."
2525
],
2626
"poloniex": [
27-
["btc", "steem"]
27+
["btc", "hive"]
2828
]
2929
},
3030
"exchanges_provide": {

config.example.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"name": "your steem name",
3-
"wif": "your active private key",
4-
"network": "steem",
5-
6-
"interval": 60,
7-
8-
"peg": false,
9-
"peg_multi": 1.0,
10-
11-
"disable_exchanges": [],
12-
"exchanges_no_provide": {},
13-
"exchanges_provide": {}
14-
}
2+
"name": "your hive name",
3+
"wif": "your active private key",
4+
"network": "hive",
5+
6+
"interval": 60,
7+
8+
"peg": false,
9+
"peg_multi": 1.0,
10+
11+
"disable_exchanges": [],
12+
"exchanges_no_provide": {},
13+
"exchanges_provide": {}
14+
}

lib/settings.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ var defaults = {
2525
hive: {
2626
node: 'https://hived.privex.io/',
2727
ex_symbol: 'hive', ex_compare: 'usd',
28-
base_symbol: 'SBD', quote_symbol: 'STEEM',
28+
base_symbol: 'HBD', quote_symbol: 'HIVE',
2929
}
3030
};
3131

32-
if(!('network' in config)) { config.network = 'steem'; }
32+
if(!('network' in config)) { config.network = 'hive'; }
3333

3434
// Contains defaults for the network selected by the user
3535
var ndef = defaults[config.network];

0 commit comments

Comments
 (0)