@yodlpay/react-native 0.1.0 → 0.1.2

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
@@ -11,7 +11,7 @@
11
11
 
12
12
  [Yodl](https://yodl.me) is a payments protocol that connects crypto to the world's local payment rails: users pay in stablecoins by scanning everyday QR codes — Pix in Brazil, transfers in Argentina, and more — while merchants receive their local currency and users keep self-custody of their funds, often at FX rates that beat Visa and Mastercard.
13
13
 
14
- The `@yodlpay/react-native` SDK brings that entire experience into your app with a single drop-in component. It wraps the Yodl miniapp in a hardened, origin-locked WebView with an injected [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) provider, so you bring the wallet and the SDK handles the payment UI, the RPC bridge, and the on-chain execution flow.
14
+ The `@yodlpay/react-native` SDK brings that entire experience into your app with a single drop-in component. It wraps the Yodl UI in a hardened, origin-locked surface with an injected [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) provider, so you bring the wallet and the SDK handles the payment UI, the RPC bridge, and the on-chain execution flow.
15
15
 
16
16
  ## Why Yodl
17
17
 
@@ -26,8 +26,8 @@ The `@yodlpay/react-native` SDK brings that entire experience into your app with
26
26
 
27
27
  - **Wallet-agnostic** — works with any EIP-1193 provider: Privy, MetaMask, Coinbase Wallet, Rainbow, WalletConnect, and more.
28
28
  - **Two drop-in components** — `<YodlPayment>` for QR-driven payments and `<YodlDashboard>` for the full account view.
29
- - **Hardened by default** — the WebView is locked to the configured Yodl origin and off-origin navigation is blocked. No security config required.
30
- - **Batched transactions** — implements [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792) (`wallet_sendCalls`) with native → EIP-7702 → sequential fallback, transparently.
29
+ - **Hardened by default** — the Yodl UI is locked to the configured Yodl origin and off-origin navigation is blocked. No security config required.
30
+ - **Batched transactions** — bridges [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792) (`wallet_sendCalls`) to the wallet provider and falls back to sequential non-atomic sends only when the request explicitly allows it.
31
31
  - **Multi-chain** — Ethereum, Arbitrum, Base, Polygon, Optimism, BNB Chain, and Gnosis out of the box.
32
32
  - **Fully typed** — ships first-class TypeScript types for every component, prop, and config option.
33
33
 
@@ -36,15 +36,14 @@ The `@yodlpay/react-native` SDK brings that entire experience into your app with
36
36
  - [Why Yodl](#why-yodl)
37
37
  - [Requirements](#requirements)
38
38
  - [Installation](#installation)
39
+ - [Base SDK](#base-sdk)
39
40
  - [Quick Start](#quick-start)
40
- - [Setup](#setup)
41
- - [1. Crypto polyfill (required)](#1-crypto-polyfill-required)
42
- - [2. Enable Hermes / BigInt](#2-enable-hermes--bigint)
43
- - [3. Metro configuration](#3-metro-configuration)
44
- - [4. Expo notes](#4-expo-notes)
41
+ - [Platform Notes](#platform-notes)
42
+ - [Native builds](#native-builds)
43
+ - [Hermes / BigInt](#hermes--bigint)
45
44
  - [Usage](#usage)
46
45
  - [Full example](#full-example)
47
- - [Controlling the WebView (back / reload)](#controlling-the-webview-back--reload)
46
+ - [Optional EIP-7702 fallback](#optional-eip-7702-fallback)
48
47
  - [API Reference](#api-reference)
49
48
  - [Security](#security)
50
49
  - [Troubleshooting](#troubleshooting)
@@ -57,61 +56,47 @@ The `@yodlpay/react-native` SDK brings that entire experience into your app with
57
56
  | React | `>= 18` |
58
57
  | React Native | `>= 0.72` |
59
58
  | Hermes engine | Enabled (default) |
60
- | Node (for tooling) | `>= 18` |
61
59
 
62
- > This package uses native modules, so it requires a custom dev build — it does **not** run in Expo Go. See [Expo notes](#4-expo-notes).
60
+ > This package uses native modules, so it requires a custom dev build — it does **not** run in Expo Go. See [Native builds](#native-builds).
63
61
 
64
62
  ## Installation
65
63
 
66
- ### Expo
64
+ ### Base SDK
67
65
 
68
- Use `npx expo install` so Expo resolves native-module versions (`react-native-webview`, `react-native-get-random-values`) that match your installed SDK:
66
+ For Expo apps, install the SDK and WebView with Expo so `react-native-webview` resolves to the version that matches your installed Expo SDK:
69
67
 
70
68
  ```bash
71
- npx expo install @yodlpay/react-native react-native-webview viem react-native-get-random-values
69
+ npx expo install @yodlpay/react-native react-native-webview
72
70
  ```
73
71
 
74
- Then create a [development build](https://docs.expo.dev/develop/development-builds/introduction/) (`npx expo run:ios` / `npx expo run:android`) — native modules don't run in Expo Go.
72
+ Then rebuild the native app:
75
73
 
76
- ### React Native (bare)
74
+ ```bash
75
+ npx expo run:ios
76
+ # or
77
+ npx expo run:android
78
+ ```
79
+
80
+ For bare React Native apps, install the SDK and WebView with your package manager:
77
81
 
78
82
  ```bash
79
83
  # npm
80
- npm install @yodlpay/react-native react-native-webview viem react-native-get-random-values
84
+ npm install @yodlpay/react-native react-native-webview
81
85
 
82
86
  # pnpm
83
- pnpm add @yodlpay/react-native react-native-webview viem react-native-get-random-values
87
+ pnpm add @yodlpay/react-native react-native-webview
84
88
 
85
89
  # yarn
86
- yarn add @yodlpay/react-native react-native-webview viem react-native-get-random-values
90
+ yarn add @yodlpay/react-native react-native-webview
87
91
  ```
88
92
 
89
- Then install iOS pods and rebuild:
93
+ Then install iOS pods and rebuild the app:
90
94
 
91
95
  ```bash
92
96
  npx pod-install
93
97
  ```
94
98
 
95
- ### Peer dependencies
96
-
97
- You provide these in your app; the SDK declares them as peers so it shares a single copy with your project.
98
-
99
- | Package | Why it's needed |
100
- | ---------------------- | --------------------------------------------------------- |
101
- | `react` | React runtime (`>= 18`) |
102
- | `react-native` | React Native runtime (`>= 0.72`) |
103
- | `react-native-webview` | Renders the Yodl miniapp and bridges RPC messages |
104
- | `viem` | Powers public clients and the EIP-7702 smart-account flow |
105
-
106
- ### Runtime requirement
107
-
108
- `react-native-get-random-values` is **not a peer dependency**, but it is a required runtime polyfill — install it and import it first (see below).
109
-
110
- | Package | Why it's needed |
111
- | -------------------------------- | --------------------------------------------------------------------------------- |
112
- | `react-native-get-random-values` | Web Crypto polyfill required by `viem` (see [Setup](#1-crypto-polyfill-required)) |
113
-
114
- > **Required:** add `import 'react-native-get-random-values'` as the **first line of your entry file** (`index.js` / `index.ts`), before any other import. `viem` reads `crypto.getRandomValues()` at module load, so the polyfill must run first or payments will throw `crypto.getRandomValues() not supported`. For bare React Native, also run `npx pod-install`. See [Setup §1](#1-crypto-polyfill-required).
99
+ That is the full base install.
115
100
 
116
101
  ## Quick Start
117
102
 
@@ -120,7 +105,10 @@ Three steps: create the SDK once, wrap your screen in `<YodlProvider>`, render `
120
105
  ```tsx
121
106
  import { createSdk, YodlProvider, YodlPayment } from '@yodlpay/react-native';
122
107
 
123
- const sdk = createSdk();
108
+ const sdk = createSdk({
109
+ integrationId: 'privy-wallet',
110
+ supportedChainIds: [1, 42161, 8453, 137, 10, 56, 100],
111
+ });
124
112
 
125
113
  export function PaymentScreen({ qrData, provider, address }) {
126
114
  // bail out early if the scanned QR isn't a Yodl payment
@@ -138,55 +126,20 @@ export function PaymentScreen({ qrData, provider, address }) {
138
126
  }
139
127
  ```
140
128
 
141
- > Make sure you've completed the one-time [Setup](#setup) below first — the crypto polyfill in particular is required before any payment will succeed.
142
-
143
- ## Setup
144
-
145
- A few one-time steps are required before the SDK works on a device or simulator. `viem` and the EIP-7702 smart-account flow (via `permissionless`) rely on Web Crypto and BigInt, neither of which is available in React Native out of the box.
129
+ > After installing the base SDK and rebuilding the native app, you can render the component.
146
130
 
147
- ### 1. Crypto polyfill (required)
131
+ ## Platform Notes
148
132
 
149
- `viem` and `permissionless` call `crypto.getRandomValues()` for key, nonce, and signature operations. Import the polyfill **at the very top of your app entry file** (`index.js` / `App.tsx`) — before any other import:
150
-
151
- ```tsx
152
- // index.js — must be the FIRST import in your app
153
- import 'react-native-get-random-values';
133
+ Most apps only need the base install command and a native rebuild. These notes cover platform-specific cases.
154
134
 
155
- import { AppRegistry } from 'react-native';
156
- import App from './App';
157
- // ...
158
- ```
135
+ ### Native builds
159
136
 
160
- > If you skip this, you'll see runtime errors like `crypto.getRandomValues() not supported` when sending a payment. On bare React Native, also run `npx pod-install` after installing the package. (Expo managed workflow can ignore the "CocoaPods is not supported" notice — it's harmless.)
137
+ The base SDK renders the Yodl UI with `react-native-webview`, so it does **not** run in Expo Go. Use a [development build](https://docs.expo.dev/develop/development-builds/introduction/) (`npx expo run:ios` / `npx expo run:android`) or a bare React Native build.
161
138
 
162
- ### 2. Enable Hermes / BigInt
139
+ ### Hermes / BigInt
163
140
 
164
141
  The SDK uses `BigInt`, which requires the Hermes engine (enabled by default in React Native `0.70+` and all recent Expo SDKs). If you've disabled Hermes, re-enable it or add a `BigInt` polyfill.
165
142
 
166
- ### 3. Metro configuration
167
-
168
- The package ships a compiled build (ESM + CJS) and (in monorepos or when linked with `file:`) shares `react`, `react-native`, `react-native-webview`, and `viem` with your app. Wire up the provided Metro helper so these resolve correctly and the linked workspace is watched for live reload.
169
-
170
- ```js
171
- // metro.config.js
172
- const { getDefaultConfig } = require('expo/metro-config'); // or '@react-native/metro-config'
173
- const { withYodlReactNative } = require('@yodlpay/react-native/metro-config');
174
-
175
- const config = getDefaultConfig(__dirname);
176
-
177
- // If you have a custom resolveRequest, set it BEFORE calling the helper:
178
- // config.resolver.resolveRequest = myCustomResolver;
179
-
180
- module.exports = withYodlReactNative(config, __dirname);
181
- ```
182
-
183
- > For a plain (non-monorepo) install from npm, the Metro helper is optional — but it is required when consuming the package via workspace/`file:` linking.
184
-
185
- ### 4. Expo notes
186
-
187
- - This package uses native modules (`react-native-webview`), so it does **not** run in Expo Go. Use a [development build](https://docs.expo.dev/develop/development-builds/introduction/) (`npx expo run:ios` / `npx expo run:android`).
188
- - No config plugin is required — `react-native-webview` autolinks. Just rebuild the dev client after installing native dependencies.
189
-
190
143
  ## Usage
191
144
 
192
145
  The package mirrors `@yodlpay/sdk-core`'s façade: create the SDK once with `createSdk(config)`, then use the namespaced instance (`sdk.qr.*`, `sdk.prefetch()`) and the components. Wallet state is supplied at runtime via `<YodlProvider>`.
@@ -194,14 +147,12 @@ The package mirrors `@yodlpay/sdk-core`'s façade: create the SDK once with `cre
194
147
  ### Full example
195
148
 
196
149
  ```tsx
197
- // index.js — MUST be the first import (Web Crypto polyfill for viem)
198
- import 'react-native-get-random-values';
199
-
200
150
  // sdk.ts — create the instance once, app-wide
201
151
  import { createSdk } from '@yodlpay/react-native';
202
152
 
203
153
  export const sdk = createSdk({
204
- // webviewBaseUrl defaults to https://sdk-webview.yodl.me
154
+ integrationId: 'privy-wallet',
155
+ // yodlUiBaseUrl defaults to https://sdk-webview.yodl.me
205
156
  supportedChainIds: [1, 42161, 8453, 137, 10, 56, 100],
206
157
  });
207
158
 
@@ -243,7 +194,6 @@ export default function App() {
243
194
  provider={provider}
244
195
  address={address}
245
196
  chainId={1}
246
- supportedChainIds={[1, 42161, 8453, 137, 10, 56, 100]}
247
197
  >
248
198
  {screen === 'idle' && (
249
199
  <View style={{ flex: 1, justifyContent: 'center', gap: 12 }}>
@@ -272,38 +222,50 @@ export default function App() {
272
222
  }
273
223
  ```
274
224
 
275
- ### Controlling the WebView (back / reload)
225
+ ### Optional EIP-7702 fallback
226
+
227
+ Most wallets do not need this. `@yodlpay/react-native` uses your EIP-1193 provider as the wallet transport and forwards the EIP-5792 wallet call methods when the wallet supports them natively.
276
228
 
277
- `<YodlPayment>` and `<YodlDashboard>` forward a `YodlWebViewRef`, letting you drive WebView navigation imperatively — handy for wiring a hardware/Android back button.
229
+ Add `@yodlpay/react-native-eip-7702-provider` only when the wallet lacks the atomic EIP-5792 `wallet_sendCalls` support your flow requires, can sign EIP-7702 authorizations, and you want Yodl to provide that fallback path. The add-on wraps the same provider, advertises the fallback through `wallet_getCapabilities`, and still lets native `wallet_sendCalls` win when the wallet supports it.
278
230
 
279
231
  ```tsx
280
- import { useRef } from 'react';
281
- import { Button } from 'react-native';
282
- import { YodlPayment, type YodlWebViewRef } from '@yodlpay/react-native';
232
+ import { withYodl7702 } from '@yodlpay/react-native-eip-7702-provider';
233
+ import { YodlProvider, YodlPayment } from '@yodlpay/react-native';
283
234
 
284
- function PayScreen({ qrData }: { qrData: string }) {
285
- const ref = useRef<YodlWebViewRef>(null);
235
+ const provider = withYodl7702(walletProvider, {
236
+ address,
237
+ chainId,
238
+ supportedChainIds: [1, 42161, 8453, 137, 10, 56, 100],
239
+ });
286
240
 
287
- return (
288
- <>
289
- <YodlPayment ref={ref} qrData={qrData} />
290
- <Button title="Back" onPress={() => ref.current?.goBack()} />
291
- <Button title="Reload" onPress={() => ref.current?.reload()} />
292
- </>
293
- );
294
- }
241
+ <YodlProvider sdk={sdk} provider={provider} address={address} chainId={chainId}>
242
+ <YodlPayment qrData={qrData} />
243
+ </YodlProvider>;
295
244
  ```
296
245
 
246
+ Base SDK users can skip this optional add-on entirely. Without it, unsupported EIP-5792 requests can still fall back to sequential `eth_sendTransaction` only when the request explicitly allows non-atomic execution.
247
+
248
+ See [`@yodlpay/react-native-eip-7702-provider`](../react-native-eip-7702-provider/README.md) for installation and fallback details.
249
+
297
250
  ## API Reference
298
251
 
299
- ### `createSdk(config?)`
252
+ ### `createSdk(config)`
300
253
 
301
254
  Returns a `Yodl` instance. `config`:
302
255
 
303
- | Option | Type | Default | Description |
304
- | ------------------- | ---------- | ------------------------------------ | ------------------------------------- |
305
- | `webviewBaseUrl` | `string` | `https://sdk-webview.yodl.me` | Base URL for the Yodl miniapp WebView |
306
- | `supportedChainIds` | `number[]` | `[1, 42161, 8453, 137, 10, 56, 100]` | Chain IDs the wallet can switch to |
256
+ | Option | Type | Required | Default | Description |
257
+ | ------------------- | ---------- | -------- | ----------------------------- | ------------------------------------------------ |
258
+ | `integrationId` | `string` | Yes | — | Identifies your app in Yodl-owned request headers |
259
+ | `yodlUiBaseUrl` | `string` | No | `https://sdk-webview.yodl.me` | Base URL for the Yodl UI |
260
+ | `supportedChainIds` | `number[]` | Yes | — | Chain IDs the wallet can switch to |
261
+
262
+ `integrationId` must be a non-empty string, for example `privy-wallet`. The SDK sends it with package metadata on Yodl-owned requests:
263
+
264
+ ```txt
265
+ X-Yodl-Integration-Id: privy-wallet
266
+ X-Yodl-SDK-Name: @yodlpay/react-native
267
+ X-Yodl-SDK-Version: 0.1.0
268
+ ```
307
269
 
308
270
  Instance members:
309
271
 
@@ -315,60 +277,56 @@ Instance members:
315
277
 
316
278
  Supplies the SDK instance and wallet state to the components. Render it once, high in your tree.
317
279
 
318
- | Prop | Type | Required | Description |
319
- | ------------------- | ----------------- | -------- | --------------------------------------------------- |
320
- | `sdk` | `Yodl` | Yes | Instance from `createSdk()` |
321
- | `provider` | `EIP1193Provider` | Yes | EIP-1193 provider from any wallet SDK |
322
- | `address` | `string` | Yes | Connected wallet address |
323
- | `chainId` | `number` | Yes | Chain ID the wallet is currently on |
324
- | `supportedChainIds` | `number[]` | No | Override for switchable chains (defaults to config) |
280
+ | Prop | Type | Required | Description |
281
+ | ---------- | ----------------- | -------- | ------------------------------------- |
282
+ | `sdk` | `Yodl` | Yes | Instance from `createSdk()` |
283
+ | `provider` | `EIP1193Provider` | Yes | EIP-1193 provider from any wallet SDK |
284
+ | `address` | `string` | Yes | Connected wallet address |
285
+ | `chainId` | `number` | Yes | Chain ID the wallet is currently on |
325
286
 
326
287
  ### `<YodlPayment />`
327
288
 
328
- Renders the payment flow for a scanned QR code. Forwards a [`YodlWebViewRef`](#controlling-the-webview-back--reload).
289
+ Renders the payment flow for a scanned QR code.
329
290
 
330
- | Prop | Type | Required | Description |
331
- | ------------------- | -------------------------- | -------- | ---------------------------------- |
332
- | `qrData` | `string` | Yes | Raw QR data string |
333
- | `onTransactionSent` | `(txHash: string) => void` | No | Called after a transaction is sent |
334
- | `onError` | `(error: Error) => void` | No | Called on RPC / payment errors |
335
- | `style` | `ViewStyle` | No | Container style |
291
+ | Prop | Type | Required | Description |
292
+ | ------------------- | --------------------------------------- | -------- | ---------------------------------------------------------------------- |
293
+ | `qrData` | `string` | Yes | Raw QR data string |
294
+ | `onTransactionSent` | `(txHash: string) => void` | No | Called after a transaction is sent |
295
+ | `onPaymentDetails` | `(details: YodlPaymentDetails) => void` | No | Called with generalized payment lifecycle details emitted by the WebView |
296
+ | `onError` | `(error: Error) => void` | No | Called on RPC / payment errors |
297
+ | `style` | `ViewStyle` | No | Container style |
336
298
 
337
299
  ### `<YodlDashboard />`
338
300
 
339
- Renders the full Yodl account dashboard. Forwards a [`YodlWebViewRef`](#controlling-the-webview-back--reload).
301
+ Renders the full Yodl account dashboard.
302
+
303
+ | Prop | Type | Required | Description |
304
+ | ------------------- | --------------------------------------- | -------- | ---------------------------------------------------------------------- |
305
+ | `onTransactionSent` | `(txHash: string) => void` | No | Called after a transaction is sent |
306
+ | `onPaymentDetails` | `(details: YodlPaymentDetails) => void` | No | Called with generalized payment lifecycle details emitted by the WebView |
307
+ | `onError` | `(error: Error) => void` | No | Called on RPC errors |
308
+ | `style` | `ViewStyle` | No | Container style |
340
309
 
341
- | Prop | Type | Required | Description |
342
- | ------------------- | -------------------------- | -------- | ---------------------------------- |
343
- | `onTransactionSent` | `(txHash: string) => void` | No | Called after a transaction is sent |
344
- | `onError` | `(error: Error) => void` | No | Called on RPC errors |
345
- | `style` | `ViewStyle` | No | Container style |
310
+ ### Payment details events
346
311
 
347
- ### `YodlWebViewRef`
312
+ `onPaymentDetails` is optional and additive. Existing `onTransactionSent(txHash)` and `onError(error)` behavior is unchanged.
348
313
 
349
- Imperative handle forwarded by both components.
314
+ The Yodl WebView emits generalized payment lifecycle details after it has payment status information. The SDK forwards those details to `onPaymentDetails`. Normalized fields cover transaction hash, chain, lifecycle status, recipient, invoice, token amounts, refund state, and rewards when available. The original WebView/backend payload may be included under `raw`.
350
315
 
351
- | Member | Type | Description |
352
- | ------------ | ------------ | ------------------------------------- |
353
- | `goBack` | `() => void` | Navigate back within the WebView |
354
- | `reload` | `() => void` | Reload the current WebView page |
355
- | `webViewRef` | `RefObject` | Underlying `react-native-webview` ref |
316
+ The SDK does not fetch transaction details directly; it only bridges WebView messages.
356
317
 
357
318
  ## Security
358
319
 
359
- `<YodlPayment>` and `<YodlDashboard>` inject an EIP-1193 provider bound to the user's wallet, so the underlying WebView is **locked to the configured Yodl origin** and off-origin navigation is blocked (`onShouldStartLoadWithRequest`). This prevents origin spoofing and mid-request navigation that could intercept signed responses. The injected provider also enforces a 30 s pending-request timeout.
320
+ `<YodlPayment>` and `<YodlDashboard>` inject an EIP-1193 provider bound to the user's wallet, so the underlying Yodl UI is **locked to the configured Yodl origin** and off-origin navigation is blocked (`onShouldStartLoadWithRequest`). This prevents origin spoofing and mid-request navigation that could intercept signed responses. The injected provider also enforces a 30 s pending-request timeout.
360
321
 
361
- The WebView bridge implements EIP-5792 v2 (`wallet_sendCalls` with native → EIP-7702 → sequential fallback, `wallet_getCallsStatus`, `wallet_getCapabilities`) internally — no configuration required.
322
+ The bridge implements EIP-5792 v2 request handling without owning a smart-account stack: it forwards native `wallet_sendCalls`, `wallet_getCallsStatus`, `wallet_showCallsStatus`, and `wallet_getCapabilities` support from the supplied provider, and only falls back to sequential `eth_sendTransaction` when the request explicitly sets `atomicRequired: false`. Local fallback responses preserve EIP-5792 error codes for unsupported chains, duplicate ids, and unknown bundle ids. Use `@yodlpay/react-native-eip-7702-provider` when the host wallet needs Yodl's EIP-7702 fallback.
362
323
 
363
324
  ## Troubleshooting
364
325
 
365
326
  | Symptom | Cause & fix |
366
327
  | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
367
- | `crypto.getRandomValues() not supported` | The polyfill isn't loaded first. Make `import 'react-native-get-random-values'` the very first line of your entry file. See [Setup §1](#1-crypto-polyfill-required). |
368
- | `Can't find variable: BigInt` | Hermes is disabled. Re-enable Hermes or add a `BigInt` polyfill. See [Setup §2](#2-enable-hermes--bigint). |
328
+ | `Can't find variable: BigInt` | Hermes is disabled. Re-enable Hermes or add a `BigInt` polyfill. See [Hermes / BigInt](#hermes--bigint). |
369
329
  | App crashes / blank screen in Expo Go | Native modules aren't available in Expo Go. Use a [development build](https://docs.expo.dev/develop/development-builds/introduction/). |
370
- | `Unable to resolve module react-native-webview` (monorepo) | Shared deps aren't resolving. Add the Metro helper. See [Setup §3](#3-metro-configuration). |
371
- | `Unable to resolve module ./...node_modules/.pnpm/ox@.../ox/_esm/index` | A transitive dep (e.g. `ox` via `viem`/`permissionless`) is resolving from the linked workspace instead of your app. Wire up the Metro helper (`withYodlReactNative`) — it redirects all third-party deps to your project root — then clear the cache: `npx expo start -c`. See [Setup §3](#3-metro-configuration). |
372
330
  | `Yodl components must be rendered inside <YodlProvider>` | A component is mounted outside the provider. Wrap it in `<YodlProvider>`. |
373
331
  | Payment screen renders blank | `qrData` isn't a Yodl payment QR. Guard with `sdk.qr.isPaymentQr(qrData)` before rendering `<YodlPayment>`. |
374
332