Skip to content

Commit

Permalink
Refactor lerna.json to include all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
b3hr4d committed Oct 17, 2024
1 parent 3c9a15a commit 8b2a0de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "independent",
"npmClient": "yarn",
"packages": ["packages/core", "packages/react"],
"packages": ["packages/*"],
"ignoreChanges": ["examples/**/*", "**/*.md", "**/*.spec.ts", "**/test/**/*"]
}
7 changes: 1 addition & 6 deletions packages/core/src/classes/agent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import {
} from "../../utils/constants"

export class AgentManager {
private _anonymousAgent: HttpAgent
private _agent: HttpAgent

private _auth: AuthClient | null = null
private _subscribers: Array<(agent: HttpAgent) => void> = []

Expand Down Expand Up @@ -57,8 +55,7 @@ export class AgentManager {
)
}

//TODO: make it private
public updateAuthState = (newState: Partial<AuthState>, action?: string) => {
private updateAuthState = (newState: Partial<AuthState>, action?: string) => {
this.authStore.setState(
(state) => ({ ...state, ...newState }),
false,
Expand Down Expand Up @@ -96,7 +93,6 @@ export class AgentManager {
store: "auth",
})

this._anonymousAgent = HttpAgent.createSync(agentOptions)
this._agent = HttpAgent.createSync(agentOptions)
this.initializeAgent()
}
Expand All @@ -114,7 +110,6 @@ export class AgentManager {
if (network !== "ic") {
try {
await this._agent.fetchRootKey()
await this._anonymousAgent.fetchRootKey()
} catch (error) {
this.updateAgentState(
{ error: error as Error, initializing: false },
Expand Down

0 comments on commit 8b2a0de

Please sign in to comment.