Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
: update changelog
  • Loading branch information
jamalavedra committed Jul 29, 2024
1 parent 2acdcf2 commit 6049ca2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 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.8.6] - 2024-07-29
### Fix
- Singleton iframe Manager

## [0.8.5] - 2024-07-29
### Fix
- Fix error handling for ecosystems
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.8.5",
"version": "0.8.6",
"author": "Openfort (https://www.openfort.xyz)",
"bugs": "https://github.com/openfort-xyz/openfort-js/issues",
"repository": "openfort-xyz/openfort-js.git",
Expand Down
9 changes: 8 additions & 1 deletion sdk/src/manager/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export interface SignerConfiguration {
chainId: number | null;
}

let iframeManagerSingleton: IframeManager | null = null;

export class SignerManager {
private static storage = new LocalStorage();

Expand Down Expand Up @@ -70,11 +72,14 @@ export class SignerManager {
}

private static get iframeManager(): IframeManager {
if (iframeManagerSingleton) {
return iframeManagerSingleton;
}
const configuration = Configuration.fromStorage();
if (!configuration) {
throw new OpenfortError('Must be configured to create a signer', OpenfortErrorType.INVALID_CONFIGURATION);
}
return new IframeManager(
const iframeManager = new IframeManager(
{
backendUrl: configuration.openfortURL,
baseConfiguration: {
Expand All @@ -95,6 +100,8 @@ export class SignerManager {
shieldUrl: configuration.shieldURL,
},
);
iframeManagerSingleton = iframeManager;
return iframeManager;
}

static session(): Signer {
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.8.5';
export const VERSION = '0.8.6';
export const PACKAGE = '@openfort/openfort-js';

0 comments on commit 6049ca2

Please sign in to comment.