@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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @echoxyz/sonar-react
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [a043774]
8
+ - @echoxyz/sonar-core@0.2.0
9
+
3
10
  ## 0.2.0
4
11
 
5
12
  ### Minor Changes
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 { Entities } = await client.listAvailableEntities({ saleUUID: "<your-sale-uuid>" });
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: "0x1234...abcd" as `0x${string}`,
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.0",
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.1.5"
19
+ "@echoxyz/sonar-core": "0.2.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@testing-library/react": "^16.0.0",