@bsv/expo-wallet-toolbox 0.20.0 → 0.21.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.0
4
+
5
+ ### Breaking
6
+
7
+ - **Live payments are received only while a Receive screen is showing.** A host that takes
8
+ live payments without rendering `HandleReceive` (which calls it for you) must call
9
+ `useDirectPay().openReceiveScreen()` while its receive UI is showing, and the function it
10
+ returns when that UI goes. Otherwise it no longer receives live payments; payers use the
11
+ message box.
12
+
13
+ ### Live payments
14
+
15
+ - **Answered only while the Receive screen is showing.** `DirectPayManager.openReceiveScreen()`
16
+ (and `useDirectPay().openReceiveScreen`) starts receiving while at least one Receive screen
17
+ is open, on top of the user's switch and the foreground rule; `HandleReceive` opens it while
18
+ focused, for BSV. The rest of the time this wallet answers no dial and holds no relay
19
+ socket, so nobody can learn its address or that the app is open; payers get the message box.
20
+ Opening and closing the screen starts and stops receiving on the same client, so a payment
21
+ being sent is not cut off.
22
+ - **BSVA STUN only.** The default STUN list is `stun:stun-us-1.bsvb.tech:3478`. A stored list
23
+ that is exactly the previous default is read as the new one; STUN urls in the relay's TURN
24
+ answer are dropped (`onlyOwnStun`).
25
+ - **1 MB live payments, payments only.** Live sessions take at most a payment with a 1 MB
26
+ transaction (`MAX_LIVE_TRANSACTION_BYTES`, `MAX_LIVE_MESSAGE_BYTES`, passed as the client's
27
+ `maxMessageBytes` and `limits.maxMessageBytes`). A larger outgoing payment is released before
28
+ anything is spent and fails with `failure: 'too_large'`, which `payIdentity` answers with the
29
+ `too_large` message box fallback (`direct_pay_fallback_too_large`).
30
+ - **The payer is told the truth about a recipient who is not receiving live.** Most
31
+ recipients are now off the Receive screen, so the fallback no longer says "isn't online right
32
+ now" (`direct_pay_fallback_offline`, `direct_pay_failed_offline`): it says they aren't taking
33
+ live payments right now. The prompt title (`direct_pay_fallback_title`), also shown for the
34
+ link-failed and too-large prompts, is now "Can't pay live right now".
35
+
3
36
  ## 0.20.0
4
37
 
5
38
  ### Breaking
@@ -5,8 +5,14 @@
5
5
  * `DirectPayProvider` starts it once a wallet is built and stops it when the wallet goes. While
6
6
  * a wallet is open there is always a client, so this wallet can dial others. Dialing and
7
7
  * receiving by identity key need a signaler, chosen in the device settings: a relay server (the
8
- * default) or the message box. Receiving is on when the user left it on and the app is in the
9
- * foreground; payments are taken into the wallet at once (`receive.ts`). Through a relay,
8
+ * default) or the message box. Receiving is on when the user left it on, the app is in the
9
+ * foreground and the Receive screen is showing ({@link DirectPayManager.openReceiveScreen}; the
10
+ * user's decision, 2026-10-21): the rest of the time this wallet answers no dial, so nobody can
11
+ * learn its address or that it is open, and payers use the message box. Opening and closing the
12
+ * screen starts and stops receiving on the same client, so a payment being sent is not cut off.
13
+ * Payments are taken into the wallet at once (`receive.ts`). Live sessions carry payments only
14
+ * (no payment request handler is given), and an authenticated peer may send at most
15
+ * MAX_LIVE_MESSAGE_BYTES (a 1 MB transaction). Through a relay,
10
16
  * receiving follows the relay connection, which reconnects by itself, and every connection may
11
17
  * use the short-lived TURN servers the relay hands out.
12
18
  *
@@ -45,7 +51,7 @@
45
51
  import i18n from '../i18n/translations'
46
52
  import type { KVStorage } from '../localpay/pending'
47
53
  import { classifyCreditError, type CreditFailureKind } from '../pay/creditErrors'
48
- import { iceServersFrom } from './settings'
54
+ import { iceServersFrom, MAX_LIVE_MESSAGE_BYTES, onlyOwnStun } from './settings'
49
55
  import {
50
56
  receiveDirectPayment,
51
57
  retryKeptDirectPayments,
@@ -202,6 +208,14 @@ export class DirectPayManager {
202
208
  private _foreground: boolean
203
209
  /** The last relay connection failed and has not come online since (see {@link signalingDown}). */
204
210
  private _relayDown = false
211
+ /** Receive screens showing now (see {@link openReceiveScreen}). */
212
+ private _receiveScreens = 0
213
+ /** The current client answers dials: set by {@link _beginReceiving}, cleared by {@link _endReceiving} and teardown. */
214
+ private _receiving = false
215
+ /** Bumped whenever receiving starts or ends; a start that is no longer current changes nothing. */
216
+ private _receiveRun = 0
217
+ /** Undone when receiving ends: the relay start timer, the relay retry. */
218
+ private _receiveCleanups: Array<() => void> = []
205
219
 
206
220
  private readonly _deps: DirectPayManagerDeps
207
221
 
@@ -288,6 +302,24 @@ export class DirectPayManager {
288
302
  }
289
303
  }
290
304
 
305
+ /**
306
+ * The Receive screen is showing: while at least one is, receiving is on (when the settings
307
+ * turn it on and the app is in the foreground). Returns the function to call when it stops
308
+ * showing; calling it again does nothing. Works with no wallet open: receiving then starts
309
+ * with the wallet.
310
+ */
311
+ openReceiveScreen = (): (() => void) => {
312
+ this._receiveScreens++
313
+ if (this._receiveScreens === 1) this._receiveScreenChanged()
314
+ let open = true
315
+ return () => {
316
+ if (!open) return
317
+ open = false
318
+ this._receiveScreens--
319
+ if (this._receiveScreens === 0) this._receiveScreenChanged()
320
+ }
321
+ }
322
+
291
323
  /** Closes the client and signaler. The snapshot clears at once; never rejects. */
292
324
  async stop(): Promise<void> {
293
325
  this._stopRetries()
@@ -337,7 +369,7 @@ export class DirectPayManager {
337
369
  let failures = 0
338
370
  const polled = (pollError?: unknown) => {
339
371
  failures = pollError === undefined ? 0 : failures + 1
340
- this._messageBoxPolled(generation, this._receives(o), failures, pollError)
372
+ this._messageBoxPolled(generation, failures, pollError)
341
373
  }
342
374
  signaler = new webrtpay.MessageBoxSignaler(watchingPolls(o.peerPayClient, polled), {
343
375
  host: o.messageBoxUrl || undefined,
@@ -354,6 +386,10 @@ export class DirectPayManager {
354
386
  iceServers: iceServersFrom(o.settings),
355
387
  ...(o.RTCPeerConnection !== undefined && { RTCPeerConnection: o.RTCPeerConnection })
356
388
  },
389
+ // Live sessions carry a payment and its ack: an authenticated peer may send this wallet
390
+ // no more than a payment with a 1 MB transaction (larger ones go by message box).
391
+ maxMessageBytes: MAX_LIVE_MESSAGE_BYTES,
392
+ limits: { maxMessageBytes: MAX_LIVE_MESSAGE_BYTES },
357
393
  // Once the recipient has answered, give the link 10 s (the package default is 6 s): a
358
394
  // slow STUN or TURN answer on a phone network otherwise ends a payment the recipient is
359
395
  // online for.
@@ -362,7 +398,7 @@ export class DirectPayManager {
362
398
  // client's life: it reuses live credentials.
363
399
  ...(relay &&
364
400
  !fallback && {
365
- iceServersProvider: relay.turnProvider(),
401
+ iceServersProvider: ownStunOnly(relay.turnProvider()),
366
402
  onIceServersProviderError: (e: unknown) =>
367
403
  console.warn("[DirectPayManager] Connecting without the relay's TURN servers:", messageOf(e))
368
404
  })
@@ -388,37 +424,115 @@ export class DirectPayManager {
388
424
  background: !this._foreground
389
425
  })
390
426
  if (!receive || !client) return
427
+ await this._beginReceiving(generation, o, client, relay, fallback, closing)
428
+ }
429
+
430
+ /** Receiving is on: the user's switch, the app in the foreground, and a Receive screen showing. */
431
+ private _receives(o: DirectPayStartOptions): boolean {
432
+ return o.settings.receiveEnabled && this._foreground && this._receiveScreens > 0
433
+ }
434
+
435
+ /**
436
+ * A Receive screen opened or the last one closed: starts or stops receiving on the current
437
+ * client, without replacing it (a payment being sent keeps its connection).
438
+ */
439
+ private _receiveScreenChanged(): void {
440
+ const started = this._started
441
+ const client = this._snapshot.client
442
+ if (!started || !client) return
443
+ const want = this._receives(started.options)
444
+ if (want === this._receiving) return
445
+ if (!want) {
446
+ this._endReceiving()
447
+ return
448
+ }
449
+ // A setup problem (no relay address, no message box) leaves nothing to receive through.
450
+ if (this._snapshot.via === null || this._snapshot.notice) return
451
+ const fallback = this._snapshot.relayUnreachable
452
+ this._update({ status: 'starting', error: '' })
453
+ // On the message box after a fallback, `started.relay` is only the relay being retried.
454
+ void this._beginReceiving(
455
+ this._generation,
456
+ started.options,
457
+ client,
458
+ fallback ? null : started.relay,
459
+ fallback,
460
+ Promise.resolve()
461
+ )
462
+ }
463
+
464
+ /**
465
+ * Starts receiving on `client`: with the relay, the fallback to the message box when it is not
466
+ * online in time; on that fallback, the relay retry; then the client listens.
467
+ */
468
+ private async _beginReceiving(
469
+ generation: number,
470
+ o: DirectPayStartOptions,
471
+ client: DirectPayClientLike,
472
+ relay: RelaySignalerLike | null,
473
+ fallback: boolean,
474
+ closing: Promise<void>
475
+ ): Promise<void> {
476
+ this._receiving = true
477
+ const run = ++this._receiveRun
391
478
  if (relay && !fallback && o.peerPayClient) {
392
479
  // Not online through the relay in time: receive through the message box meanwhile.
393
480
  const timer = setTimeout(() => {
394
- if (generation === this._generation && this._snapshot.status !== 'online') {
481
+ if (generation === this._generation && run === this._receiveRun && this._snapshot.status !== 'online') {
395
482
  this._fallBack(generation, o, 'it did not accept this wallet in time')
396
483
  }
397
484
  }, RELAY_START_MS)
398
- this._onTeardown(() => clearTimeout(timer))
485
+ this._receiveCleanups.push(() => clearTimeout(timer))
399
486
  }
400
487
  if (fallback) this._retryRelayLater(generation, o)
401
488
 
402
489
  // The previous client stops listening first, so two never answer the same offer.
403
490
  await closing
404
- if (generation !== this._generation) return
491
+ if (generation !== this._generation || run !== this._receiveRun) return
405
492
  try {
493
+ // onPayment only: payment requests sent over a live session are dropped unanswered.
406
494
  await client.startReceiving({
407
495
  onPayment: (p, ctx) => this._onPayment(o, p, ctx.note),
408
496
  onError: e => console.warn('[DirectPayManager] Inbound direct payment session failed:', messageOf(e))
409
497
  })
410
498
  // The status follows the relay's connection (_relayChanged) or the message box's polls
411
- // (_messageBoxPolled), so it says online only once receiving works.
499
+ // (_messageBoxPolled), so it says online only once receiving works. A stop asked for
500
+ // meanwhile has already called stopReceiving, which runs after this start.
412
501
  } catch (e) {
413
- if (generation === this._generation) {
502
+ if (generation === this._generation && run === this._receiveRun) {
414
503
  this._update({ status: 'error', error: `Direct payments cannot be received: ${messageOf(e)}` })
415
504
  }
416
505
  }
417
506
  }
418
507
 
419
- /** Receiving is on: the user's switch, and the app in the foreground. */
420
- private _receives(o: DirectPayStartOptions): boolean {
421
- return o.settings.receiveEnabled && this._foreground
508
+ /**
509
+ * The last Receive screen closed: the client stops answering dials (sessions already open run
510
+ * to their end), the relay retry stops, and the status is `off`. The client stays, for sending.
511
+ */
512
+ private _endReceiving(): void {
513
+ if (!this._receiving) return
514
+ this._receiving = false
515
+ this._receiveRun++
516
+ this._runReceiveCleanups()
517
+ clearTimeout(this._stableTimer)
518
+ this._stableTimer = undefined
519
+ const client = this._snapshot.client
520
+ if (client) {
521
+ void client.stopReceiving().catch(e => console.warn('[DirectPayManager] Could not stop receiving:', messageOf(e)))
522
+ }
523
+ this._update({ status: 'off', error: '' })
524
+ }
525
+
526
+ private _runReceiveCleanups(): void {
527
+ const cleanups = this._receiveCleanups
528
+ this._receiveCleanups = []
529
+ for (const fn of cleanups) {
530
+ try {
531
+ fn()
532
+ } catch (e) {
533
+ console.warn('[DirectPayManager] Cleanup failed:', messageOf(e))
534
+ }
535
+ }
422
536
  }
423
537
 
424
538
  /** Receiving through the relay failed: receive through the message box, retrying the relay. */
@@ -438,10 +552,11 @@ export class DirectPayManager {
438
552
  */
439
553
  private _retryRelayLater(generation: number, o: DirectPayStartOptions): void {
440
554
  const wait = Math.min(RELAY_RETRY_FIRST_MS * 2 ** Math.max(0, this._fallbacks - 1), RELAY_RETRY_MAX_MS)
555
+ let retry: RelaySignalerLike | null = null
441
556
  const timer = setTimeout(() => {
442
557
  const started = this._started
443
558
  if (generation !== this._generation || !started) return
444
- const retry = new this._deps.webrtpay.RelaySignaler({
559
+ retry = new this._deps.webrtpay.RelaySignaler({
445
560
  url: o.settings.relayUrl,
446
561
  wallet: o.wallet,
447
562
  originator: o.originator,
@@ -456,18 +571,14 @@ export class DirectPayManager {
456
571
  /* closed */
457
572
  })
458
573
  }, wait)
459
- this._onTeardown(() => clearTimeout(timer))
460
- }
461
-
462
- /** Runs `fn` when the current client is torn down. */
463
- private _onTeardown(fn: () => void): void {
464
- const started = this._started
465
- if (!started) return
466
- const unsubscribe = started.unsubscribe
467
- started.unsubscribe = () => {
468
- fn()
469
- unsubscribe()
470
- }
574
+ // Receiving ended: the retry's relay connection (which makes this wallet look online) closes.
575
+ this._receiveCleanups.push(() => {
576
+ clearTimeout(timer)
577
+ const started = this._started
578
+ if (!retry) return
579
+ if (started?.relay === retry) started.relay = null
580
+ void retry.close().catch(() => {})
581
+ })
471
582
  }
472
583
 
473
584
  /** The relay being retried accepted this wallet: receiving moves back to it. */
@@ -497,7 +608,7 @@ export class DirectPayManager {
497
608
  if (generation !== this._generation) return
498
609
  if (state === 'online') this._relayDown = false
499
610
  else if (state === 'offline' && e) this._relayDown = true
500
- if (!this._receives(o)) return
611
+ if (!this._receiving) return
501
612
  // Online long enough: the next fallback retries the relay after the shortest wait again.
502
613
  if (state === 'online' && this._stableTimer === undefined) {
503
614
  this._stableTimer = setTimeout(() => {
@@ -522,8 +633,8 @@ export class DirectPayManager {
522
633
  * worked, and `error` after {@link POLL_FAILURES_SHOWN} failures in a row (the signaler keeps
523
634
  * polling, and the status recovers by itself).
524
635
  */
525
- private _messageBoxPolled(generation: number, receiving: boolean, failures: number, error: unknown): void {
526
- if (generation !== this._generation || !receiving) return
636
+ private _messageBoxPolled(generation: number, failures: number, error: unknown): void {
637
+ if (generation !== this._generation || !this._receiving) return
527
638
  if (failures === 0) this._update({ status: 'online', error: '' })
528
639
  else if (failures >= POLL_FAILURES_SHOWN) {
529
640
  this._update({
@@ -702,6 +813,9 @@ export class DirectPayManager {
702
813
  /** Detaches the current client and signaler; returns their closing (never rejects). */
703
814
  private _teardown(): Promise<void> {
704
815
  this._generation++
816
+ this._receiving = false
817
+ this._receiveRun++
818
+ this._runReceiveCleanups()
705
819
  clearTimeout(this._stableTimer)
706
820
  this._stableTimer = undefined
707
821
  this._relayDown = false
@@ -745,6 +859,11 @@ export class DirectPayManager {
745
859
  */
746
860
  export const signalBox = (chain: string) => (chain === 'main' ? 'webrtpay_signals' : `webrtpay_signals_${chain}`)
747
861
 
862
+ /** The relay's TURN servers without the STUN servers its answer names (see onlyOwnStun). */
863
+ function ownStunOnly<T extends { urls: string | string[] }>(provider: () => Promise<T[]>): () => Promise<T[]> {
864
+ return async () => onlyOwnStun(await provider())
865
+ }
866
+
748
867
  /**
749
868
  * The message box client as the signaler sees it: the same calls, with each listing (a poll)
750
869
  * reported to `polled`, with its error when it failed. The live websocket calls and the host
@@ -71,6 +71,11 @@ export interface DirectPayContextValue {
71
71
  * `NotSentError` when it stopped before the payment was made.
72
72
  */
73
73
  sendDirect: (args: DirectPaySendArgs) => Promise<DirectSendResult>
74
+ /**
75
+ * The Receive screen is showing: live payments are answered only while it is (see
76
+ * `DirectPayManager.openReceiveScreen`). Returns the function to call when it stops showing.
77
+ */
78
+ openReceiveScreen: () => () => void
74
79
  }
75
80
 
76
81
  const OFF_SNAPSHOT: DirectPaySnapshot = {
@@ -88,6 +93,8 @@ const unavailable = async (): Promise<never> => {
88
93
  throw new NotSentError('Direct payments are not available', 'not configured')
89
94
  }
90
95
 
96
+ const noReceiveScreen = () => () => {}
97
+
91
98
  const DirectPayContext = createContext<DirectPayContextValue>({
92
99
  available: false,
93
100
  snapshot: OFF_SNAPSHOT,
@@ -96,7 +103,8 @@ const DirectPayContext = createContext<DirectPayContextValue>({
96
103
  saveSettings: unavailable,
97
104
  reload: async () => {},
98
105
  canSendDirect: false,
99
- sendDirect: unavailable
106
+ sendDirect: unavailable,
107
+ openReceiveScreen: () => () => {}
100
108
  })
101
109
 
102
110
  export const useDirectPay = (): DirectPayContextValue => useContext(DirectPayContext)
@@ -303,7 +311,8 @@ export const DirectPayProvider: React.FC<{ children: React.ReactNode; onToast?:
303
311
  saveSettings,
304
312
  reload,
305
313
  canSendDirect,
306
- sendDirect
314
+ sendDirect,
315
+ openReceiveScreen: manager ? manager.openReceiveScreen : noReceiveScreen
307
316
  }),
308
317
  [manager, snapshot, settings, saveSettings, reload, canSendDirect, sendDirect]
309
318
  )
@@ -87,6 +87,10 @@ export async function payIdentity(o: {
87
87
  case 'unknown':
88
88
  if (o.messageBox) return { kind: 'ask_fallback', reason: 'link_failed' }
89
89
  return failed('no', 'direct_pay_failed_link', { name: o.name })
90
+ case 'too_large':
91
+ // Released before anything was spent: the message box carries any size.
92
+ if (o.messageBox) return { kind: 'ask_fallback', reason: 'too_large' }
93
+ return stopped(error, o.name)
90
94
  case 'unavailable':
91
95
  return failed('no', 'direct_pay_failed_network')
92
96
  case 'wrong_network':
@@ -111,7 +115,12 @@ export async function payIdentity(o: {
111
115
  /** The fallback prompt for `reason`, naming the recipient. */
112
116
  export function fallbackPrompt(reason: FallbackReason, name: string): Required<DirectPayMessage> {
113
117
  return {
114
- key: reason === 'offline' ? 'direct_pay_fallback_offline' : 'direct_pay_fallback_link_failed',
118
+ key:
119
+ reason === 'offline'
120
+ ? 'direct_pay_fallback_offline'
121
+ : reason === 'too_large'
122
+ ? 'direct_pay_fallback_too_large'
123
+ : 'direct_pay_fallback_link_failed',
115
124
  params: { name }
116
125
  }
117
126
  }
@@ -6,9 +6,11 @@
6
6
  * not the wallet's key/value table, which is per wallet and cleared with it).
7
7
  *
8
8
  * Receiving is on by default, and wallets find each other through the public WebRTPay relay by
9
- * default, with the message box as the other choice. There is no migration: this key is the
10
- * first, and a stored value that is missing or no longer valid falls back to the default
11
- * field by field.
9
+ * default, with the message box as the other choice. A stored value that is missing or no
10
+ * longer valid falls back to the default field by field; a stored STUN list that is exactly
11
+ * the previous default ({@link PREVIOUS_DEFAULT_STUN_URLS}) is read as the current default.
12
+ * Receiving answers live payments only while the Receive screen is showing (see
13
+ * DirectPayManager.openReceiveScreen).
12
14
  *
13
15
  * Addresses are checked with regexes, not `URL`: `URL.hostname` is unreliable on Hermes. A relay
14
16
  * must be `wss://` (desktop also allows `ws://` for localhost; a phone has no local relay, so
@@ -33,11 +35,54 @@ export const DEFAULT_DIRECT_PAY_SETTINGS: Readonly<Omit<DirectPaySettings, 'stun
33
35
  receiveEnabled: true,
34
36
  signaling: 'relay',
35
37
  relayUrl: DEFAULT_RELAY_URL,
36
- stunUrls: Object.freeze([
37
- 'stun:stun-us-1.bsvb.tech:3478',
38
- 'stun:stun.l.google.com:19302',
39
- 'stun:stun.cloudflare.com:3478'
40
- ])
38
+ // BSVA's own STUN server only (2026-10-21): every STUN server learns this device's address
39
+ // and when it connects.
40
+ stunUrls: Object.freeze(['stun:stun-us-1.bsvb.tech:3478'])
41
+ }
42
+
43
+ /**
44
+ * The STUN list that was the default until 2026-10-21. A stored list that is exactly this
45
+ * (saved before, never edited) is read as the current default; any other list is the user's.
46
+ */
47
+ export const PREVIOUS_DEFAULT_STUN_URLS: readonly string[] = Object.freeze([
48
+ 'stun:stun-us-1.bsvb.tech:3478',
49
+ 'stun:stun.l.google.com:19302',
50
+ 'stun:stun.cloudflare.com:3478'
51
+ ])
52
+
53
+ /**
54
+ * Largest transaction (Atomic BEEF) sent or taken live: 1 MB (2026-10-21). A larger payment
55
+ * is refused before anything is spent and the message box is offered; a payee refuses larger
56
+ * live messages and closes the session.
57
+ */
58
+ export const MAX_LIVE_TRANSACTION_BYTES = 1_000_000
59
+ /**
60
+ * The largest message an authenticated live session may send this wallet: a `payment` with a
61
+ * {@link MAX_LIVE_TRANSACTION_BYTES} transaction in base64 (a third larger), plus 4096 bytes for
62
+ * the rest of the message, as @bsv/webrtpay counts it (MAX_DIRECT_TRANSACTION_BYTES).
63
+ */
64
+ export const MAX_LIVE_MESSAGE_BYTES = 4 * Math.ceil(MAX_LIVE_TRANSACTION_BYTES / 3) + 4096
65
+
66
+ /**
67
+ * `servers` (the relay's TURN answer) without its STUN entries: the relay passes on the TURN
68
+ * provider's STUN urls (Cloudflare's), and only the settings' STUN list is asked.
69
+ */
70
+ export function onlyOwnStun<T extends { urls: string | string[] }>(servers: T[]): T[] {
71
+ const out: T[] = []
72
+ for (const server of servers) {
73
+ const urls = (typeof server.urls === 'string' ? [server.urls] : [...server.urls]).filter(u => !/^stuns?:/i.test(u))
74
+ if (urls.length > 0) out.push({ ...server, urls })
75
+ }
76
+ return out
77
+ }
78
+
79
+ /** True for a stored STUN list that is exactly {@link PREVIOUS_DEFAULT_STUN_URLS}. */
80
+ function previousDefaultStun(value: unknown): boolean {
81
+ return (
82
+ Array.isArray(value) &&
83
+ value.length === PREVIOUS_DEFAULT_STUN_URLS.length &&
84
+ value.every((u, i) => u === PREVIOUS_DEFAULT_STUN_URLS[i])
85
+ )
41
86
  }
42
87
 
43
88
  // A host is a name or IPv4 address that starts and ends with a letter or digit, or a bracketed
@@ -208,7 +253,9 @@ export async function loadDirectPaySettings(
208
253
  receiveEnabled: field(checkReceiveEnabled, stored.receiveEnabled, defaults.receiveEnabled),
209
254
  signaling: field(checkSignaling, stored.signaling, defaults.signaling),
210
255
  relayUrl: field(checkRelayUrl, stored.relayUrl, defaults.relayUrl),
211
- stunUrls: field(checkStunUrls, stored.stunUrls, [...defaults.stunUrls])
256
+ stunUrls: field(checkStunUrls, previousDefaultStun(stored.stunUrls) ? [...defaults.stunUrls] : stored.stunUrls, [
257
+ ...defaults.stunUrls
258
+ ])
212
259
  },
213
260
  field(checkTurn, stored.turn, undefined)
214
261
  )
@@ -52,7 +52,16 @@ export interface DirectPaySettings {
52
52
  * - `aborted`: the dial was cancelled.
53
53
  * - `unknown`: anything else (a refusal with some other reason, a closed link, a bad handshake).
54
54
  */
55
- export type DialFailure = 'offline' | 'rejected' | 'unavailable' | 'timeout' | 'wrong_network' | 'aborted' | 'unknown'
55
+ export type DialFailure =
56
+ | 'offline'
57
+ | 'rejected'
58
+ | 'unavailable'
59
+ | 'timeout'
60
+ | 'wrong_network'
61
+ | 'aborted'
62
+ | 'unknown'
63
+ /** Not a dial failure: the recipient was reached, but the payment is over the 1 MB live limit (released). */
64
+ | 'too_large'
56
65
 
57
66
  /** Some wording for the user, as an i18n key and its parameters (core modules never return English). */
58
67
  export interface DirectPayMessage {
@@ -61,7 +70,7 @@ export interface DirectPayMessage {
61
70
  }
62
71
 
63
72
  /** Why a live attempt is offering the message box: the recipient is not there, or the link failed. */
64
- export type FallbackReason = 'offline' | 'link_failed'
73
+ export type FallbackReason = 'offline' | 'link_failed' | 'too_large'
65
74
 
66
75
  /** Paying stopped, and nothing more is offered. */
67
76
  export interface PayFailure extends DirectPayMessage {
@@ -147,6 +147,10 @@ export interface DirectPayClientOptions {
147
147
  onIceServersProviderError?: (e: unknown) => void
148
148
  chain?: string
149
149
  timeouts?: { connectMs?: number; ackMs?: number; presenceMs?: number; dialMs?: number }
150
+ /** Largest message a peer may send once authenticated, while this client dials. */
151
+ maxMessageBytes?: number
152
+ /** What a payee allows from peers that dial it (the package's `InboundLimits`, in part). */
153
+ limits?: { maxMessageBytes?: number }
150
154
  }
151
155
 
152
156
  export interface RelaySignalerOptions {
@@ -1220,23 +1220,26 @@ const resources = {
1220
1220
  pay_sent_to: 'to {{name}}',
1221
1221
  pay_save_as_contact: 'Save as a contact',
1222
1222
  direct_pay_status_on_title: 'Open to live payments',
1223
- direct_pay_status_on_relay: 'People can pay you directly while this app is open. Connected via relay.',
1224
- direct_pay_status_on_messagebox: 'People can pay you directly while this app is open. Connected via message box.',
1223
+ direct_pay_status_on_relay: 'People can pay you directly while this screen is open. Connected via relay.',
1224
+ direct_pay_status_on_messagebox:
1225
+ 'People can pay you directly while this screen is open. Connected via message box.',
1225
1226
  direct_pay_status_on_fallback:
1226
- 'People can pay you directly while this app is open. Connected via message box (relay unreachable).',
1227
+ 'People can pay you directly while this screen is open. Connected via message box (relay unreachable).',
1227
1228
  direct_pay_status_connecting_title: 'Connecting…',
1228
1229
  direct_pay_status_connecting_body: 'Getting ready to take live payments.',
1229
1230
  direct_pay_status_off_title: 'Live payments are off',
1230
- direct_pay_status_off_body: 'Turn them on in Settings so people can pay you directly while this app is open.',
1231
+ direct_pay_status_off_body: 'Turn them on in Settings so people can pay you directly while this screen is open.',
1231
1232
  direct_pay_status_not_set_up_body:
1232
1233
  'Live payments reach other wallets through the message box. Connect a message box in Settings, or use a relay server.',
1233
1234
  direct_pay_status_error_title: "Live payments aren't working right now",
1234
1235
  direct_pay_status_error_body: 'Live payments cannot be received right now.',
1235
1236
  direct_pay_fallback_offline:
1236
- "{{name}} isn't online right now. Send it to their message box? They'll get it next time they open their wallet.",
1237
+ "{{name}} isn't taking live payments right now. Send it to their message box instead? It reaches their wallet when they next open it.",
1237
1238
  direct_pay_fallback_link_failed: "Couldn't connect to {{name}} directly. Send it to their message box instead?",
1239
+ direct_pay_fallback_too_large:
1240
+ "This payment is too large to send live (over 1 MB). Send it to {{name}}'s message box instead? Nothing has been spent yet.",
1238
1241
  direct_pay_failed_offline:
1239
- "{{name}} isn't online right now. Nothing was spent. Connect a message box in Settings to pay people who are offline.",
1242
+ "{{name}} isn't taking live payments right now. Nothing was spent. Connect a message box in Settings to pay them anyway.",
1240
1243
  direct_pay_failed_link: "Couldn't connect to {{name}} directly. Nothing was spent.",
1241
1244
  direct_pay_failed_network: "Couldn't reach the payment network — check your connection.",
1242
1245
  direct_pay_failed_wrong_network: '{{name}} is on a different network. Nothing was spent.',
@@ -1245,7 +1248,7 @@ const resources = {
1245
1248
  'Your payment to {{name}} may already have been sent. Check Activity before paying again.',
1246
1249
  direct_pay_failed_not_sent: 'The payment could not be sent. Nothing was spent.',
1247
1250
  direct_pay_failed_no_message_box: 'Connect your message box in Settings to pay a wallet identity.',
1248
- direct_pay_fallback_title: 'Not online right now',
1251
+ direct_pay_fallback_title: "Can't pay live right now",
1249
1252
  direct_pay_fallback_send: 'Send to message box',
1250
1253
  direct_pay_fallback_host: 'Their message box: {{host}}',
1251
1254
  direct_pay_sent_live: "Paid live: it's already in their wallet.",
@@ -2282,19 +2285,23 @@ const resources = {
2282
2285
  pay_sent_to: '给 {{name}}',
2283
2286
  pay_save_as_contact: '保存为联系人',
2284
2287
  direct_pay_status_on_title: '可接收实时付款',
2285
- direct_pay_status_on_relay: '此应用打开时,别人可以直接向你付款。已通过中继连接。',
2286
- direct_pay_status_on_messagebox: '此应用打开时,别人可以直接向你付款。已通过消息箱连接。',
2287
- direct_pay_status_on_fallback: '此应用打开时,别人可以直接向你付款。已通过消息箱连接(无法连接中继)。',
2288
+ direct_pay_status_on_relay: '此页面打开时,别人可以直接向你付款。已通过中继连接。',
2289
+ direct_pay_status_on_messagebox: '此页面打开时,别人可以直接向你付款。已通过消息箱连接。',
2290
+ direct_pay_status_on_fallback: '此页面打开时,别人可以直接向你付款。已通过消息箱连接(无法连接中继)。',
2288
2291
  direct_pay_status_connecting_title: '正在连接…',
2289
2292
  direct_pay_status_connecting_body: '正在准备接收实时付款。',
2290
2293
  direct_pay_status_off_title: '实时付款已关闭',
2291
- direct_pay_status_off_body: '请在设置中开启,这样此应用打开时别人就可以直接向你付款。',
2294
+ direct_pay_status_off_body: '请在设置中开启,这样此页面打开时别人就可以直接向你付款。',
2292
2295
  direct_pay_status_not_set_up_body: '实时付款通过消息箱送达其他钱包。请在设置中连接消息箱,或使用中继服务器。',
2293
2296
  direct_pay_status_error_title: '实时付款暂时无法使用',
2294
2297
  direct_pay_status_error_body: '目前无法接收实时付款。',
2295
- direct_pay_fallback_offline: '{{name}} 目前不在线。要发送到对方的消息箱吗?对方下次打开钱包时就会收到。',
2298
+ direct_pay_fallback_offline:
2299
+ '{{name}} 目前没有接收实时付款。要改为发送到对方的消息箱吗?对方下次打开钱包时就会收到。',
2296
2300
  direct_pay_fallback_link_failed: '无法直接连接 {{name}}。改为发送到对方的消息箱吗?',
2297
- direct_pay_failed_offline: '{{name}} 目前不在线。未花费任何款项。请在设置中连接消息箱,以便向离线的人付款。',
2301
+ direct_pay_fallback_too_large:
2302
+ '这笔付款太大,无法实时发送(超过 1 MB)。改为发送到 {{name}} 的消息箱吗?目前尚未花费任何资金。',
2303
+ direct_pay_failed_offline:
2304
+ '{{name}} 目前没有接收实时付款。未花费任何款项。请在设置中连接消息箱,以便照常向对方付款。',
2298
2305
  direct_pay_failed_link: '无法直接连接 {{name}}。未花费任何款项。',
2299
2306
  direct_pay_failed_network: '无法连接支付网络,请检查网络连接。',
2300
2307
  direct_pay_failed_wrong_network: '{{name}} 在另一个网络上。未花费任何款项。',
@@ -2302,7 +2309,7 @@ const resources = {
2302
2309
  direct_pay_failed_maybe_sent: '你向 {{name}} 的付款可能已经发出。再次付款前,请先查看“活动”。',
2303
2310
  direct_pay_failed_not_sent: '无法发送付款。未花费任何款项。',
2304
2311
  direct_pay_failed_no_message_box: '请在设置中连接消息箱,以便向钱包身份付款。',
2305
- direct_pay_fallback_title: '对方当前不在线',
2312
+ direct_pay_fallback_title: '暂时无法实时付款',
2306
2313
  direct_pay_fallback_send: '发送到消息箱',
2307
2314
  direct_pay_fallback_host: '对方的消息箱:{{host}}',
2308
2315
  direct_pay_sent_live: '已实时付款:款项已到对方钱包。',
@@ -3412,24 +3419,27 @@ const resources = {
3412
3419
  pay_sent_to: '{{name}} को',
3413
3420
  pay_save_as_contact: 'संपर्क के रूप में सहेजें',
3414
3421
  direct_pay_status_on_title: 'लाइव भुगतान के लिए खुला',
3415
- direct_pay_status_on_relay: 'यह ऐप खुला होने पर लोग आपको सीधे भुगतान कर सकते हैं। रिले के ज़रिए जुड़ा है।',
3422
+ direct_pay_status_on_relay: 'यह स्क्रीन खुली होने पर लोग आपको सीधे भुगतान कर सकते हैं। रिले के ज़रिए जुड़ा है।',
3416
3423
  direct_pay_status_on_messagebox:
3417
- 'यह ऐप खुला होने पर लोग आपको सीधे भुगतान कर सकते हैं। मैसेज बॉक्स के ज़रिए जुड़ा है।',
3424
+ 'यह स्क्रीन खुली होने पर लोग आपको सीधे भुगतान कर सकते हैं। मैसेज बॉक्स के ज़रिए जुड़ा है।',
3418
3425
  direct_pay_status_on_fallback:
3419
- 'यह ऐप खुला होने पर लोग आपको सीधे भुगतान कर सकते हैं। मैसेज बॉक्स के ज़रिए जुड़ा है (रिले तक पहुँच नहीं हो पा रही)।',
3426
+ 'यह स्क्रीन खुली होने पर लोग आपको सीधे भुगतान कर सकते हैं। मैसेज बॉक्स के ज़रिए जुड़ा है (रिले तक पहुँच नहीं हो पा रही)।',
3420
3427
  direct_pay_status_connecting_title: 'कनेक्ट हो रहा है…',
3421
3428
  direct_pay_status_connecting_body: 'लाइव भुगतान लेने की तैयारी हो रही है।',
3422
3429
  direct_pay_status_off_title: 'लाइव भुगतान बंद हैं',
3423
- direct_pay_status_off_body: 'इन्हें सेटिंग्स में चालू करें ताकि यह ऐप खुला होने पर लोग आपको सीधे भुगतान कर सकें।',
3430
+ direct_pay_status_off_body:
3431
+ 'इन्हें सेटिंग्स में चालू करें ताकि यह स्क्रीन खुली होने पर लोग आपको सीधे भुगतान कर सकें।',
3424
3432
  direct_pay_status_not_set_up_body:
3425
3433
  'लाइव भुगतान मैसेज बॉक्स के ज़रिए दूसरे वॉलेट तक पहुँचते हैं। सेटिंग्स में मैसेज बॉक्स जोड़ें, या रिले सर्वर इस्तेमाल करें।',
3426
3434
  direct_pay_status_error_title: 'लाइव भुगतान अभी काम नहीं कर रहे',
3427
3435
  direct_pay_status_error_body: 'अभी लाइव भुगतान प्राप्त नहीं किए जा सकते।',
3428
3436
  direct_pay_fallback_offline:
3429
- '{{name}} अभी ऑनलाइन नहीं हैं। इसे उनके मैसेज बॉक्स में भेजें? अगली बार वॉलेट खोलने पर उन्हें यह मिल जाएगा।',
3437
+ '{{name}} अभी लाइव भुगतान नहीं ले रहे हैं। इसके बजाय इसे उनके मैसेज बॉक्स में भेजें? अगली बार वॉलेट खोलने पर उन्हें यह मिल जाएगा।',
3430
3438
  direct_pay_fallback_link_failed: '{{name}} से सीधे कनेक्ट नहीं हो सका। इसके बजाय उनके मैसेज बॉक्स में भेजें?',
3439
+ direct_pay_fallback_too_large:
3440
+ 'यह भुगतान लाइव भेजने के लिए बहुत बड़ा है (1 MB से अधिक)। इसके बजाय {{name}} के मैसेज बॉक्स में भेजें? अभी तक कुछ भी खर्च नहीं हुआ है।',
3431
3441
  direct_pay_failed_offline:
3432
- '{{name}} अभी ऑनलाइन नहीं हैं। कुछ भी खर्च नहीं हुआ। ऑफ़लाइन लोगों को भुगतान करने के लिए सेटिंग्स में मैसेज बॉक्स जोड़ें।',
3442
+ '{{name}} अभी लाइव भुगतान नहीं ले रहे हैं। कुछ भी खर्च नहीं हुआ। फिर भी उन्हें भुगतान करने के लिए सेटिंग्स में मैसेज बॉक्स जोड़ें।',
3433
3443
  direct_pay_failed_link: '{{name}} से सीधे कनेक्ट नहीं हो सका। कुछ भी खर्च नहीं हुआ।',
3434
3444
  direct_pay_failed_network: 'भुगतान नेटवर्क तक नहीं पहुँच सके — अपना कनेक्शन जाँचें।',
3435
3445
  direct_pay_failed_wrong_network: '{{name}} किसी दूसरे नेटवर्क पर हैं। कुछ भी खर्च नहीं हुआ।',
@@ -3439,7 +3449,7 @@ const resources = {
3439
3449
  direct_pay_failed_not_sent: 'भुगतान भेजा नहीं जा सका। कुछ भी खर्च नहीं हुआ।',
3440
3450
  direct_pay_failed_no_message_box:
3441
3451
  'किसी वॉलेट आइडेंटिटी को भुगतान करने के लिए सेटिंग्स में अपना मैसेज बॉक्स जोड़ें।',
3442
- direct_pay_fallback_title: 'अभी ऑनलाइन नहीं',
3452
+ direct_pay_fallback_title: 'अभी लाइव भुगतान नहीं हो सकता',
3443
3453
  direct_pay_fallback_send: 'मैसेज बॉक्स में भेजें',
3444
3454
  direct_pay_fallback_host: 'उनका मैसेज बॉक्स: {{host}}',
3445
3455
  direct_pay_sent_live: 'लाइव भुगतान हो गया: यह पहले से उनके वॉलेट में है।',
@@ -4565,26 +4575,28 @@ const resources = {
4565
4575
  pay_save_as_contact: 'Guardar como contacto',
4566
4576
  direct_pay_status_on_title: 'Abierto a pagos en vivo',
4567
4577
  direct_pay_status_on_relay:
4568
- 'Las personas pueden pagarte directamente mientras esta app esté abierta. Conectado mediante relé.',
4578
+ 'Las personas pueden pagarte directamente mientras esta pantalla esté abierta. Conectado mediante relé.',
4569
4579
  direct_pay_status_on_messagebox:
4570
- 'Las personas pueden pagarte directamente mientras esta app esté abierta. Conectado mediante el buzón de mensajes.',
4580
+ 'Las personas pueden pagarte directamente mientras esta pantalla esté abierta. Conectado mediante el buzón de mensajes.',
4571
4581
  direct_pay_status_on_fallback:
4572
- 'Las personas pueden pagarte directamente mientras esta app esté abierta. Conectado mediante el buzón de mensajes (no se puede llegar al relé).',
4582
+ 'Las personas pueden pagarte directamente mientras esta pantalla esté abierta. Conectado mediante el buzón de mensajes (no se puede llegar al relé).',
4573
4583
  direct_pay_status_connecting_title: 'Conectando…',
4574
4584
  direct_pay_status_connecting_body: 'Preparándose para recibir pagos en vivo.',
4575
4585
  direct_pay_status_off_title: 'Los pagos en vivo están desactivados',
4576
4586
  direct_pay_status_off_body:
4577
- 'Actívalos en Ajustes para que las personas puedan pagarte directamente mientras esta app esté abierta.',
4587
+ 'Actívalos en Ajustes para que las personas puedan pagarte directamente mientras esta pantalla esté abierta.',
4578
4588
  direct_pay_status_not_set_up_body:
4579
4589
  'Los pagos en vivo llegan a otras billeteras a través del buzón de mensajes. Conecta un buzón de mensajes en Ajustes o usa un servidor de relé.',
4580
4590
  direct_pay_status_error_title: 'Los pagos en vivo no funcionan ahora mismo',
4581
4591
  direct_pay_status_error_body: 'Ahora mismo no se pueden recibir pagos en vivo.',
4582
4592
  direct_pay_fallback_offline:
4583
- '{{name}} no está en línea ahora. ¿Enviarlo a su buzón de mensajes? Lo recibirá la próxima vez que abra su billetera.',
4593
+ '{{name}} no está recibiendo pagos en vivo ahora. ¿Enviarlo a su buzón de mensajes? Lo recibirá la próxima vez que abra su billetera.',
4584
4594
  direct_pay_fallback_link_failed:
4585
4595
  'No se pudo conectar directamente con {{name}}. ¿Enviarlo a su buzón de mensajes?',
4596
+ direct_pay_fallback_too_large:
4597
+ 'Este pago es demasiado grande para enviarlo en vivo (más de 1 MB). ¿Enviarlo al buzón de mensajes de {{name}}? Todavía no se ha gastado nada.',
4586
4598
  direct_pay_failed_offline:
4587
- '{{name}} no está en línea ahora. No se gastó nada. Conecta un buzón de mensajes en Ajustes para pagar a personas sin conexión.',
4599
+ '{{name}} no está recibiendo pagos en vivo ahora. No se gastó nada. Conecta un buzón de mensajes en Ajustes para pagarle de todos modos.',
4588
4600
  direct_pay_failed_link: 'No se pudo conectar directamente con {{name}}. No se gastó nada.',
4589
4601
  direct_pay_failed_network: 'No se pudo llegar a la red de pagos. Revisa tu conexión.',
4590
4602
  direct_pay_failed_wrong_network: '{{name}} está en otra red. No se gastó nada.',
@@ -4594,7 +4606,7 @@ const resources = {
4594
4606
  direct_pay_failed_not_sent: 'No se pudo enviar el pago. No se gastó nada.',
4595
4607
  direct_pay_failed_no_message_box:
4596
4608
  'Conecta tu buzón de mensajes en Ajustes para pagar a una identidad de billetera.',
4597
- direct_pay_fallback_title: 'No está en línea ahora',
4609
+ direct_pay_fallback_title: 'No se puede pagar en vivo ahora',
4598
4610
  direct_pay_fallback_send: 'Enviar al buzón de mensajes',
4599
4611
  direct_pay_fallback_host: 'Su buzón de mensajes: {{host}}',
4600
4612
  direct_pay_sent_live: 'Pagado en vivo: ya está en su billetera.',
@@ -5736,26 +5748,28 @@ const resources = {
5736
5748
  pay_save_as_contact: 'Enregistrer comme contact',
5737
5749
  direct_pay_status_on_title: 'Ouvert aux paiements en direct',
5738
5750
  direct_pay_status_on_relay:
5739
- 'Les gens peuvent vous payer directement tant que cette app est ouverte. Connecté via le relais.',
5751
+ 'Les gens peuvent vous payer directement tant que cet écran est ouvert. Connecté via le relais.',
5740
5752
  direct_pay_status_on_messagebox:
5741
- 'Les gens peuvent vous payer directement tant que cette app est ouverte. Connecté via la boîte aux lettres.',
5753
+ 'Les gens peuvent vous payer directement tant que cet écran est ouvert. Connecté via la boîte aux lettres.',
5742
5754
  direct_pay_status_on_fallback:
5743
- 'Les gens peuvent vous payer directement tant que cette app est ouverte. Connecté via la boîte aux lettres (relais injoignable).',
5755
+ 'Les gens peuvent vous payer directement tant que cet écran est ouvert. Connecté via la boîte aux lettres (relais injoignable).',
5744
5756
  direct_pay_status_connecting_title: 'Connexion…',
5745
5757
  direct_pay_status_connecting_body: 'Préparation à la réception de paiements en direct.',
5746
5758
  direct_pay_status_off_title: 'Les paiements en direct sont désactivés',
5747
5759
  direct_pay_status_off_body:
5748
- 'Activez-les dans les réglages pour que les gens puissent vous payer directement tant que cette app est ouverte.',
5760
+ 'Activez-les dans les réglages pour que les gens puissent vous payer directement tant que cet écran est ouvert.',
5749
5761
  direct_pay_status_not_set_up_body:
5750
5762
  'Les paiements en direct atteignent les autres portefeuilles via la boîte aux lettres. Connectez une boîte aux lettres dans les réglages, ou utilisez un serveur relais.',
5751
5763
  direct_pay_status_error_title: 'Les paiements en direct ne fonctionnent pas pour le moment',
5752
5764
  direct_pay_status_error_body: 'Impossible de recevoir des paiements en direct pour le moment.',
5753
5765
  direct_pay_fallback_offline:
5754
- "{{name}} n'est pas en ligne pour le moment. L'envoyer dans sa boîte aux lettres ? Le paiement lui parviendra à la prochaine ouverture de son portefeuille.",
5766
+ "{{name}} n'accepte pas de paiements en direct pour le moment. L'envoyer plutôt dans sa boîte aux lettres ? Le paiement lui parviendra à la prochaine ouverture de son portefeuille.",
5755
5767
  direct_pay_fallback_link_failed:
5756
5768
  "Impossible de se connecter directement à {{name}}. L'envoyer plutôt dans sa boîte aux lettres ?",
5769
+ direct_pay_fallback_too_large:
5770
+ "Ce paiement est trop volumineux pour être envoyé en direct (plus de 1 Mo). L'envoyer plutôt dans la boîte aux lettres de {{name}} ? Rien n'a encore été dépensé.",
5757
5771
  direct_pay_failed_offline:
5758
- "{{name}} n'est pas en ligne pour le moment. Rien n'a été dépensé. Connectez une boîte aux lettres dans les réglages pour payer les personnes hors ligne.",
5772
+ "{{name}} n'accepte pas de paiements en direct pour le moment. Rien n'a été dépensé. Connectez une boîte aux lettres dans les réglages pour le payer quand même.",
5759
5773
  direct_pay_failed_link: "Impossible de se connecter directement à {{name}}. Rien n'a été dépensé.",
5760
5774
  direct_pay_failed_network: 'Impossible de joindre le réseau de paiement — vérifiez votre connexion.',
5761
5775
  direct_pay_failed_wrong_network: "{{name}} est sur un autre réseau. Rien n'a été dépensé.",
@@ -5765,7 +5779,7 @@ const resources = {
5765
5779
  direct_pay_failed_not_sent: "Le paiement n'a pas pu être envoyé. Rien n'a été dépensé.",
5766
5780
  direct_pay_failed_no_message_box:
5767
5781
  'Connectez votre boîte aux lettres dans les réglages pour payer une identité de portefeuille.',
5768
- direct_pay_fallback_title: 'Pas en ligne pour le moment',
5782
+ direct_pay_fallback_title: 'Paiement en direct impossible pour le moment',
5769
5783
  direct_pay_fallback_send: 'Envoyer à la boîte aux lettres',
5770
5784
  direct_pay_fallback_host: 'Sa boîte aux lettres : {{host}}',
5771
5785
  direct_pay_sent_live: "Payé en direct : c'est déjà dans son portefeuille.",
@@ -6831,25 +6845,27 @@ const resources = {
6831
6845
  pay_sent_to: 'إلى {{name}}',
6832
6846
  pay_save_as_contact: 'حفظ كجهة اتصال',
6833
6847
  direct_pay_status_on_title: 'متاح للمدفوعات المباشرة',
6834
- direct_pay_status_on_relay: 'يمكن للآخرين الدفع لك مباشرة طالما أن هذا التطبيق مفتوح. متصل عبر المرحّل.',
6848
+ direct_pay_status_on_relay: 'يمكن للآخرين الدفع لك مباشرة طالما أن هذه الشاشة مفتوحة. متصل عبر المرحّل.',
6835
6849
  direct_pay_status_on_messagebox:
6836
- 'يمكن للآخرين الدفع لك مباشرة طالما أن هذا التطبيق مفتوح. متصل عبر صندوق الرسائل.',
6850
+ 'يمكن للآخرين الدفع لك مباشرة طالما أن هذه الشاشة مفتوحة. متصل عبر صندوق الرسائل.',
6837
6851
  direct_pay_status_on_fallback:
6838
- 'يمكن للآخرين الدفع لك مباشرة طالما أن هذا التطبيق مفتوح. متصل عبر صندوق الرسائل (تعذّر الوصول إلى المرحّل).',
6852
+ 'يمكن للآخرين الدفع لك مباشرة طالما أن هذه الشاشة مفتوحة. متصل عبر صندوق الرسائل (تعذّر الوصول إلى المرحّل).',
6839
6853
  direct_pay_status_connecting_title: 'جارٍ الاتصال…',
6840
6854
  direct_pay_status_connecting_body: 'جارٍ التحضير لاستقبال المدفوعات المباشرة.',
6841
6855
  direct_pay_status_off_title: 'المدفوعات المباشرة متوقفة',
6842
- direct_pay_status_off_body: 'فعّلها من الإعدادات ليتمكن الآخرون من الدفع لك مباشرة طالما أن هذا التطبيق مفتوح.',
6856
+ direct_pay_status_off_body: 'فعّلها من الإعدادات ليتمكن الآخرون من الدفع لك مباشرة طالما أن هذه الشاشة مفتوحة.',
6843
6857
  direct_pay_status_not_set_up_body:
6844
6858
  'تصل المدفوعات المباشرة إلى المحافظ الأخرى عبر صندوق الرسائل. اربط صندوق رسائل من الإعدادات، أو استخدم خادم مرحّل.',
6845
6859
  direct_pay_status_error_title: 'المدفوعات المباشرة لا تعمل حاليًا',
6846
6860
  direct_pay_status_error_body: 'تعذّر استقبال المدفوعات المباشرة حاليًا.',
6847
6861
  direct_pay_fallback_offline:
6848
- '{{name}} غير متصل بالإنترنت الآن. هل تريد إرسالها إلى صندوق رسائله؟ سيستلمها عند فتح محفظته في المرة القادمة.',
6862
+ '{{name}} لا يستقبل المدفوعات المباشرة الآن. هل تريد إرسالها إلى صندوق رسائله بدلًا من ذلك؟ سيستلمها عند فتح محفظته في المرة القادمة.',
6849
6863
  direct_pay_fallback_link_failed:
6850
6864
  'تعذّر الاتصال مباشرة بـ {{name}}. هل تريد إرسالها إلى صندوق رسائله بدلًا من ذلك؟',
6865
+ direct_pay_fallback_too_large:
6866
+ 'هذه الدفعة أكبر من أن تُرسل مباشرة (أكثر من 1 ميغابايت). هل تريد إرسالها إلى صندوق رسائل {{name}} بدلًا من ذلك؟ لم يُنفق أي شيء بعد.',
6851
6867
  direct_pay_failed_offline:
6852
- '{{name}} غير متصل بالإنترنت الآن. لم يتم إنفاق أي مبلغ. اربط صندوق رسائل من الإعدادات للدفع لمن هم غير متصلين.',
6868
+ '{{name}} لا يستقبل المدفوعات المباشرة الآن. لم يتم إنفاق أي مبلغ. اربط صندوق رسائل من الإعدادات للدفع له على أي حال.',
6853
6869
  direct_pay_failed_link: 'تعذّر الاتصال مباشرة بـ {{name}}. لم يتم إنفاق أي مبلغ.',
6854
6870
  direct_pay_failed_network: 'تعذّر الوصول إلى شبكة الدفع — تحقق من اتصالك.',
6855
6871
  direct_pay_failed_wrong_network: '{{name}} على شبكة مختلفة. لم يتم إنفاق أي مبلغ.',
@@ -6857,7 +6873,7 @@ const resources = {
6857
6873
  direct_pay_failed_maybe_sent: 'ربما تم إرسال دفعتك إلى {{name}} بالفعل. تحقق من النشاط قبل الدفع مرة أخرى.',
6858
6874
  direct_pay_failed_not_sent: 'تعذّر إرسال الدفعة. لم يتم إنفاق أي مبلغ.',
6859
6875
  direct_pay_failed_no_message_box: 'اربط صندوق رسائلك من الإعدادات للدفع إلى هوية محفظة.',
6860
- direct_pay_fallback_title: 'غير متصل الآن',
6876
+ direct_pay_fallback_title: 'لا يمكن الدفع المباشر الآن',
6861
6877
  direct_pay_fallback_send: 'أرسل إلى صندوق الرسائل',
6862
6878
  direct_pay_fallback_host: 'صندوق رسائله: {{host}}',
6863
6879
  direct_pay_sent_live: 'تم الدفع مباشرة: المبلغ في محفظته بالفعل.',
@@ -7982,26 +7998,28 @@ const resources = {
7982
7998
  pay_save_as_contact: 'Salvar como contato',
7983
7999
  direct_pay_status_on_title: 'Aberto a pagamentos ao vivo',
7984
8000
  direct_pay_status_on_relay:
7985
- 'As pessoas podem pagar você diretamente enquanto este app estiver aberto. Conectado pelo relé.',
8001
+ 'As pessoas podem pagar você diretamente enquanto esta tela estiver aberta. Conectado pelo relé.',
7986
8002
  direct_pay_status_on_messagebox:
7987
- 'As pessoas podem pagar você diretamente enquanto este app estiver aberto. Conectado pela caixa de mensagens.',
8003
+ 'As pessoas podem pagar você diretamente enquanto esta tela estiver aberta. Conectado pela caixa de mensagens.',
7988
8004
  direct_pay_status_on_fallback:
7989
- 'As pessoas podem pagar você diretamente enquanto este app estiver aberto. Conectado pela caixa de mensagens (relé inacessível).',
8005
+ 'As pessoas podem pagar você diretamente enquanto esta tela estiver aberta. Conectado pela caixa de mensagens (relé inacessível).',
7990
8006
  direct_pay_status_connecting_title: 'Conectando…',
7991
8007
  direct_pay_status_connecting_body: 'Preparando para receber pagamentos ao vivo.',
7992
8008
  direct_pay_status_off_title: 'Os pagamentos ao vivo estão desativados',
7993
8009
  direct_pay_status_off_body:
7994
- 'Ative-os em Configurações para que as pessoas possam pagar você diretamente enquanto este app estiver aberto.',
8010
+ 'Ative-os em Configurações para que as pessoas possam pagar você diretamente enquanto esta tela estiver aberta.',
7995
8011
  direct_pay_status_not_set_up_body:
7996
8012
  'Os pagamentos ao vivo chegam a outras carteiras pela caixa de mensagens. Conecte uma caixa de mensagens em Configurações ou use um servidor de relé.',
7997
8013
  direct_pay_status_error_title: 'Os pagamentos ao vivo não estão funcionando agora',
7998
8014
  direct_pay_status_error_body: 'Não é possível receber pagamentos ao vivo agora.',
7999
8015
  direct_pay_fallback_offline:
8000
- '{{name}} não está online agora. Enviar para a caixa de mensagens da pessoa? O pagamento chegará quando ela abrir a carteira da próxima vez.',
8016
+ '{{name}} não está recebendo pagamentos ao vivo agora. Enviar para a caixa de mensagens da pessoa? O pagamento chegará quando ela abrir a carteira da próxima vez.',
8001
8017
  direct_pay_fallback_link_failed:
8002
8018
  'Não foi possível conectar diretamente com {{name}}. Enviar para a caixa de mensagens da pessoa?',
8019
+ direct_pay_fallback_too_large:
8020
+ 'Este pagamento é grande demais para ser enviado ao vivo (mais de 1 MB). Enviar para a caixa de mensagens de {{name}}? Nada foi gasto ainda.',
8003
8021
  direct_pay_failed_offline:
8004
- '{{name}} não está online agora. Nada foi gasto. Conecte uma caixa de mensagens em Configurações para pagar pessoas que estão offline.',
8022
+ '{{name}} não está recebendo pagamentos ao vivo agora. Nada foi gasto. Conecte uma caixa de mensagens em Configurações para pagar mesmo assim.',
8005
8023
  direct_pay_failed_link: 'Não foi possível conectar diretamente com {{name}}. Nada foi gasto.',
8006
8024
  direct_pay_failed_network: 'Não foi possível alcançar a rede de pagamentos — verifique sua conexão.',
8007
8025
  direct_pay_failed_wrong_network: '{{name}} está em outra rede. Nada foi gasto.',
@@ -8011,7 +8029,7 @@ const resources = {
8011
8029
  direct_pay_failed_not_sent: 'Não foi possível enviar o pagamento. Nada foi gasto.',
8012
8030
  direct_pay_failed_no_message_box:
8013
8031
  'Conecte sua caixa de mensagens em Configurações para pagar uma identidade de carteira.',
8014
- direct_pay_fallback_title: 'Não está online agora',
8032
+ direct_pay_fallback_title: 'Não é possível pagar ao vivo agora',
8015
8033
  direct_pay_fallback_send: 'Enviar para a caixa de mensagens',
8016
8034
  direct_pay_fallback_host: 'Caixa de mensagens da pessoa: {{host}}',
8017
8035
  direct_pay_sent_live: 'Pago ao vivo: já está na carteira da pessoa.',
@@ -9115,25 +9133,28 @@ const resources = {
9115
9133
  pay_sent_to: '{{name}}-কে',
9116
9134
  pay_save_as_contact: 'পরিচিতি হিসেবে সংরক্ষণ করুন',
9117
9135
  direct_pay_status_on_title: 'লাইভ পেমেন্টের জন্য প্রস্তুত',
9118
- direct_pay_status_on_relay: 'এই অ্যাপ খোলা থাকলে মানুষ আপনাকে সরাসরি পেমেন্ট করতে পারবে। রিলের মাধ্যমে সংযুক্ত।',
9136
+ direct_pay_status_on_relay:
9137
+ 'এই স্ক্রিন খোলা থাকলে মানুষ আপনাকে সরাসরি পেমেন্ট করতে পারবে। রিলের মাধ্যমে সংযুক্ত।',
9119
9138
  direct_pay_status_on_messagebox:
9120
- 'এই অ্যাপ খোলা থাকলে মানুষ আপনাকে সরাসরি পেমেন্ট করতে পারবে। মেসেজ বক্সের মাধ্যমে সংযুক্ত।',
9139
+ 'এই স্ক্রিন খোলা থাকলে মানুষ আপনাকে সরাসরি পেমেন্ট করতে পারবে। মেসেজ বক্সের মাধ্যমে সংযুক্ত।',
9121
9140
  direct_pay_status_on_fallback:
9122
- 'এই অ্যাপ খোলা থাকলে মানুষ আপনাকে সরাসরি পেমেন্ট করতে পারবে। মেসেজ বক্সের মাধ্যমে সংযুক্ত (রিলেতে পৌঁছানো যাচ্ছে না)।',
9141
+ 'এই স্ক্রিন খোলা থাকলে মানুষ আপনাকে সরাসরি পেমেন্ট করতে পারবে। মেসেজ বক্সের মাধ্যমে সংযুক্ত (রিলেতে পৌঁছানো যাচ্ছে না)।',
9123
9142
  direct_pay_status_connecting_title: 'সংযুক্ত হচ্ছে…',
9124
9143
  direct_pay_status_connecting_body: 'লাইভ পেমেন্ট নেওয়ার জন্য প্রস্তুত হচ্ছে।',
9125
9144
  direct_pay_status_off_title: 'লাইভ পেমেন্ট বন্ধ আছে',
9126
9145
  direct_pay_status_off_body:
9127
- 'সেটিংসে এগুলো চালু করুন, যাতে এই অ্যাপ খোলা থাকলে মানুষ আপনাকে সরাসরি পেমেন্ট করতে পারে।',
9146
+ 'সেটিংসে এগুলো চালু করুন, যাতে এই স্ক্রিন খোলা থাকলে মানুষ আপনাকে সরাসরি পেমেন্ট করতে পারে।',
9128
9147
  direct_pay_status_not_set_up_body:
9129
9148
  'লাইভ পেমেন্ট মেসেজ বক্সের মাধ্যমে অন্য ওয়ালেটে পৌঁছায়। সেটিংসে একটি মেসেজ বক্স যুক্ত করুন, অথবা রিলে সার্ভার ব্যবহার করুন।',
9130
9149
  direct_pay_status_error_title: 'লাইভ পেমেন্ট এখন কাজ করছে না',
9131
9150
  direct_pay_status_error_body: 'এই মুহূর্তে লাইভ পেমেন্ট গ্রহণ করা যাচ্ছে না।',
9132
9151
  direct_pay_fallback_offline:
9133
- '{{name}} এখন অনলাইনে নেই। এটি তাদের মেসেজ বক্সে পাঠাবেন? পরের বার ওয়ালেট খুললে তারা এটি পাবেন।',
9152
+ '{{name}} এখন লাইভ পেমেন্ট নিচ্ছেন না। এর বদলে তাদের মেসেজ বক্সে পাঠাবেন? পরের বার ওয়ালেট খুললে তারা এটি পাবেন।',
9134
9153
  direct_pay_fallback_link_failed: '{{name}}-এর সাথে সরাসরি সংযোগ করা যায়নি। তার বদলে তাদের মেসেজ বক্সে পাঠাবেন?',
9154
+ direct_pay_fallback_too_large:
9155
+ 'এই পেমেন্টটি লাইভ পাঠানোর জন্য খুব বড় (1 MB-এর বেশি)। তার বদলে {{name}}-এর মেসেজ বক্সে পাঠাবেন? এখনও কিছু খরচ হয়নি।',
9135
9156
  direct_pay_failed_offline:
9136
- '{{name}} এখন অনলাইনে নেই। কিছুই খরচ হয়নি। অফলাইন মানুষদের পেমেন্ট করতে সেটিংসে একটি মেসেজ বক্স যুক্ত করুন।',
9157
+ '{{name}} এখন লাইভ পেমেন্ট নিচ্ছেন না। কিছুই খরচ হয়নি। তবুও পেমেন্ট করতে সেটিংসে একটি মেসেজ বক্স যুক্ত করুন।',
9137
9158
  direct_pay_failed_link: '{{name}}-এর সাথে সরাসরি সংযোগ করা যায়নি। কিছুই খরচ হয়নি।',
9138
9159
  direct_pay_failed_network: 'পেমেন্ট নেটওয়ার্কে পৌঁছানো যায়নি — আপনার সংযোগ পরীক্ষা করুন।',
9139
9160
  direct_pay_failed_wrong_network: '{{name}} অন্য একটি নেটওয়ার্কে আছেন। কিছুই খরচ হয়নি।',
@@ -9142,7 +9163,7 @@ const resources = {
9142
9163
  '{{name}}-এর কাছে আপনার পেমেন্ট হয়তো ইতিমধ্যে পাঠানো হয়ে গেছে। আবার পেমেন্ট করার আগে কার্যকলাপ দেখুন।',
9143
9164
  direct_pay_failed_not_sent: 'পেমেন্ট পাঠানো যায়নি। কিছুই খরচ হয়নি।',
9144
9165
  direct_pay_failed_no_message_box: 'ওয়ালেট আইডেন্টিটিকে পেমেন্ট করতে সেটিংসে আপনার মেসেজ বক্স যুক্ত করুন।',
9145
- direct_pay_fallback_title: 'এখন অনলাইনে নেই',
9166
+ direct_pay_fallback_title: 'এখন লাইভ পেমেন্ট করা যাচ্ছে না',
9146
9167
  direct_pay_fallback_send: 'মেসেজ বক্সে পাঠান',
9147
9168
  direct_pay_fallback_host: 'তাদের মেসেজ বক্স: {{host}}',
9148
9169
  direct_pay_sent_live: 'সরাসরি পেমেন্ট হয়েছে: এটি ইতিমধ্যে তাদের ওয়ালেটে আছে।',
@@ -10264,26 +10285,28 @@ const resources = {
10264
10285
  pay_save_as_contact: 'Сохранить как контакт',
10265
10286
  direct_pay_status_on_title: 'Открыт для платежей в реальном времени',
10266
10287
  direct_pay_status_on_relay:
10267
- 'Пока это приложение открыто, люди могут платить вам напрямую. Подключено через ретранслятор.',
10288
+ 'Пока этот экран открыт, люди могут платить вам напрямую. Подключено через ретранслятор.',
10268
10289
  direct_pay_status_on_messagebox:
10269
- 'Пока это приложение открыто, люди могут платить вам напрямую. Подключено через почтовый ящик.',
10290
+ 'Пока этот экран открыт, люди могут платить вам напрямую. Подключено через почтовый ящик.',
10270
10291
  direct_pay_status_on_fallback:
10271
- 'Пока это приложение открыто, люди могут платить вам напрямую. Подключено через почтовый ящик (ретранслятор недоступен).',
10292
+ 'Пока этот экран открыт, люди могут платить вам напрямую. Подключено через почтовый ящик (ретранслятор недоступен).',
10272
10293
  direct_pay_status_connecting_title: 'Подключение…',
10273
10294
  direct_pay_status_connecting_body: 'Подготовка к приёму платежей в реальном времени.',
10274
10295
  direct_pay_status_off_title: 'Платежи в реальном времени отключены',
10275
10296
  direct_pay_status_off_body:
10276
- 'Включите их в настройках, чтобы люди могли платить вам напрямую, пока приложение открыто.',
10297
+ 'Включите их в настройках, чтобы люди могли платить вам напрямую, пока этот экран открыт.',
10277
10298
  direct_pay_status_not_set_up_body:
10278
10299
  'Платежи в реальном времени доходят до других кошельков через почтовый ящик. Подключите почтовый ящик в настройках или используйте сервер-ретранслятор.',
10279
10300
  direct_pay_status_error_title: 'Платежи в реальном времени сейчас не работают',
10280
10301
  direct_pay_status_error_body: 'Сейчас невозможно принимать платежи в реальном времени.',
10281
10302
  direct_pay_fallback_offline:
10282
- '{{name}} сейчас не в сети. Отправить в почтовый ящик получателя? Платёж придёт, когда получатель в следующий раз откроет кошелёк.',
10303
+ '{{name}} сейчас не принимает прямые платежи. Отправить в почтовый ящик получателя? Платёж придёт, когда получатель в следующий раз откроет кошелёк.',
10283
10304
  direct_pay_fallback_link_failed:
10284
10305
  'Не удалось напрямую подключиться к {{name}}. Отправить в почтовый ящик получателя?',
10306
+ direct_pay_fallback_too_large:
10307
+ 'Этот платёж слишком велик для отправки напрямую (больше 1 МБ). Отправить в почтовый ящик {{name}}? Пока ничего не потрачено.',
10285
10308
  direct_pay_failed_offline:
10286
- '{{name}} сейчас не в сети. Ничего не потрачено. Подключите почтовый ящик в настройках, чтобы платить тем, кто не в сети.',
10309
+ '{{name}} сейчас не принимает прямые платежи. Ничего не потрачено. Подключите почтовый ящик в настройках, чтобы всё равно заплатить.',
10287
10310
  direct_pay_failed_link: 'Не удалось напрямую подключиться к {{name}}. Ничего не потрачено.',
10288
10311
  direct_pay_failed_network: 'Не удалось связаться с платёжной сетью — проверьте подключение.',
10289
10312
  direct_pay_failed_wrong_network: '{{name}} находится в другой сети. Ничего не потрачено.',
@@ -10293,7 +10316,7 @@ const resources = {
10293
10316
  direct_pay_failed_not_sent: 'Не удалось отправить платёж. Ничего не потрачено.',
10294
10317
  direct_pay_failed_no_message_box:
10295
10318
  'Подключите почтовый ящик в настройках, чтобы платить по идентификатору кошелька.',
10296
- direct_pay_fallback_title: 'Сейчас не в сети',
10319
+ direct_pay_fallback_title: 'Сейчас нельзя заплатить напрямую',
10297
10320
  direct_pay_fallback_send: 'Отправить в почтовый ящик',
10298
10321
  direct_pay_fallback_host: 'Почтовый ящик получателя: {{host}}',
10299
10322
  direct_pay_sent_live: 'Оплачено напрямую: деньги уже в кошельке получателя.',
@@ -11414,25 +11437,27 @@ const resources = {
11414
11437
  pay_save_as_contact: 'Simpan sebagai kontak',
11415
11438
  direct_pay_status_on_title: 'Terbuka untuk pembayaran langsung',
11416
11439
  direct_pay_status_on_relay:
11417
- 'Orang dapat membayar Anda secara langsung selama aplikasi ini terbuka. Terhubung melalui relai.',
11440
+ 'Orang dapat membayar Anda secara langsung selama layar ini terbuka. Terhubung melalui relai.',
11418
11441
  direct_pay_status_on_messagebox:
11419
- 'Orang dapat membayar Anda secara langsung selama aplikasi ini terbuka. Terhubung melalui kotak pesan.',
11442
+ 'Orang dapat membayar Anda secara langsung selama layar ini terbuka. Terhubung melalui kotak pesan.',
11420
11443
  direct_pay_status_on_fallback:
11421
- 'Orang dapat membayar Anda secara langsung selama aplikasi ini terbuka. Terhubung melalui kotak pesan (relai tidak dapat dijangkau).',
11444
+ 'Orang dapat membayar Anda secara langsung selama layar ini terbuka. Terhubung melalui kotak pesan (relai tidak dapat dijangkau).',
11422
11445
  direct_pay_status_connecting_title: 'Menghubungkan…',
11423
11446
  direct_pay_status_connecting_body: 'Bersiap menerima pembayaran langsung.',
11424
11447
  direct_pay_status_off_title: 'Pembayaran langsung nonaktif',
11425
11448
  direct_pay_status_off_body:
11426
- 'Aktifkan di Pengaturan agar orang dapat membayar Anda secara langsung selama aplikasi ini terbuka.',
11449
+ 'Aktifkan di Pengaturan agar orang dapat membayar Anda secara langsung selama layar ini terbuka.',
11427
11450
  direct_pay_status_not_set_up_body:
11428
11451
  'Pembayaran langsung sampai ke dompet lain melalui kotak pesan. Hubungkan kotak pesan di Pengaturan, atau gunakan server relai.',
11429
11452
  direct_pay_status_error_title: 'Pembayaran langsung sedang tidak berfungsi',
11430
11453
  direct_pay_status_error_body: 'Pembayaran langsung tidak dapat diterima saat ini.',
11431
11454
  direct_pay_fallback_offline:
11432
- '{{name}} sedang tidak online. Kirim ke kotak pesannya? Pembayaran akan diterima saat dompetnya dibuka lagi.',
11455
+ '{{name}} sedang tidak menerima pembayaran langsung. Kirim ke kotak pesannya saja? Pembayaran akan diterima saat dompetnya dibuka lagi.',
11433
11456
  direct_pay_fallback_link_failed: 'Tidak dapat terhubung langsung ke {{name}}. Kirim ke kotak pesannya saja?',
11457
+ direct_pay_fallback_too_large:
11458
+ 'Pembayaran ini terlalu besar untuk dikirim langsung (lebih dari 1 MB). Kirim ke kotak pesan {{name}} saja? Belum ada yang dibelanjakan.',
11434
11459
  direct_pay_failed_offline:
11435
- '{{name}} sedang tidak online. Tidak ada dana yang terpakai. Hubungkan kotak pesan di Pengaturan untuk membayar orang yang sedang offline.',
11460
+ '{{name}} sedang tidak menerima pembayaran langsung. Tidak ada dana yang terpakai. Hubungkan kotak pesan di Pengaturan untuk tetap membayarnya.',
11436
11461
  direct_pay_failed_link: 'Tidak dapat terhubung langsung ke {{name}}. Tidak ada dana yang terpakai.',
11437
11462
  direct_pay_failed_network: 'Tidak dapat menjangkau jaringan pembayaran — periksa koneksi Anda.',
11438
11463
  direct_pay_failed_wrong_network: '{{name}} berada di jaringan lain. Tidak ada dana yang terpakai.',
@@ -11441,7 +11466,7 @@ const resources = {
11441
11466
  'Pembayaran Anda ke {{name}} mungkin sudah terkirim. Periksa Aktivitas sebelum membayar lagi.',
11442
11467
  direct_pay_failed_not_sent: 'Pembayaran tidak dapat dikirim. Tidak ada dana yang terpakai.',
11443
11468
  direct_pay_failed_no_message_box: 'Hubungkan kotak pesan Anda di Pengaturan untuk membayar identitas dompet.',
11444
- direct_pay_fallback_title: 'Sedang tidak online',
11469
+ direct_pay_fallback_title: 'Tidak bisa membayar langsung sekarang',
11445
11470
  direct_pay_fallback_send: 'Kirim ke kotak pesan',
11446
11471
  direct_pay_fallback_host: 'Kotak pesannya: {{host}}',
11447
11472
  direct_pay_sent_live: 'Dibayar langsung: sudah masuk ke dompet mereka.',
@@ -12565,25 +12590,27 @@ const resources = {
12565
12590
  pay_sent_to: '{{name}} へ',
12566
12591
  pay_save_as_contact: '連絡先として保存',
12567
12592
  direct_pay_status_on_title: 'ライブ決済を受け付け中',
12568
- direct_pay_status_on_relay: 'このアプリを開いている間、相手があなたに直接支払えます。リレー経由で接続中です。',
12593
+ direct_pay_status_on_relay: 'この画面を開いている間、相手があなたに直接支払えます。リレー経由で接続中です。',
12569
12594
  direct_pay_status_on_messagebox:
12570
- 'このアプリを開いている間、相手があなたに直接支払えます。メッセージボックス経由で接続中です。',
12595
+ 'この画面を開いている間、相手があなたに直接支払えます。メッセージボックス経由で接続中です。',
12571
12596
  direct_pay_status_on_fallback:
12572
- 'このアプリを開いている間、相手があなたに直接支払えます。メッセージボックス経由で接続中です(リレーに接続できません)。',
12597
+ 'この画面を開いている間、相手があなたに直接支払えます。メッセージボックス経由で接続中です(リレーに接続できません)。',
12573
12598
  direct_pay_status_connecting_title: '接続中…',
12574
12599
  direct_pay_status_connecting_body: 'ライブ決済を受け取る準備をしています。',
12575
12600
  direct_pay_status_off_title: 'ライブ決済はオフです',
12576
- direct_pay_status_off_body: '設定でオンにすると、このアプリを開いている間、相手があなたに直接支払えます。',
12601
+ direct_pay_status_off_body: '設定でオンにすると、この画面を開いている間、相手があなたに直接支払えます。',
12577
12602
  direct_pay_status_not_set_up_body:
12578
12603
  'ライブ決済はメッセージボックスを通じて他のウォレットに届きます。設定でメッセージボックスを接続するか、リレーサーバーを使用してください。',
12579
12604
  direct_pay_status_error_title: '現在ライブ決済を利用できません',
12580
12605
  direct_pay_status_error_body: '現在、ライブ決済を受け取れません。',
12581
12606
  direct_pay_fallback_offline:
12582
- '{{name}}は現在オンラインではありません。相手のメッセージボックスに送りますか?次にウォレットを開いたときに受け取れます。',
12607
+ '{{name}}は現在ライブ支払いを受け付けていません。代わりに相手のメッセージボックスに送りますか?次にウォレットを開いたときに受け取れます。',
12583
12608
  direct_pay_fallback_link_failed:
12584
12609
  '{{name}}に直接接続できませんでした。代わりに相手のメッセージボックスに送りますか?',
12610
+ direct_pay_fallback_too_large:
12611
+ 'この支払いは大きすぎるため、ライブでは送れません(1 MB超)。代わりに{{name}}のメッセージボックスに送りますか?まだ何も支払われていません。',
12585
12612
  direct_pay_failed_offline:
12586
- '{{name}}は現在オンラインではありません。何も使われていません。オフラインの相手に支払うには、設定でメッセージボックスを接続してください。',
12613
+ '{{name}}は現在ライブ支払いを受け付けていません。何も使われていません。それでも支払うには、設定でメッセージボックスを接続してください。',
12587
12614
  direct_pay_failed_link: '{{name}}に直接接続できませんでした。何も使われていません。',
12588
12615
  direct_pay_failed_network: '支払いネットワークに接続できませんでした。接続を確認してください。',
12589
12616
  direct_pay_failed_wrong_network: '{{name}}は別のネットワークにいます。何も使われていません。',
@@ -12592,7 +12619,7 @@ const resources = {
12592
12619
  '{{name}}への支払いはすでに送信されている可能性があります。もう一度支払う前に、アクティビティを確認してください。',
12593
12620
  direct_pay_failed_not_sent: '支払いを送信できませんでした。何も使われていません。',
12594
12621
  direct_pay_failed_no_message_box: 'ウォレットIDに支払うには、設定でメッセージボックスを接続してください。',
12595
- direct_pay_fallback_title: '現在オンラインではありません',
12622
+ direct_pay_fallback_title: '現在ライブで支払えません',
12596
12623
  direct_pay_fallback_send: 'メッセージボックスに送る',
12597
12624
  direct_pay_fallback_host: '相手のメッセージボックス:{{host}}',
12598
12625
  direct_pay_sent_live: 'ライブで支払い済み:すでに相手のウォレットに入っています。',
@@ -13736,26 +13763,28 @@ const resources = {
13736
13763
  pay_save_as_contact: 'Zapisz jako kontakt',
13737
13764
  direct_pay_status_on_title: 'Otwarty na płatności na żywo',
13738
13765
  direct_pay_status_on_relay:
13739
- 'Gdy ta aplikacja jest otwarta, ludzie mogą płacić Ci bezpośrednio. Połączono przez przekaźnik.',
13766
+ 'Gdy ten ekran jest otwarty, ludzie mogą płacić Ci bezpośrednio. Połączono przez przekaźnik.',
13740
13767
  direct_pay_status_on_messagebox:
13741
- 'Gdy ta aplikacja jest otwarta, ludzie mogą płacić Ci bezpośrednio. Połączono przez skrzynkę wiadomości.',
13768
+ 'Gdy ten ekran jest otwarty, ludzie mogą płacić Ci bezpośrednio. Połączono przez skrzynkę wiadomości.',
13742
13769
  direct_pay_status_on_fallback:
13743
- 'Gdy ta aplikacja jest otwarta, ludzie mogą płacić Ci bezpośrednio. Połączono przez skrzynkę wiadomości (przekaźnik jest nieosiągalny).',
13770
+ 'Gdy ten ekran jest otwarty, ludzie mogą płacić Ci bezpośrednio. Połączono przez skrzynkę wiadomości (przekaźnik jest nieosiągalny).',
13744
13771
  direct_pay_status_connecting_title: 'Łączenie…',
13745
13772
  direct_pay_status_connecting_body: 'Przygotowywanie do odbierania płatności na żywo.',
13746
13773
  direct_pay_status_off_title: 'Płatności na żywo są wyłączone',
13747
13774
  direct_pay_status_off_body:
13748
- 'Włącz je w ustawieniach, aby ludzie mogli płacić Ci bezpośrednio, gdy ta aplikacja jest otwarta.',
13775
+ 'Włącz je w ustawieniach, aby ludzie mogli płacić Ci bezpośrednio, gdy ten ekran jest otwarty.',
13749
13776
  direct_pay_status_not_set_up_body:
13750
13777
  'Płatności na żywo docierają do innych portfeli przez skrzynkę wiadomości. Połącz skrzynkę wiadomości w ustawieniach lub użyj serwera przekaźnikowego.',
13751
13778
  direct_pay_status_error_title: 'Płatności na żywo chwilowo nie działają',
13752
13779
  direct_pay_status_error_body: 'W tej chwili nie można odbierać płatności na żywo.',
13753
13780
  direct_pay_fallback_offline:
13754
- '{{name}} jest teraz offline. Wysłać płatność do skrzynki wiadomości odbiorcy? Dotrze, gdy odbiorca następnym razem otworzy portfel.',
13781
+ '{{name}} nie przyjmuje teraz płatności na żywo. Wysłać płatność do skrzynki wiadomości odbiorcy? Dotrze, gdy odbiorca następnym razem otworzy portfel.',
13755
13782
  direct_pay_fallback_link_failed:
13756
13783
  'Nie udało się połączyć bezpośrednio z {{name}}. Wysłać zamiast tego do skrzynki wiadomości odbiorcy?',
13784
+ direct_pay_fallback_too_large:
13785
+ 'Ta płatność jest zbyt duża, by wysłać ją na żywo (ponad 1 MB). Wysłać ją zamiast tego do skrzynki wiadomości {{name}}? Nic jeszcze nie zostało wydane.',
13757
13786
  direct_pay_failed_offline:
13758
- '{{name}} jest teraz offline. Nic nie wydano. Połącz skrzynkę wiadomości w ustawieniach, aby płacić osobom offline.',
13787
+ '{{name}} nie przyjmuje teraz płatności na żywo. Nic nie wydano. Połącz skrzynkę wiadomości w ustawieniach, aby mimo to zapłacić.',
13759
13788
  direct_pay_failed_link: 'Nie udało się połączyć bezpośrednio z {{name}}. Nic nie wydano.',
13760
13789
  direct_pay_failed_network: 'Nie udało się połączyć z siecią płatności — sprawdź połączenie.',
13761
13790
  direct_pay_failed_wrong_network: '{{name}} jest w innej sieci. Nic nie wydano.',
@@ -13765,7 +13794,7 @@ const resources = {
13765
13794
  direct_pay_failed_not_sent: 'Nie udało się wysłać płatności. Nic nie wydano.',
13766
13795
  direct_pay_failed_no_message_box:
13767
13796
  'Połącz swoją skrzynkę wiadomości w ustawieniach, aby płacić tożsamości portfela.',
13768
- direct_pay_fallback_title: 'Teraz nie jest online',
13797
+ direct_pay_fallback_title: 'Nie można teraz zapłacić na żywo',
13769
13798
  direct_pay_fallback_send: 'Wyślij do skrzynki wiadomości',
13770
13799
  direct_pay_fallback_host: 'Skrzynka wiadomości odbiorcy: {{host}}',
13771
13800
  direct_pay_sent_live: 'Zapłacono na żywo: środki są już w jego portfelu.',
@@ -57,6 +57,7 @@ import { markOutboxSent, saveOutboxEntry, updateOutboxEntry } from '../../peerpa
57
57
  import { TaskDrainOutbox } from '../../monitor/TaskDrainOutbox'
58
58
  import { NotSentError } from '../../directpay/payFlow'
59
59
  import { dialFailure } from '../../directpay/dialFailure'
60
+ import { MAX_LIVE_TRANSACTION_BYTES } from '../../directpay/settings'
60
61
  import type { DirectPayClientLike, DirectPaymentAck, DirectPeer, WebRTPayModule } from '../../directpay/webrtpay'
61
62
 
62
63
  interface StorageLike {
@@ -246,10 +247,13 @@ function whyNotDeliverable(
246
247
  ): NotSentError | undefined {
247
248
  if (signal?.aborted) return new NotSentError('Cancelled', '', 'aborted')
248
249
  const bytes = token.transaction.length
249
- if (bytes > webrtpay.MAX_DIRECT_TRANSACTION_BYTES) {
250
+ // Live payments carry at most 1 MB (MAX_LIVE_TRANSACTION_BYTES), below the package's own cap.
251
+ const limit = Math.min(MAX_LIVE_TRANSACTION_BYTES, webrtpay.MAX_DIRECT_TRANSACTION_BYTES)
252
+ if (bytes > limit) {
250
253
  return new NotSentError(
251
254
  'This payment is too large to deliver directly',
252
- `${bytes} bytes; at most ${webrtpay.MAX_DIRECT_TRANSACTION_BYTES} can go over the link`
255
+ `${bytes} bytes; at most ${limit} can go over the link`,
256
+ 'too_large'
253
257
  )
254
258
  }
255
259
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsv/expo-wallet-toolbox",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "private": false,
5
5
  "description": "Wallet screens and P2P local-payment backend for Expo/React Native apps, extracted from BSV Wallet.",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -495,6 +495,12 @@ export default function HandleReceive({
495
495
  }, [identityKey, loadIdentityKey])
496
496
  )
497
497
 
498
+ // Live payments are answered only while this screen is focused, and only for BSV (a token
499
+ // always arrives by message box): the rest of the time payers use the message box.
500
+ const { openReceiveScreen } = directPay
501
+ const liveReceive = !asset
502
+ useFocusEffect(useCallback(() => (liveReceive ? openReceiveScreen() : undefined), [liveReceive, openReceiveScreen]))
503
+
498
504
  const newPeerPayClient = useCallback((): PeerPayClient | null => {
499
505
  if (!isConfigured || !messageBoxUrl || !wallet) return null
500
506
  try {