Skip to content

Commit

Permalink
Merge pull request #47 from openfort-xyz/fix/rollback-device-cache
Browse files Browse the repository at this point in the history
fix: rollbak device cache
  • Loading branch information
gllm-dev authored Jul 19, 2024
2 parents 6021e0c + 4d4b01a commit b6ce7aa
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/auth-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 6 additions & 0 deletions sdk/src/instanceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
thirdPartyProviderTokenTypeStorageKey,
shieldAuthTypeStorageKey,
shieldAuthTokenStorageKey,
deviceIDStorageKey,
} from './storage/storage';

export type AccessToken = {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const VERSION = '0.7.22';
export const VERSION = '0.7.23';
export const PACKAGE = '@openfort/openfort-js';
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b6ce7aa

Please sign in to comment.