@coinbase/cdp-react 0.0.70 → 0.0.71

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,9 +1,9 @@
1
- import { u as S, A as Y } from "../../chunks/useSendComponentCallOnce.BHZMuo6E.js";
2
- import { createContext as N, useMemo as x, useState as z, useCallback as D, useContext as A } from "react";
3
- import { VERSION as O } from "../../version.js";
1
+ import { u as S, A as K } from "../../chunks/useSendComponentCallOnce.BHZMuo6E.js";
2
+ import { createContext as N, useMemo as x, useState as V, useCallback as Y, useContext as A } from "react";
3
+ import { VERSION as z } from "../../version.js";
4
4
  import "../AuthButton/index.js";
5
5
  import { useAppConfig as g } from "../CDPReactProvider/index.js";
6
- import { CopyAddress as j } from "../CopyAddress/index.js";
6
+ import { CopyAddress as D } from "../CopyAddress/index.js";
7
7
  import { CopyEvmKeyButton as U } from "../CopyEvmKeyButton/index.js";
8
8
  import { CopySolanaKeyButton as X } from "../CopySolanaKeyButton/index.js";
9
9
  import { jsx as o, jsxs as d, Fragment as E } from "react/jsx-runtime";
@@ -89,17 +89,17 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
89
89
  onIframeError: r,
90
90
  onIframeReady: a,
91
91
  onIframeSessionExpired: l,
92
- onCopySuccess: i
92
+ onCopySuccess: s
93
93
  }) => {
94
- const { currentUser: n } = Z(), s = x(
95
- () => !!n?.solanaAccounts?.find((w) => w === t),
96
- [n?.solanaAccounts, t]
94
+ const { currentUser: n } = Z(), i = x(
95
+ () => !!n?.solanaAccountObjects?.find((w) => w.address === t),
96
+ [n?.solanaAccountObjects, t]
97
97
  ), m = x(
98
- () => !!n?.evmSmartAccounts?.find((w) => w === t),
99
- [n?.evmSmartAccounts, t]
100
- ), c = s ? "solana" : m ? "evm-smart" : "evm-eoa", [u, y] = z(!1), v = D(() => {
98
+ () => !!n?.evmSmartAccountObjects?.find((w) => w.address === t),
99
+ [n?.evmSmartAccountObjects, t]
100
+ ), c = i ? "solana" : m ? "evm-smart" : "evm-eoa", [u, y] = V(!1), v = Y(() => {
101
101
  y(!0), l?.();
102
- }, [l]), V = x(
102
+ }, [l]), B = x(
103
103
  () => ({
104
104
  address: t,
105
105
  isSessionExpired: u,
@@ -107,7 +107,7 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
107
107
  onIframeError: r,
108
108
  onIframeReady: a,
109
109
  onIframeSessionExpired: v,
110
- onCopySuccess: i
110
+ onCopySuccess: s
111
111
  }),
112
112
  [
113
113
  t,
@@ -116,10 +116,10 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
116
116
  v,
117
117
  r,
118
118
  a,
119
- i
119
+ s
120
120
  ]
121
121
  );
122
- return /* @__PURE__ */ o(k.Provider, { value: V, children: e });
122
+ return /* @__PURE__ */ o(k.Provider, { value: B, children: e });
123
123
  }, P = ({
124
124
  children: t,
125
125
  className: e = "",
@@ -141,21 +141,21 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
141
141
  ...e
142
142
  }) => {
143
143
  const { address: r } = C();
144
- return /* @__PURE__ */ o(j, { "data-part": "copy-address", address: r, label: t, ...e });
145
- }, R = ({
144
+ return /* @__PURE__ */ o(D, { "data-part": "copy-address", address: r, label: t, ...e });
145
+ }, O = ({
146
146
  fullWidth: t = !0,
147
147
  ...e
148
148
  }) => {
149
- const { address: r, type: a, onIframeError: l, onIframeReady: i, onIframeSessionExpired: n, onCopySuccess: s } = C();
149
+ const { address: r, type: a, onIframeError: l, onIframeReady: s, onIframeSessionExpired: n, onCopySuccess: i } = C();
150
150
  return a === "solana" ? /* @__PURE__ */ o(
151
151
  X,
152
152
  {
153
153
  fullWidth: t,
154
154
  address: r,
155
155
  onError: l,
156
- onReady: i,
156
+ onReady: s,
157
157
  onSessionExpired: n,
158
- onSuccess: s,
158
+ onSuccess: i,
159
159
  ...e
160
160
  }
161
161
  ) : a === "evm-eoa" ? /* @__PURE__ */ o(
@@ -164,20 +164,20 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
164
164
  fullWidth: t,
165
165
  address: r,
166
166
  onError: l,
167
- onReady: i,
167
+ onReady: s,
168
168
  onSessionExpired: n,
169
- onSuccess: s,
169
+ onSuccess: i,
170
170
  ...e
171
171
  }
172
172
  ) : null;
173
- }, B = (t) => /* @__PURE__ */ o($, { "data-part": "coinbase-footer", ...t }), et = ({ children: t }) => {
173
+ }, R = (t) => /* @__PURE__ */ o($, { "data-part": "coinbase-footer", ...t }), et = ({ children: t }) => {
174
174
  const { showCoinbaseFooter: e } = g(), { type: r, isSessionExpired: a } = C();
175
175
  return t && typeof t == "function" ? t({ type: r, isSessionExpired: a }) : t || /* @__PURE__ */ d(E, { children: [
176
176
  /* @__PURE__ */ o(P, {}),
177
177
  /* @__PURE__ */ o(F, {}),
178
178
  /* @__PURE__ */ o(I, {}),
179
- /* @__PURE__ */ o(R, {}),
180
- e && /* @__PURE__ */ o(B, { className: f.footer })
179
+ /* @__PURE__ */ o(O, {}),
180
+ e && /* @__PURE__ */ o(R, { className: f.footer })
181
181
  ] });
182
182
  }, rt = ({
183
183
  address: t,
@@ -185,9 +185,9 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
185
185
  className: r = "",
186
186
  onIframeError: a,
187
187
  onIframeReady: l,
188
- onIframeSessionExpired: i,
188
+ onIframeSessionExpired: s,
189
189
  onCopySuccess: n,
190
- ...s
190
+ ...i
191
191
  }) => {
192
192
  S("export_wallet");
193
193
  const { showCoinbaseFooter: m } = g();
@@ -199,7 +199,7 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
199
199
  !m && f["no-footer"],
200
200
  r
201
201
  ),
202
- ...s,
202
+ ...i,
203
203
  children: /* @__PURE__ */ o(
204
204
  ot,
205
205
  {
@@ -207,13 +207,13 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
207
207
  onIframeReady: l,
208
208
  onCopySuccess: n,
209
209
  onIframeError: a,
210
- onIframeSessionExpired: i,
210
+ onIframeSessionExpired: s,
211
211
  children: /* @__PURE__ */ o(et, { children: e })
212
212
  }
213
213
  )
214
214
  }
215
215
  );
216
- }, at = "ExportWalletModal-module__trigger___zMk8N", nt = "ExportWalletModal-module__content___KzNol", lt = "ExportWalletModal-module__footer___byg1T", it = "ExportWalletModal-module__modal___pX1AP", p = {
216
+ }, at = "ExportWalletModal-module__trigger___zMk8N", nt = "ExportWalletModal-module__content___KzNol", lt = "ExportWalletModal-module__footer___byg1T", st = "ExportWalletModal-module__modal___pX1AP", p = {
217
217
  "export-wallet": "ExportWalletModal-module__export-wallet___--L56",
218
218
  trigger: at,
219
219
  "title-bar": "ExportWalletModal-module__title-bar___RTPZq",
@@ -221,9 +221,9 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
221
221
  "close-button": "ExportWalletModal-module__close-button___ImsDR",
222
222
  "close-icon": "ExportWalletModal-module__close-icon___iAfyT",
223
223
  footer: lt,
224
- modal: it
225
- }, K = N(null), st = () => {
226
- const t = A(K);
224
+ modal: st
225
+ }, j = N(null), it = () => {
226
+ const t = A(j);
227
227
  if (!t)
228
228
  throw new Error("useExportWalletModalContext must be used within a ExportWalletModal");
229
229
  return t;
@@ -248,14 +248,14 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
248
248
  className: e = "",
249
249
  ...r
250
250
  }) => {
251
- const { showCoinbaseFooter: a } = g(), { address: l, onIframeReady: i, onCopySuccess: n, onIframeError: s, onIframeSessionExpired: m } = st();
251
+ const { showCoinbaseFooter: a } = g(), { address: l, onIframeReady: s, onCopySuccess: n, onIframeError: i, onIframeSessionExpired: m } = it();
252
252
  return /* @__PURE__ */ o(L, { "aria-describedby": void 0, className: h(p.modal, e), ...r, children: /* @__PURE__ */ o(
253
253
  rt,
254
254
  {
255
255
  address: l,
256
- onIframeReady: i,
256
+ onIframeReady: s,
257
257
  onCopySuccess: n,
258
- onIframeError: s,
258
+ onIframeError: i,
259
259
  onIframeSessionExpired: m,
260
260
  className: p["export-wallet"],
261
261
  children: t || (({ isSessionExpired: c }) => /* @__PURE__ */ d(E, { children: [
@@ -266,8 +266,8 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
266
266
  /* @__PURE__ */ d("div", { className: p.content, children: [
267
267
  c ? /* @__PURE__ */ o(_, { role: "alert", "data-part": "warning", variant: "warning", children: "Your export session has expired. Please close and reopen the modal to export again." }) : /* @__PURE__ */ o(F, {}),
268
268
  /* @__PURE__ */ o(I, {}),
269
- /* @__PURE__ */ o(R, {}),
270
- a && /* @__PURE__ */ o(B, { className: p.footer })
269
+ /* @__PURE__ */ o(O, {}),
270
+ a && /* @__PURE__ */ o(R, { className: p.footer })
271
271
  ] })
272
272
  ] }))
273
273
  }
@@ -278,16 +278,16 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
278
278
  onIframeReady: r,
279
279
  onCopySuccess: a,
280
280
  onIframeError: l,
281
- onIframeSessionExpired: i,
281
+ onIframeSessionExpired: s,
282
282
  open: n,
283
- setIsOpen: s
283
+ setIsOpen: i
284
284
  }) => {
285
285
  S("export_wallet_modal");
286
286
  const m = x(
287
- () => ({ address: t, onIframeReady: r, onCopySuccess: a, onIframeError: l, onIframeSessionExpired: i }),
288
- [t, r, a, l, i]
287
+ () => ({ address: t, onIframeReady: r, onCopySuccess: a, onIframeError: l, onIframeSessionExpired: s }),
288
+ [t, r, a, l, s]
289
289
  ), c = e ? M(e, b) : !1, u = e ? M(e, W) : !1, y = !c && !u;
290
- return /* @__PURE__ */ o(K.Provider, { value: m, children: /* @__PURE__ */ o(q, { open: n, onOpenChange: s, children: y ? /* @__PURE__ */ d(E, { children: [
290
+ return /* @__PURE__ */ o(j.Provider, { value: m, children: /* @__PURE__ */ o(q, { open: n, onOpenChange: i, children: y ? /* @__PURE__ */ d(E, { children: [
291
291
  /* @__PURE__ */ o(b, { children: e }),
292
292
  /* @__PURE__ */ o(W, {})
293
293
  ] }) : /* @__PURE__ */ d(E, { children: [
@@ -295,13 +295,13 @@ import '../../assets/ExportWallet.css';const tt = "ExportWallet-module__footer__
295
295
  !u && /* @__PURE__ */ o(W, {})
296
296
  ] }) }) });
297
297
  };
298
- Y.registerPackageVersion("react", O);
298
+ K.registerPackageVersion("react", z);
299
299
  export {
300
300
  Ao as E,
301
301
  rt as ExportWallet,
302
302
  I as ExportWalletCopyAddress,
303
- R as ExportWalletCopyKeyButton,
304
- B as ExportWalletFooter,
303
+ O as ExportWalletCopyKeyButton,
304
+ R as ExportWalletFooter,
305
305
  P as ExportWalletTitle,
306
306
  F as ExportWalletWarning,
307
307
  mt as a,
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.0.70";
1
+ export declare const VERSION = "0.0.71";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
- const o = "0.0.70";
1
+ const o = "0.0.71";
2
2
  export {
3
3
  o as VERSION
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-react",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@internationalized/number": "3.6.4",
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": ">=18.2.0 <19.2.0",
18
- "@coinbase/cdp-core": "^0.0.70",
19
- "@coinbase/cdp-hooks": "^0.0.70"
18
+ "@coinbase/cdp-core": "^0.0.71",
19
+ "@coinbase/cdp-hooks": "^0.0.71"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@size-limit/preset-big-lib": "^11.2.0",
@@ -37,8 +37,8 @@
37
37
  "eslint-plugin-react-hooks": "^5.2.0",
38
38
  "glob": "^11.0.3",
39
39
  "jest-canvas-mock": "2.5.2",
40
- "react": "~19.1.0",
41
- "react-dom": "~19.1.0",
40
+ "react": "~19.1.2",
41
+ "react-dom": "~19.1.2",
42
42
  "rollup-plugin-visualizer": "^6.0.3",
43
43
  "size-limit": "^11.2.0",
44
44
  "stylelint": "^16.22.0",
@@ -47,8 +47,8 @@
47
47
  "vite": "^7.0.4",
48
48
  "vite-plugin-dts": "^4.5.4",
49
49
  "vite-plugin-lib-inject-css": "^2.2.2",
50
- "@coinbase/cdp-core": "^0.0.70",
51
- "@coinbase/cdp-hooks": "^0.0.70"
50
+ "@coinbase/cdp-hooks": "^0.0.71",
51
+ "@coinbase/cdp-core": "^0.0.71"
52
52
  },
53
53
  "size-limit": [
54
54
  {