@avalabs/avalanche-contacts
Advanced tools
Comparing version 1.0.0 to 1.0.1-alpha.0
@@ -6,2 +6,6 @@ # Change Log | ||
## 1.0.1-alpha.0 (2023-03-14) | ||
**Note:** Version bump only for package @avalabs/avalanche-contacts | ||
# [1.0.0](https://github.com/ava-labs/avalanche-dapp-sdks/compare/v0.0.1-alpha.2...v1.0.0) (2022-06-16) | ||
@@ -8,0 +12,0 @@ |
@@ -9,5 +9,10 @@ 'use strict'; | ||
const [contacts, setContacts] = react.useState([]); | ||
const getContacts = react.useCallback(() => provider | ||
.request({ method: 'avalanche_getContacts' }) | ||
.then((res) => setContacts(res.result)), [provider]); | ||
const getContacts = react.useCallback(() => { | ||
if (!provider) { | ||
return null; | ||
} | ||
return provider | ||
.request({ method: 'avalanche_getContacts' }) | ||
.then((res) => setContacts(res.result)); | ||
}, [provider]); | ||
return { contacts, getContacts }; | ||
@@ -14,0 +19,0 @@ } |
@@ -1,7 +0,7 @@ | ||
import { AvalancheProvider } from '@avalabs/avalanche-connector'; | ||
import { CoreWallet } from '@avalabs/web3-react-core-connector'; | ||
import { Contact } from '@avalabs/types'; | ||
export declare function useContacts(provider: AvalancheProvider): { | ||
export declare function useContacts(provider: CoreWallet['provider']): { | ||
contacts: Contact[]; | ||
getContacts: () => Promise<void>; | ||
getContacts: () => Promise<void> | null; | ||
}; | ||
//# sourceMappingURL=useContacts.d.ts.map |
{ | ||
"name": "@avalabs/avalanche-contacts", | ||
"version": "1.0.0", | ||
"version": "1.0.1-alpha.0", | ||
"license": "MIT", | ||
@@ -14,13 +14,6 @@ "main": "dist/index.js", | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-json": "4.1.0", | ||
"@rollup/plugin-typescript": "8.2.1", | ||
"@zerollup/ts-transform-paths": "1.7.18", | ||
"rollup": "2.47.0", | ||
"rollup-plugin-commonjs": "10.1.0", | ||
"rollup-plugin-delete": "2.0.0", | ||
"rollup-plugin-typescript2": "0.30.0", | ||
"ttypescript": "1.5.12" | ||
"dependencies": { | ||
"@avalabs/web3-react-core-connector": "1.0.1-alpha.0" | ||
}, | ||
"gitHead": "c1e89fc3f1f4f3340bc19ce30ad2544e3b8249bc" | ||
"gitHead": "abcb353db2541e3ca1b707773cf244d9c3d24eb5" | ||
} |
@@ -1,3 +0,5 @@ | ||
# Avalanche Contacts | ||
# Core Contacts | ||
**This API is experimental and is not publicly accessible.** | ||
Through our extension we have exposed contacts. These contacts are accesible through the | ||
@@ -4,0 +6,0 @@ provider and are stored securly in the extension. These contacts can be used to show a name |
@@ -20,3 +20,3 @@ import json from '@rollup/plugin-json'; | ||
tsconfigOverride: { | ||
exclude: ['./test/**'], | ||
exclude: ['*.test.*'], | ||
// index.ts is included here and not in tsconfig.ts so relative imports | ||
@@ -23,0 +23,0 @@ // are imported correctly by VS Code. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
6622
0
87
21
1
2
+ Added@avalabs/web3-react-core-connector@1.0.1-alpha.0(transitive)
+ Added@web3-react/types@8.1.2-beta.0(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedreact@18.3.1(transitive)
+ Addeduse-sync-external-store@1.2.2(transitive)
+ Addedzustand@4.5.5(transitive)