@gatemux/dsh-gatemux-login-core 1.1.1 → 1.1.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.
Files changed (2) hide show
  1. package/account.js +7 -2
  2. package/package.json +1 -1
package/account.js CHANGED
@@ -299,7 +299,10 @@ export class GateMuxAccount extends DeepSeekAccount {
299
299
 
300
300
  async getProfile(client) {
301
301
  const lifetime = this.detailsLifetime
302
- const grant = await this.readGrant(lifetime)
302
+ // The settings page opens long after the one-hour access token expires;
303
+ // reading the stored grant directly would hand the account endpoint an
304
+ // expired token, and its 401 would delete a perfectly refreshable grant.
305
+ const grant = await this.freshGrant()
303
306
  if (grant === null || lifetime.signal.aborted) return null
304
307
  const identity = await this.readIdentity(grant, lifetime, client)
305
308
  if (this.detailsLifetime !== lifetime) return null
@@ -315,7 +318,9 @@ export class GateMuxAccount extends DeepSeekAccount {
315
318
  */
316
319
  async getBalance(client) {
317
320
  const lifetime = this.detailsLifetime
318
- const grant = await this.readGrant(lifetime)
321
+ // Same rule as getProfile: the wallet call must use a token that is valid
322
+ // now, not the one that happened to be stored when the page was opened.
323
+ const grant = await this.freshGrant()
319
324
  if (grant === null || lifetime.signal.aborted) return null
320
325
  const body = await this.callApi(this.accountEndpoint, grant, lifetime, client)
321
326
  if (this.detailsLifetime !== lifetime) return null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gatemux/dsh-gatemux-login-core",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "description": "GateMux account provider and model route for DeepSeek Harness. Shared code; install a region bundle instead of this package.",
6
6
  "publishConfig": {