@coinbase/cdp-hooks 0.0.82 → 0.0.84

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.
@@ -1,4 +1,4 @@
1
- const o = "0.0.82";
1
+ const o = "0.0.84";
2
2
  export {
3
3
  o as VERSION
4
4
  };
@@ -1,18 +1,19 @@
1
- import { createSpendPermission as i } from "@coinbase/cdp-core";
1
+ import { getCurrentUserSync as i, createSpendPermission as p } from "@coinbase/cdp-core";
2
2
  import "./index2.js";
3
- import { useSendHookCallOnce as p } from "./index31.js";
4
- import { useState as d } from "react";
5
- import { useCurrentUser as S, useWaitForUserOperation as O, useEnforceAuthenticated as f } from "./index5.js";
3
+ import { useSendHookCallOnce as d } from "./index31.js";
4
+ import { useState as S } from "react";
5
+ import { useWaitForUserOperation as O, useEnforceAuthenticated as f } from "./index5.js";
6
6
  import { validateUserOwnsSmartAccount as v } from "./index34.js";
7
7
  const k = () => {
8
- p("use_create_spend_permission");
9
- const { currentUser: r } = S(), [n, o] = d(
8
+ d("use_create_spend_permission");
9
+ const [n, o] = S(
10
10
  void 0
11
11
  ), { data: a, error: c, status: m } = O(n);
12
12
  return { createSpendPermission: f(
13
13
  async (e) => {
14
+ const r = i();
14
15
  v({ account: e.evmSmartAccount, user: r });
15
- const u = r, t = e.evmSmartAccount ?? u.evmSmartAccountObjects[0].address, s = await i({ ...e, evmSmartAccount: t });
16
+ const u = r, t = e.evmSmartAccount ?? u.evmSmartAccountObjects[0].address, s = await p({ ...e, evmSmartAccount: t });
16
17
  return o({
17
18
  userOperationHash: s.userOperationHash,
18
19
  evmSmartAccount: t,
@@ -1,18 +1,19 @@
1
- import { revokeSpendPermission as i } from "@coinbase/cdp-core";
1
+ import { getCurrentUserSync as i, revokeSpendPermission as p } from "@coinbase/cdp-core";
2
2
  import "./index2.js";
3
- import { useSendHookCallOnce as p } from "./index31.js";
4
- import { useState as d } from "react";
5
- import { useCurrentUser as v, useWaitForUserOperation as S, useEnforceAuthenticated as k } from "./index5.js";
3
+ import { useSendHookCallOnce as d } from "./index31.js";
4
+ import { useState as S } from "react";
5
+ import { useWaitForUserOperation as v, useEnforceAuthenticated as k } from "./index5.js";
6
6
  import { validateUserOwnsSmartAccount as O } from "./index34.js";
7
7
  const C = () => {
8
- p("use_revoke_spend_permission");
9
- const { currentUser: r } = v(), [o, n] = d(
8
+ d("use_revoke_spend_permission");
9
+ const [o, n] = S(
10
10
  void 0
11
- ), { data: c, error: a, status: m } = S(o);
11
+ ), { data: c, error: a, status: m } = v(o);
12
12
  return { revokeSpendPermission: k(
13
13
  async (e) => {
14
+ const r = i();
14
15
  O({ account: e.evmSmartAccount, user: r });
15
- const u = r, t = e.evmSmartAccount ?? u.evmSmartAccountObjects[0].address, s = await i({ ...e, evmSmartAccount: t });
16
+ const u = r, t = e.evmSmartAccount ?? u.evmSmartAccountObjects[0].address, s = await p({ ...e, evmSmartAccount: t });
16
17
  return n({
17
18
  userOperationHash: s.userOperationHash,
18
19
  evmSmartAccount: t,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-hooks",
3
- "version": "0.0.82",
3
+ "version": "0.0.84",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/**",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": ">=18.2.0",
18
- "@coinbase/cdp-core": "^0.0.82"
18
+ "@coinbase/cdp-core": "^0.0.84"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@testing-library/jest-dom": "^6.6.3",
@@ -30,7 +30,7 @@
30
30
  "@size-limit/webpack": "^11.2.0",
31
31
  "@size-limit/webpack-why": "^11.2.0",
32
32
  "size-limit": "^11.2.0",
33
- "@coinbase/cdp-core": "^0.0.82"
33
+ "@coinbase/cdp-core": "^0.0.84"
34
34
  },
35
35
  "size-limit": [
36
36
  {