@echoxyz/sonar-react 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +3 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -88,6 +88,7 @@ import { EntityType } from "@echoxyz/sonar-core";
|
|
|
88
88
|
export function Example() {
|
|
89
89
|
const { authenticated, ready } = useSonarAuth();
|
|
90
90
|
const client = useSonarClient();
|
|
91
|
+
const { walletAddress } = useWallet();
|
|
91
92
|
|
|
92
93
|
useEffect(() => {
|
|
93
94
|
if (!ready || !authenticated) {
|
|
@@ -95,10 +96,8 @@ export function Example() {
|
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
(async () => {
|
|
98
|
-
const {
|
|
99
|
-
if (Entities.length === 0) return;
|
|
99
|
+
const { Entity: entity } = await client.readEntity({ saleUUID: "<your-sale-uuid>", walletAddress });
|
|
100
100
|
|
|
101
|
-
const entity = Entities[0];
|
|
102
101
|
const pre = await client.prePurchaseCheck({
|
|
103
102
|
saleUUID: "<your-sale-uuid>",
|
|
104
103
|
entityUUID: entity.EntityUUID,
|
|
@@ -118,7 +117,7 @@ export function Example() {
|
|
|
118
117
|
|
|
119
118
|
const alloc = await client.fetchAllocation({
|
|
120
119
|
saleUUID: "<your-sale-uuid>",
|
|
121
|
-
walletAddress
|
|
120
|
+
walletAddress,
|
|
122
121
|
});
|
|
123
122
|
console.log(alloc);
|
|
124
123
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@echoxyz/sonar-react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"react": ">=18"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@echoxyz/sonar-core": "0.
|
|
19
|
+
"@echoxyz/sonar-core": "0.2.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@testing-library/react": "^16.0.0",
|