baltica 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -186,7 +186,7 @@ class Client extends utils_1.Emitter {
186
186
  utils_2.Logger.info(`Please login at ${r.verificationUri}?otc=${r.userCode}`);
187
187
  });
188
188
  auth.on("login", async (result) => {
189
- console.log(result.profile);
189
+ utils_2.Logger.info(`Logged in as §a${result.profile.username}§r`);
190
190
  this.applyAuthResult(result);
191
191
  resolve();
192
192
  });
@@ -195,11 +195,10 @@ class Client extends utils_1.Emitter {
195
195
  });
196
196
  }
197
197
  async applyAuthResult(result) {
198
- const profile = result.profile ?? {};
199
- const gamertag = profile.username || this.options.username;
200
- const xuid = profile.xuid || "";
201
- const uuid = profile.uuid || types_1.LoginData.nextUUID(gamertag);
202
- this.profile = { name: gamertag, uuid, xuid };
198
+ const gamertag = result.profile.username || this.options.username;
199
+ const xuid = result.profile.xuid || "";
200
+ const uuid = result.profile.uuid || types_1.LoginData.nextUUID(gamertag);
201
+ this.profile = { name: result.profile.username, uuid, xuid };
203
202
  this.loginData.payload = (0, types_1.createDefaultPayload)(this.options, this.profile);
204
203
  if (this.options.skinData) {
205
204
  Object.assign(this.loginData.payload, this.options.skinData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baltica",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Core baltica package",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",