@pollar/react 0.8.0 → 0.8.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/README.md CHANGED
@@ -247,6 +247,9 @@ want to swap the chrome but keep the data wiring from `usePollar()`.
247
247
  `<TxStatusView>` is the shared status component (build → sign → success/error) reused by `TransactionModal` and
248
248
  `SendModal`; it's exported on its own for consumers that want to embed the lifecycle elsewhere.
249
249
 
250
+ > **0.8.1** — `onWalletConnect` is now **optional** on `<LoginModalTemplate>` (defaults to a no-op). If you drive the
251
+ > wallet picker entirely through `ui.renderWallets`, you no longer have to pass a handler you don't use.
252
+
250
253
  ---
251
254
 
252
255
  ### Custom adapters
package/dist/index.d.mts CHANGED
@@ -204,7 +204,7 @@ interface LoginModalTemplateProps {
204
204
  onEmailChange?: (email: string) => void;
205
205
  onEmailSubmit?: () => void;
206
206
  onSocialLogin?: (provider: 'google' | 'github') => void;
207
- onWalletConnect: (id: WalletId) => void;
207
+ onWalletConnect?: (id: WalletId) => void;
208
208
  /** Optional override for the wallet picker view. Defaults to a Freighter+Albedo list. */
209
209
  renderWallets?: RenderWalletsSlot;
210
210
  authState: AuthState;
package/dist/index.d.ts CHANGED
@@ -204,7 +204,7 @@ interface LoginModalTemplateProps {
204
204
  onEmailChange?: (email: string) => void;
205
205
  onEmailSubmit?: () => void;
206
206
  onSocialLogin?: (provider: 'google' | 'github') => void;
207
- onWalletConnect: (id: WalletId) => void;
207
+ onWalletConnect?: (id: WalletId) => void;
208
208
  /** Optional override for the wallet picker view. Defaults to a Freighter+Albedo list. */
209
209
  renderWallets?: RenderWalletsSlot;
210
210
  authState: AuthState;
package/dist/index.js CHANGED
@@ -1030,7 +1030,7 @@ var PollarModalFooter = () => {
1030
1030
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pollar-footer-name", children: "Pollar" }),
1031
1031
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "pollar-footer-version", children: [
1032
1032
  "v",
1033
- "0.8.0"
1033
+ "0.8.1"
1034
1034
  ] })
1035
1035
  ] })
1036
1036
  ] });
@@ -1693,7 +1693,9 @@ function LoginModalTemplate({
1693
1693
  }) }, codeInputKey)
1694
1694
  ] }) : showWalletPicker ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1695
1695
  /* @__PURE__ */ jsxRuntime.jsx(BackButton, { onClick: () => setShowWalletPicker(false) }),
1696
- renderWallets ? renderWallets({ onConnect: onWalletConnect, authState }) : /* @__PURE__ */ jsxRuntime.jsx(DefaultFreighterAlbedoButtons, { onConnect: onWalletConnect, isLoading })
1696
+ renderWallets ? renderWallets({ onConnect: onWalletConnect ?? (() => {
1697
+ }), authState }) : /* @__PURE__ */ jsxRuntime.jsx(DefaultFreighterAlbedoButtons, { onConnect: onWalletConnect ?? (() => {
1698
+ }), isLoading })
1697
1699
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1698
1700
  emailEnabled && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pollar-email-section", children: [
1699
1701
  /* @__PURE__ */ jsxRuntime.jsx(