ic-use-actor
Advanced tools
Comparing version 0.0.10 to 0.1.0
@@ -10,5 +10,12 @@ # Changelog | ||
## 0.1.0 - 2024-10-16 | ||
### Changed | ||
- Upgraded minimum required versions of @dfinity/xxx dependencies to >=v2.1.2 | ||
## [0.0.10] - 2024-07-11 | ||
### Changed | ||
- Upgraded minimum required versions of @dfinity/xxx dependencies | ||
@@ -19,5 +26,7 @@ | ||
### Changed | ||
- Moved @dfinity/xxx dependencies from dependencies to peerDependencies to reduce package size. | ||
## Fixed | ||
- Don't allow the actor context to be undefined as this can lead to unpredictable behaviour. | ||
@@ -28,2 +37,3 @@ | ||
### Changed | ||
- Upgraded @dfinity/xxx dependencies to latest versions. | ||
@@ -30,0 +40,0 @@ |
@@ -108,11 +108,4 @@ // src/index.tsx | ||
return; | ||
const agent = new HttpAgent({ identity, ...httpAgentOptions }); | ||
if (process.env.DFX_NETWORK !== "ic") { | ||
agent.fetchRootKey().catch((err) => { | ||
console.warn( | ||
"Unable to fetch root key. Check to ensure that your local replica is running" | ||
); | ||
console.error(err); | ||
}); | ||
} | ||
const shouldFetchRootKey = process.env.DFX_NETWORK !== "ic"; | ||
const agent = await HttpAgent.create({ identity, ...httpAgentOptions, shouldFetchRootKey }); | ||
const _actor = Actor.createActor(idlFactory, { | ||
@@ -119,0 +112,0 @@ agent, |
{ | ||
"name": "ic-use-actor", | ||
"version": "0.0.10", | ||
"version": "0.1.0", | ||
"description": "React Hook and context provider to make interacting with Internet Computer canisters more fun!", | ||
@@ -30,8 +30,8 @@ "author": "Kristofer Lund <kristofer@kristoferlund.se>", | ||
"dev:tsc": "tsc --watch --preserveWatchOutput", | ||
"dev:esbuild": "npm run build --watch" | ||
"dev:esbuild": "pnpm run build --watch" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=18.0.0", | ||
"@dfinity/agent": ">=1.2.1", | ||
"@dfinity/candid": ">=1.2.1" | ||
"@dfinity/agent": ">=2.1.2", | ||
"@dfinity/candid": ">=2.1.2" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29255
552