Skip to content

Commit 246424d

Browse files
authored
Merge pull request #22 from ShmoogleOsukami/master
Update hivejs and fix a reject undefined crash
2 parents c6c20a6 + 51a582a commit 246424d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

app.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class HiveAcc {
8686
console.error(`Will retry in ${retry_conf.login_delay} seconds`);
8787
return delay(retry_conf.login_delay * 1000)
8888
.then(() => resolve(this.loadAccount(reload, tries + 1)))
89-
.catch((e) => reject(e));
89+
.catch((e) => console.error(e));
9090
}
9191
console.error(`Giving up. Tried ${tries} times`);
9292
return reject(`Failed to log in after ${tries} attempts.`);
@@ -109,7 +109,7 @@ class HiveAcc {
109109
console.error(`Will retry in ${retry_conf.login_delay} seconds`);
110110
return delay(retry_conf.login_delay * 1000)
111111
.then(() => resolve(this.loadAccount(reload, tries + 1)))
112-
.catch((e) => reject(e));
112+
.catch((e) => console.error(e));
113113
}
114114
console.error(`Giving up. Tried ${tries} times`);
115115
return reject(`Failed to log in after ${tries} attempts.`);
@@ -122,7 +122,7 @@ class HiveAcc {
122122
console.error(`Will retry in ${retry_conf.login_delay} seconds`);
123123
return delay(retry_conf.login_delay * 1000)
124124
.then(() => resolve(this.loadAccount(reload, tries + 1)))
125-
.catch((e) => reject(e));
125+
.catch((e) => console.error(e));
126126
}
127127
console.error(`Giving up. Tried ${tries} times`);
128128
return reject(`Failed to log in after ${tries} attempts.`);
@@ -204,7 +204,7 @@ class HiveAcc {
204204
console.error(`Will retry in ${retry_conf.feed_delay} seconds`);
205205
return delay(retry_conf.feed_attempts * 1000)
206206
.then(() => resolve(this.publish_feed(feed, tries + 1)))
207-
.catch((e) => reject(e));
207+
.catch((e) => console.error(e));
208208
}
209209
console.error(`Giving up. Tried ${tries} times`);
210210
return reject(`Failed to publish in after ${tries} attempts.`);
@@ -218,7 +218,7 @@ class HiveAcc {
218218
console.error(`Will retry in ${retry_conf.feed_delay} seconds`);
219219
return delay(retry_conf.feed_attempts * 1000)
220220
.then(() => resolve(this.publish_feed(feed, tries + 1)))
221-
.catch((e) => reject(e));
221+
.catch((e) => console.error(e));
222222
}
223223
console.error(`Giving up. Tried ${tries} times`);
224224
return reject(`Failed to publish in after ${tries} attempts.`);
@@ -249,13 +249,13 @@ class HiveAcc {
249249

250250
log(`Data published at: ${new Date()}`); //Not cure if this one will work
251251
log('Successfully published feed.');
252-
log(`TXID: ${result.id} TXNUM: ${result.trx_num}`);
252+
log(`TXID: ${result.id}`);
253253
});
254254
} else {
255255
this.signing_valid = false;
256256
return delay(retry_conf.feed_attempts * 1000)
257257
.then(() => resolve(this.publish_feed(feed, tries + 1)))
258-
.catch((e) => reject(e));
258+
.catch((e) => console.error(e));
259259
}
260260
}
261261
);
@@ -278,7 +278,7 @@ class HiveAcc {
278278
}
279279
log(`Data published at: ${new Date()}`); //Not cure if this one will work
280280
log('Successfully published feed.');
281-
log(`TXID: ${r.id} TXNUM: ${r.trx_num}`);
281+
log(`TXID: ${r.id}`);
282282
});
283283
} else {
284284
console.error('Failed to publish feed... neither signing key or wif are valid');

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"author": "Chris <[email protected]> (Someguy123)",
1212
"license": "GPL-3.0",
1313
"dependencies": {
14-
"@hiveio/hive-js": "^0.8.12",
14+
"@hiveio/hive-js": "^2.0.2",
1515
"request": "^2.74.0"
1616
}
1717
}

0 commit comments

Comments
 (0)