From 4d4b01a4749b00fbb1e5ac4af453b9b68c8b7ff3 Mon Sep 17 00:00:00 2001 From: gllm-dev Date: Fri, 19 Jul 2024 09:48:26 +0200 Subject: [PATCH] fix: rollbak device cache --- CHANGELOG.md | 4 ++++ examples/apps/auth-sample/package.json | 2 +- packages/platform-bridge/package.json | 2 +- sdk/package.json | 2 +- sdk/src/instanceManager.ts | 6 ++++++ sdk/src/version.ts | 2 +- yarn.lock | 4 ++-- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fb9473..32615cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.7.23] - 2024-07-19 +### Fixed +- Rollback to previous version + ## [0.7.22] - 2024-07-18 ### Updated - Do not cache device id diff --git a/examples/apps/auth-sample/package.json b/examples/apps/auth-sample/package.json index e2a8f98..4c9ac6e 100644 --- a/examples/apps/auth-sample/package.json +++ b/examples/apps/auth-sample/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@heroicons/react": "^2.0.13", - "@openfort/openfort-js": "0.7.22", + "@openfort/openfort-js": "0.7.23", "@openfort/openfort-node": "^0.6.62", "@radix-ui/react-toast": "^1.1.2", "@rainbow-me/rainbowkit": "^2.1.1", diff --git a/packages/platform-bridge/package.json b/packages/platform-bridge/package.json index 6b6cc21..7298864 100644 --- a/packages/platform-bridge/package.json +++ b/packages/platform-bridge/package.json @@ -2,7 +2,7 @@ "name": "@openfort/platform-bridge", "version": "0.0.0", "dependencies": { - "@openfort/openfort-js": "0.7.22", + "@openfort/openfort-js": "0.7.23", "ethers": "^5.7.0" }, "devDependencies": { diff --git a/sdk/package.json b/sdk/package.json index 2191085..7a492d4 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@openfort/openfort-js", - "version": "0.7.22", + "version": "0.7.23", "author": "Openfort (https://www.openfort.xyz)", "bugs": "https://github.com/openfort-xyz/openfort-js/issues", "repository": "openfort-xyz/openfort-js.git", diff --git a/sdk/src/instanceManager.ts b/sdk/src/instanceManager.ts index 875f3d2..13500b7 100644 --- a/sdk/src/instanceManager.ts +++ b/sdk/src/instanceManager.ts @@ -18,6 +18,7 @@ import { thirdPartyProviderTokenTypeStorageKey, shieldAuthTypeStorageKey, shieldAuthTokenStorageKey, + deviceIDStorageKey, } from './storage/storage'; export type AccessToken = { @@ -260,14 +261,19 @@ export default class InstanceManager { public setDeviceID(deviceID: string): void { this.deviceID = deviceID; + this.persistentStorage.save(deviceIDStorageKey, deviceID); } public getDeviceID(): string | null { + if (!this.deviceID) { + this.deviceID = this.persistentStorage.get(deviceIDStorageKey); + } return this.deviceID; } public removeDeviceID(): void { this.deviceID = null; + this.persistentStorage.remove(deviceIDStorageKey); } public setChainID(chainId: string): void { diff --git a/sdk/src/version.ts b/sdk/src/version.ts index 71bdc65..5da602b 100644 --- a/sdk/src/version.ts +++ b/sdk/src/version.ts @@ -1,2 +1,2 @@ -export const VERSION = '0.7.22'; +export const VERSION = '0.7.23'; export const PACKAGE = '@openfort/openfort-js'; diff --git a/yarn.lock b/yarn.lock index 5c5f3f7..8fd189a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1403,7 +1403,7 @@ __metadata: languageName: unknown linkType: soft -"@openfort/openfort-js@0.7.22, @openfort/openfort-js@workspace:sdk": +"@openfort/openfort-js@0.7.23, @openfort/openfort-js@workspace:sdk": version: 0.0.0-use.local resolution: "@openfort/openfort-js@workspace:sdk" dependencies: @@ -1458,7 +1458,7 @@ __metadata: version: 0.0.0-use.local resolution: "@openfort/platform-bridge@workspace:packages/platform-bridge" dependencies: - "@openfort/openfort-js": 0.7.22 + "@openfort/openfort-js": 0.7.23 eslint: ^8.40.0 ethers: ^5.7.0 parcel: ^2.8.3