@moonpay/platform-sdk-react-native 1.30.0 → 1.31.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
@@ -94,7 +94,7 @@ Pass an optional `theme` to style every visible MoonPay frame:
94
94
  <MoonPayProvider theme={{ appearance: 'dark', brandColor: 'FF6B00', customTheme: { borderRadius: 'l' } }}>
95
95
  ```
96
96
 
97
- `brandColor` and `customTheme` apply to the auth, widget, buy button and customer export frames. The connect, add card, challenge and reset frames ignore them for now. The connect flow can override any option per call (`client.connect({ theme })` or `<MoonPayConnect theme={...} />`).
97
+ Only the auth frame applies `brandColor` and `customTheme` for now. Other frames ignore them, so you can set them once on the client. The widget frame also ignores `appearance`. The connect flow can override any option per call (`client.connect({ theme })` or `<MoonPayConnect theme={...} />`).
98
98
 
99
99
  #### Providing the session token later
100
100
 
@@ -252,7 +252,7 @@ function SignInScreen({ onAuthenticated }: { onAuthenticated: () => void }) {
252
252
  }
253
253
  ```
254
254
 
255
- Mounting `<MoonPayAuth>` — or calling `setupAuth()` — without that prior `getConnection()` call emits an `error` event. On completion, credentials are applied to the shared client automatically, and `event.payload.status` is either `active` or `termsAcceptanceRequired` (see [Connection statuses](#connection-statuses)).
255
+ Mounting `<MoonPayAuth>` — or calling `setupAuth()` — without that prior `getConnection()` call emits an `error` event. On completion, credentials are applied to the shared client automatically, and `event.payload.status` is `active`, `pending`, `termsAcceptanceRequired`, `unavailable` or `failed` (see [Connection statuses](#connection-statuses)). Check the status before you continue: only `active` and `pending` deliver credentials.
256
256
 
257
257
  ### Get a quote and render the widget
258
258
 
package/dist/index.cjs CHANGED
@@ -325,10 +325,7 @@ var authSpec = {
325
325
  return { kind: "error", payload: msg.payload };
326
326
  case "complete": {
327
327
  const connection = msg.payload;
328
- if (connection.status === import_connection.ConnectionStatus.active || connection.status === import_connection.ConnectionStatus.pending || connection.status === import_connection.ConnectionStatus.termsAcceptanceRequired) {
329
- return { kind: "complete", payload: msg.payload };
330
- }
331
- return null;
328
+ return (0, import_platform_sdk_core.isAuthResult)(connection) ? { kind: "complete", payload: connection } : null;
332
329
  }
333
330
  default:
334
331
  return null;