Skip to content

Commit

Permalink
Simple account error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed Mar 28, 2021
1 parent 00461e5 commit b2d87b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/accounts/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class Account {
}

login() {
this.logger.info('logging In');
this.logger.info('Attempting to logging In');
const { client, options, manager, trader } = this;
const { username, password } = options.login;
client.logOn({
Expand All @@ -54,6 +54,7 @@ export default class Account {
client.on('loggedOn', () => this.onLogin());
client.on('steamGuard', (_domain: any, callback: (code: string) => void) => callback(this.getAuthCode()));
manager.on('newOffer', (offer: Offer) => trader.begin(offer));
client.on('error', (err: any) => this.logger.error(`Occurred an error on the last operation: ${err.message}`));
}

logoff() {
Expand Down

0 comments on commit b2d87b7

Please sign in to comment.