@funkit/connect-rn 12.1.2 → 12.2.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.
Files changed (178) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/app.plugin.js +63 -0
  3. package/dist/{chunk-Q74I4SOP.js → chunk-7RKYLSYP.js} +2 -2
  4. package/dist/{chunk-GOFKXSDM.js → chunk-NXDFUNCP.js} +98 -66
  5. package/dist/chunk-NXDFUNCP.js.map +7 -0
  6. package/dist/{chunk-AICRSY7K.js → chunk-QCVNSXNO.js} +16 -12
  7. package/dist/chunk-QCVNSXNO.js.map +7 -0
  8. package/dist/clients/lighter.js +1 -1
  9. package/dist/clients/nado.js +2 -2
  10. package/dist/index.js +23849 -21668
  11. package/dist/index.js.map +4 -4
  12. package/dist/preview.js +262 -6
  13. package/dist/preview.js.map +3 -3
  14. package/dist/src/components/DepositActionMotion.d.ts +4 -2
  15. package/dist/src/components/DepositActionMotion.d.ts.map +1 -1
  16. package/dist/src/components/LoadingSpinner.d.ts +12 -4
  17. package/dist/src/components/LoadingSpinner.d.ts.map +1 -1
  18. package/dist/src/components/PillButton.d.ts.map +1 -1
  19. package/dist/src/components/v2/AmountDisplay.d.ts.map +1 -1
  20. package/dist/src/components/v2/FeeLine.d.ts +5 -4
  21. package/dist/src/components/v2/FeeLine.d.ts.map +1 -1
  22. package/dist/src/components/waitingRingHandoff.d.ts +28 -0
  23. package/dist/src/components/waitingRingHandoff.d.ts.map +1 -0
  24. package/dist/src/fiat/common/stepDetails.d.ts +4 -5
  25. package/dist/src/fiat/common/stepDetails.d.ts.map +1 -1
  26. package/dist/src/fiat/contact/sessionContact.d.ts +2 -0
  27. package/dist/src/fiat/contact/sessionContact.d.ts.map +1 -1
  28. package/dist/src/fiat/kyc/FiatKycIntroScreen.d.ts +3 -1
  29. package/dist/src/fiat/kyc/FiatKycIntroScreen.d.ts.map +1 -1
  30. package/dist/src/fiat/payment/failoverKind.d.ts +6 -5
  31. package/dist/src/fiat/payment/failoverKind.d.ts.map +1 -1
  32. package/dist/src/fiat/payment/failoverPrompt.d.ts +1 -1
  33. package/dist/src/fiat/payment/failoverPrompt.d.ts.map +1 -1
  34. package/dist/src/fiat/payment/paymentSurfaceFailure.d.ts.map +1 -1
  35. package/dist/src/fiat/payment/providerFailover.d.ts +3 -1
  36. package/dist/src/fiat/payment/providerFailover.d.ts.map +1 -1
  37. package/dist/src/fiat/payment/useRegionCurrencySheet.d.ts +24 -0
  38. package/dist/src/fiat/payment/useRegionCurrencySheet.d.ts.map +1 -0
  39. package/dist/src/fiat/processing/FailoverPrompt.d.ts +1 -1
  40. package/dist/src/fiat/processing/FailoverPrompt.d.ts.map +1 -1
  41. package/dist/src/fiat/processing/failoverArtwork.d.ts +5 -0
  42. package/dist/src/fiat/processing/failoverArtwork.d.ts.map +1 -1
  43. package/dist/src/fiat/providerFlow.d.ts +5 -0
  44. package/dist/src/fiat/providerFlow.d.ts.map +1 -1
  45. package/dist/src/fiat/providerFlows.d.ts +8 -0
  46. package/dist/src/fiat/providerFlows.d.ts.map +1 -1
  47. package/dist/src/fiat/providerHandoff.d.ts +4 -1
  48. package/dist/src/fiat/providerHandoff.d.ts.map +1 -1
  49. package/dist/src/fiat/providers/alchemypay/AlchemyPayButtonSurface.d.ts +33 -0
  50. package/dist/src/fiat/providers/alchemypay/AlchemyPayButtonSurface.d.ts.map +1 -0
  51. package/dist/src/fiat/providers/alchemypay/Checkout.d.ts +27 -0
  52. package/dist/src/fiat/providers/alchemypay/Checkout.d.ts.map +1 -0
  53. package/dist/src/fiat/providers/alchemypay/alchemyPayButtonEvents.d.ts +72 -0
  54. package/dist/src/fiat/providers/alchemypay/alchemyPayButtonEvents.d.ts.map +1 -0
  55. package/dist/src/fiat/providers/alchemypay/alchemyPayPage.d.ts +19 -0
  56. package/dist/src/fiat/providers/alchemypay/alchemyPayPage.d.ts.map +1 -0
  57. package/dist/src/fiat/providers/alchemypay/checkoutRules.d.ts +29 -0
  58. package/dist/src/fiat/providers/alchemypay/checkoutRules.d.ts.map +1 -0
  59. package/dist/src/fiat/providers/alchemypay/index.d.ts +4 -0
  60. package/dist/src/fiat/providers/alchemypay/index.d.ts.map +1 -0
  61. package/dist/src/fiat/providers/alchemypay/prefetch.d.ts +35 -0
  62. package/dist/src/fiat/providers/alchemypay/prefetch.d.ts.map +1 -0
  63. package/dist/src/fiat/providers/alchemypay/useAlchemyPayCheckout.d.ts +45 -0
  64. package/dist/src/fiat/providers/alchemypay/useAlchemyPayCheckout.d.ts.map +1 -0
  65. package/dist/src/fiat/providers/coinbase/next/useCoinbaseCheckout.d.ts.map +1 -1
  66. package/dist/src/fiat/providers/moonpay/fullCheckout/useCheckoutCalls.d.ts +3 -5
  67. package/dist/src/fiat/providers/moonpay/fullCheckout/useCheckoutCalls.d.ts.map +1 -1
  68. package/dist/src/fiat/providers/moonpay/fullCheckout/useCheckoutModel.d.ts.map +1 -1
  69. package/dist/src/fiat/providers/moonpay/guestCheckout/connection.d.ts.map +1 -1
  70. package/dist/src/fiat/providers/moonpay/guestCheckout/useGuestCheckoutModel.d.ts.map +1 -1
  71. package/dist/src/fiat/providers/moonpay/sdk/ApplePayButton.d.ts.map +1 -1
  72. package/dist/src/fiat/providers/stripe/next/Checkout.d.ts.map +1 -1
  73. package/dist/src/fiat/providers/stripe/next/index.d.ts.map +1 -1
  74. package/dist/src/fiat/providers/stripe/next/useStripeAccountEmail.d.ts +17 -0
  75. package/dist/src/fiat/providers/stripe/next/useStripeAccountEmail.d.ts.map +1 -0
  76. package/dist/src/fiat/providers/stripe/next/useStripeAttestation.d.ts +3 -1
  77. package/dist/src/fiat/providers/stripe/next/useStripeAttestation.d.ts.map +1 -1
  78. package/dist/src/fiat/providers/stripe/next/useStripeCheckout.d.ts +8 -2
  79. package/dist/src/fiat/providers/stripe/next/useStripeCheckout.d.ts.map +1 -1
  80. package/dist/src/fiat/providers/stripe/next/useStripeCheckoutCalls.d.ts +4 -2
  81. package/dist/src/fiat/providers/stripe/next/useStripeCheckoutCalls.d.ts.map +1 -1
  82. package/dist/src/fiat/providers/stripe/next/useStripeExit.d.ts.map +1 -1
  83. package/dist/src/fiat/providers/stripe/next/useStripeFunnel.d.ts.map +1 -1
  84. package/dist/src/fiat/providers/stripe/next/useStripeIdentifiers.d.ts +4 -1
  85. package/dist/src/fiat/providers/stripe/next/useStripeIdentifiers.d.ts.map +1 -1
  86. package/dist/src/fiat/providers/stripe/next/useStripeOrderSlot.d.ts +2 -1
  87. package/dist/src/fiat/providers/stripe/next/useStripeOrderSlot.d.ts.map +1 -1
  88. package/dist/src/fiat/providers/stripe/next/useStripePayment.d.ts +3 -1
  89. package/dist/src/fiat/providers/stripe/next/useStripePayment.d.ts.map +1 -1
  90. package/dist/src/fiat/providers/stripe/stripeIdentifierField.d.ts +2 -0
  91. package/dist/src/fiat/providers/stripe/stripeIdentifierField.d.ts.map +1 -1
  92. package/dist/src/fiat/quote/providerSelection.d.ts.map +1 -1
  93. package/dist/src/fiat/useProviderCheckout.d.ts +3 -1
  94. package/dist/src/fiat/useProviderCheckout.d.ts.map +1 -1
  95. package/dist/src/flow/CryptoAddressPage.d.ts.map +1 -1
  96. package/dist/src/flow/CryptoDepositStep.d.ts +2 -2
  97. package/dist/src/flow/CryptoDepositStep.d.ts.map +1 -1
  98. package/dist/src/flow/CryptoTokenPage.d.ts +1 -1
  99. package/dist/src/flow/CryptoTokenPage.d.ts.map +1 -1
  100. package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
  101. package/dist/src/flow/Drawer.d.ts +2 -1
  102. package/dist/src/flow/Drawer.d.ts.map +1 -1
  103. package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
  104. package/dist/src/flow/FlowSheet.d.ts.map +1 -1
  105. package/dist/src/flow/FunkitFlowProvider.d.ts +1 -0
  106. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  107. package/dist/src/flow/MoonPayHostedAmountStep.d.ts.map +1 -1
  108. package/dist/src/flow/PaymentMethodPickerSheet.d.ts.map +1 -1
  109. package/dist/src/flow/SwappedAmountStep.d.ts +2 -2
  110. package/dist/src/flow/SwappedAmountStep.d.ts.map +1 -1
  111. package/dist/src/flow/WalletDepositStep.d.ts +6 -1
  112. package/dist/src/flow/WalletDepositStep.d.ts.map +1 -1
  113. package/dist/src/flow/cryptoDepositFlow.d.ts +1 -1
  114. package/dist/src/flow/cryptoDepositFlow.d.ts.map +1 -1
  115. package/dist/src/flow/cryptoTokenPick.d.ts +4 -3
  116. package/dist/src/flow/cryptoTokenPick.d.ts.map +1 -1
  117. package/dist/src/flow/renderFiatFlowScreen.d.ts +5 -3
  118. package/dist/src/flow/renderFiatFlowScreen.d.ts.map +1 -1
  119. package/dist/src/flow/sheetSizing.d.ts +15 -0
  120. package/dist/src/flow/sheetSizing.d.ts.map +1 -1
  121. package/dist/src/flow/swappedLongtail.d.ts +4 -3
  122. package/dist/src/flow/swappedLongtail.d.ts.map +1 -1
  123. package/dist/src/flow/useFeeDetails.d.ts +5 -2
  124. package/dist/src/flow/useFeeDetails.d.ts.map +1 -1
  125. package/dist/src/flow/useWalletDeposit.d.ts +3 -0
  126. package/dist/src/flow/useWalletDeposit.d.ts.map +1 -1
  127. package/dist/src/flow/useWalletReceiveQuote.d.ts +21 -0
  128. package/dist/src/flow/useWalletReceiveQuote.d.ts.map +1 -0
  129. package/dist/src/hooks/track/cryptoDepositContext.d.ts +19 -0
  130. package/dist/src/hooks/track/cryptoDepositContext.d.ts.map +1 -0
  131. package/dist/src/hooks/track/events.d.ts +31 -6
  132. package/dist/src/hooks/track/events.d.ts.map +1 -1
  133. package/dist/src/hooks/track/paymentQuoteConfirmer.d.ts +1 -1
  134. package/dist/src/hooks/track/paymentQuoteConfirmer.d.ts.map +1 -1
  135. package/dist/src/hooks/track/useCryptoDepositSelectionEvents.d.ts +4 -0
  136. package/dist/src/hooks/track/useCryptoDepositSelectionEvents.d.ts.map +1 -0
  137. package/dist/src/hooks/track/useDepositFlowEvents.d.ts +3 -1
  138. package/dist/src/hooks/track/useDepositFlowEvents.d.ts.map +1 -1
  139. package/dist/src/hooks/track/usePaymentButtonEvents.d.ts +1 -0
  140. package/dist/src/hooks/track/usePaymentButtonEvents.d.ts.map +1 -1
  141. package/dist/src/hooks/track/useProviderCheckoutEvents.d.ts +20 -7
  142. package/dist/src/hooks/track/useProviderCheckoutEvents.d.ts.map +1 -1
  143. package/dist/src/hooks/track/useTrackFiatDepositQuoteEvents.d.ts +2 -1
  144. package/dist/src/hooks/track/useTrackFiatDepositQuoteEvents.d.ts.map +1 -1
  145. package/dist/src/hooks/track/useTrackFiatPaymentEvents.d.ts +8 -4
  146. package/dist/src/hooks/track/useTrackFiatPaymentEvents.d.ts.map +1 -1
  147. package/dist/src/hooks/useNestedSheet.d.ts.map +1 -1
  148. package/dist/src/icons/iconSvg.d.ts.map +1 -1
  149. package/dist/src/moonpayHosted/MoonPayHostedCheckout.d.ts +2 -1
  150. package/dist/src/moonpayHosted/MoonPayHostedCheckout.d.ts.map +1 -1
  151. package/dist/src/moonpayHosted/checkout.d.ts +1 -2
  152. package/dist/src/moonpayHosted/checkout.d.ts.map +1 -1
  153. package/dist/src/preview/fixtures/alchemyPayCheckout.d.ts +13 -0
  154. package/dist/src/preview/fixtures/alchemyPayCheckout.d.ts.map +1 -0
  155. package/dist/src/preview/fixtures/stripeCheckout.d.ts +8 -0
  156. package/dist/src/preview/fixtures/stripeCheckout.d.ts.map +1 -0
  157. package/dist/src/preview/flowPreview.d.ts +28 -4
  158. package/dist/src/preview/flowPreview.d.ts.map +1 -1
  159. package/dist/src/preview/replay/ReplayMoonPay.d.ts +11 -2
  160. package/dist/src/preview/replay/ReplayMoonPay.d.ts.map +1 -1
  161. package/dist/src/preview/replay/replayFetch.d.ts.map +1 -1
  162. package/dist/src/preview/scenarioCatalog.d.ts +50 -2
  163. package/dist/src/preview/scenarioCatalog.d.ts.map +1 -1
  164. package/dist/src/preview/scenarios.d.ts +1 -1
  165. package/dist/src/preview/scenarios.d.ts.map +1 -1
  166. package/dist/src/screens/DepositAmountScreen.d.ts.map +1 -1
  167. package/dist/src/screens/PaymentConfirmScreen.d.ts +2 -1
  168. package/dist/src/screens/PaymentConfirmScreen.d.ts.map +1 -1
  169. package/dist/src/screens/TokenAndChainPickerScreen.d.ts.map +1 -1
  170. package/dist/src/screens/WithdrawCryptoSteps.d.ts.map +1 -1
  171. package/dist/src/transfer/hooks/useWithdrawalFops.d.ts +3 -1
  172. package/dist/src/transfer/hooks/useWithdrawalFops.d.ts.map +1 -1
  173. package/dist/src/transfer/lockedQuoteSource.d.ts +5 -0
  174. package/dist/src/transfer/lockedQuoteSource.d.ts.map +1 -1
  175. package/package.json +5 -5
  176. package/dist/chunk-AICRSY7K.js.map +0 -7
  177. package/dist/chunk-GOFKXSDM.js.map +0 -7
  178. /package/dist/{chunk-Q74I4SOP.js.map → chunk-7RKYLSYP.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,77 @@
1
1
  # @funkit/connect-rn
2
2
 
3
+ ## 12.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f235ba1: AlchemyPay buyers pay with AlchemyPay's Apple Pay button on the amount screen instead of on its full-screen page
8
+ - 3962b94: Add AlchemyPay's Apple Pay button for the amount screen, behind no flow yet
9
+ - 4e9c42c: Add AlchemyPay's checkout logic for /fiat/next, behind no flow yet
10
+ - 158dacd: Add AlchemyPay's checkout screens for /fiat/next, behind no flow yet
11
+ - 9a672a6: Offer AlchemyPay on /fiat/next once its Fun WHN experiment turns it on; it stays off until then
12
+ - ac5541b: Add AlchemyPay's payment page as a full-screen view with Apple Pay, behind no flow yet
13
+ - b529f1f: When Stripe sells the buyer only in another currency, a sheet offers to quote the deposit again in that currency
14
+
15
+ ### Patch Changes
16
+
17
+ - f2797f6: AlchemyPay's checkout no longer offers to open a payment page the buyer did not ask for, which the backend never sends
18
+ - ff483fa: AlchemyPay's KYC consent tells the buyer to have an ID and a selfie ready instead of "no ID needed"
19
+ - f2797f6: While AlchemyPay imports the buyer's identity check, AlchemyPay's checkout places the order again by itself instead of asking for Continue after each wait
20
+ - ff483fa: AlchemyPay's payment page shows as a short rounded card on the dark sheet instead of a full white screen
21
+ - f2797f6: AlchemyPay's checkout waits at least 30 seconds after its payment page closes or returns before it treats the order as unpaid, and keeps the sheet closable until an order read shows a payment
22
+ - 1822d7e: AlchemyPay opens Apple Pay after one Continue, keeps its button after dismissal, preserves the KYC consent while capture loads, and recovers when Apple Pay is unavailable.
23
+ - 64a36e2: AlchemyPay's checkout gets preview scenarios, and a recorded session replays its payment page through the replay stand-in
24
+ - 2d6bff6: Track displayed minimum and maximum deposit amount hints with web-aligned error codes.
25
+ - 95b8fc8: Fix the deposit amount sitting against the left edge after returning from a wallet app or payment page.
26
+ - fcfa693: Android debug builds that use the Expo dev client no longer fail at the manifest merge when Sumsub's native SDK is installed.
27
+ - 899c0ee: Record a payment-button click when buyers continue to a Swapped v2 checkout.
28
+ - 115e493: Keep the crypto deposit back button whole on the Send Crypto page and when going back from it
29
+ - 711048e: The crypto deposit token list no longer stutters the first time it opens on iOS.
30
+ - 503d871: The Currency, Network and Send Crypto pages in the payment picker now rise into place instead of cutting in
31
+ - 1e857b3: Fix an empty sheet appearing on the deposit amount screen after deleting the amount below the minimum with a MoonPay method selected.
32
+ - 55982d4: The fee line always reads "FREE with debit cards" on a fee-free route, and only the struck fee fades while an amount is priced
33
+ - 4c47d91: No user-facing changes.
34
+ - c421418: Forms-of-payment requests send the active checkout ID, so hosted MoonPay orders are attributed to the checkout that opened them.
35
+ - 065413b: The "Connecting you with MoonPay" sheet is now a fixed, shorter height on every iPhone, with balanced spacing.
36
+ - 30c8ff2: The "Couldn't load checkout" MoonPay sheet keeps its height and offers Try again, plus Other payment methods when the host has a method picker.
37
+ - f18756f: The payment button no longer flashes or restarts its spinner while an amount is priced
38
+ - 6d37f97: The loading ring turns more slowly and its arc now grows and shrinks as it turns, matching the design.
39
+ - 437e480: After the wallet approves a connection, the amount screen shows a loading Review button while balances and fees load, instead of "Connecting to Phantom".
40
+ - 347e55d: The wallet token sheet says it lists only the tokens supported for deposit.
41
+ - 3c142b1: The wallet pay sheet shows the token amount you send and the quoted amount you receive, and its fee note names network and Fun fees instead of the wallet's.
42
+ - fdc8f5e: Report provider checkout outcomes and order IDs in analytics, including Stripe declines, successful retries after Apple Pay cancellation, and MoonPay guest payments.
43
+ - 7a34c97: Keep the deposit Continue label readable while the button is disabled.
44
+ - fdc8f5e: Report deposit submissions only after the backend returns an order.
45
+ - eff63f5: Recorded replays play Coinbase's and MoonPay's `/fiat/next` checkouts, MoonPay guest's included, through to the order.
46
+ - 9edd8a1: Treat the initially restored token and network as the default in crypto deposit selection analytics.
47
+ - 9edd8a1: Track crypto deposit selections with resolved source and destination context.
48
+ - da5a9ca: Send Crypto now says under the address which tokens and networks it accepts.
49
+ - 609b2c0: Dragging up on a sheet's body now rubber-bands like dragging its header, unless the body is a list that scrolls.
50
+ - 8d60a3b: When a buyer's bank declines their card at Coinbase, the sheet now says so and switches them to another partner on Continue, instead of asking them to approve the charge.
51
+ - 323a71e: The deposit action shows one steady loading button while a provider checkout starts, instead of blinking as each loading step hands over to the next.
52
+ - 486b8f7: Upgrade storybook to 10.6.2 to patch CVE-2026-114125 (CVSS 9.4)
53
+ - 4f98516: Track Stripe EU KYC submissions and provider failures while preserving analytics through retries.
54
+ - 351e0a9: Stripe buyers whose login email cannot sign in to Link, such as an Apple private relay address, can now enter their Link account email on /fiat/next
55
+ - 1f4fd51: Add the `fiat.regionCurrency` preview scenario, which opens the sheet that offers to pay in another currency
56
+ - 072ec92: Stripe's region refusal no longer opens a full-screen notice; the checkout exits with the currency Stripe sells the buyer
57
+
58
+ Migration: `StripeStage` no longer has a `REGION_MISMATCH` kind. A `REGION_MISMATCH` refusal now ends the checkout at once, and its `StripeCheckoutExit` carries `refusal: 'REGION_MISMATCH'` and `currency`. Read the exit instead of the stage.
59
+ - c16f03b: Linked wallet balances refresh on the first return to the app even when the deposit screen opened in the background, and a refresh that picks a new token picks one that can pay.
60
+ - Updated dependencies [f2797f6]
61
+ - Updated dependencies [77e23f1]
62
+ - Updated dependencies [2dbf107]
63
+ - Updated dependencies [643efb7]
64
+ - Updated dependencies [f2797f6]
65
+ - Updated dependencies [1822d7e]
66
+ - Updated dependencies [f2797f6]
67
+ - Updated dependencies [c421418]
68
+ - Updated dependencies [cfe6b5a]
69
+ - Updated dependencies [19cfb48]
70
+ - Updated dependencies [351e0a9]
71
+ - Updated dependencies [072ec92]
72
+ - @funkit/connect-core@17.0.0
73
+ - @funkit/api-base@10.4.0
74
+
3
75
  ## 12.1.2
4
76
 
5
77
  ### Patch Changes
package/app.plugin.js CHANGED
@@ -1,4 +1,6 @@
1
1
  // plugin/index.ts
2
+ import { existsSync } from "node:fs";
3
+ import { join } from "node:path";
2
4
  import configPlugins from "expo/config-plugins.js";
3
5
 
4
6
  // plugin/sumsubNative.ts
@@ -6,6 +8,9 @@ var SUMSUB_SPECS = "source 'https://github.com/sumsub/Specs.git'";
6
8
  var COCOAPODS_CDN = "source 'https://cdn.cocoapods.org/'";
7
9
  var SUMSUB_MAVEN = "https://maven.sumsub.com/repository/maven-public/";
8
10
  var MAVEN_MARKER = "// @funkit/connect-rn: Sumsub mobile SDK";
11
+ var TOOLS_NAMESPACE = "http://schemas.android.com/tools";
12
+ var ML_KIT_DEPENDENCIES = "com.google.mlkit.vision.DEPENDENCIES";
13
+ var DEBUG_ML_KIT_DEPENDENCIES = "barcode_ui,face";
9
14
  var SUMSUB_USAGE_DESCRIPTIONS = {
10
15
  NSCameraUsageDescription: "Used to photograph your ID and take a selfie when identity verification is required.",
11
16
  NSMicrophoneUsageDescription: "Used to record a short video when identity verification asks for one.",
@@ -40,6 +45,41 @@ allprojects {
40
45
  }
41
46
  `;
42
47
  }
48
+ function joinMlKitModels(lists) {
49
+ const names = lists.flatMap((list) => (list ?? "").split(",")).map((name) => name.trim()).filter((name) => name !== "");
50
+ return [...new Set(names)].join(",");
51
+ }
52
+ function mergeDebugMlKitDependencies(manifest, hostModels) {
53
+ const [application, ...otherApplications] = manifest.manifest.application ?? [
54
+ { $: {} }
55
+ ];
56
+ const allMetaData = application["meta-data"] ?? [];
57
+ const debugModels = allMetaData.find(
58
+ (item) => item.$["android:name"] === ML_KIT_DEPENDENCIES
59
+ )?.$["android:value"];
60
+ const attributes = {
61
+ "android:name": ML_KIT_DEPENDENCIES,
62
+ "android:value": joinMlKitModels([
63
+ hostModels,
64
+ debugModels,
65
+ DEBUG_ML_KIT_DEPENDENCIES
66
+ ]),
67
+ "tools:replace": "android:value"
68
+ };
69
+ const metaData = allMetaData.filter(
70
+ (item) => item.$["android:name"] !== ML_KIT_DEPENDENCIES
71
+ );
72
+ return {
73
+ manifest: {
74
+ ...manifest.manifest,
75
+ $: { ...manifest.manifest.$, "xmlns:tools": TOOLS_NAMESPACE },
76
+ application: [
77
+ { ...application, "meta-data": [...metaData, { $: attributes }] },
78
+ ...otherApplications
79
+ ]
80
+ }
81
+ };
82
+ }
43
83
  function withSumsubUsageDescriptions(infoPlist, options = {}) {
44
84
  const next = { ...infoPlist };
45
85
  for (const [key, fallback] of Object.entries(SUMSUB_USAGE_DESCRIPTIONS)) {
@@ -55,7 +95,9 @@ function withSumsubUsageDescriptions(infoPlist, options = {}) {
55
95
 
56
96
  // plugin/index.ts
57
97
  var {
98
+ AndroidConfig,
58
99
  createRunOncePlugin,
100
+ withFinalizedMod,
59
101
  withInfoPlist,
60
102
  withPodfile,
61
103
  withProjectBuildGradle
@@ -75,6 +117,27 @@ var withSumsubNative = (config, options) => {
75
117
  }
76
118
  return gradle;
77
119
  });
120
+ config = withFinalizedMod(config, [
121
+ "android",
122
+ async (modConfig) => {
123
+ const appRoot = join(modConfig.modRequest.platformProjectRoot, "app/src");
124
+ const debugPath = join(appRoot, "debug/AndroidManifest.xml");
125
+ if (!existsSync(debugPath)) {
126
+ return modConfig;
127
+ }
128
+ const mainPath = join(appRoot, "main/AndroidManifest.xml");
129
+ const hostModels = existsSync(mainPath) ? AndroidConfig.Manifest.getMainApplicationMetaDataValue(
130
+ await AndroidConfig.Manifest.readAndroidManifestAsync(mainPath),
131
+ ML_KIT_DEPENDENCIES
132
+ ) : null;
133
+ const debug = await AndroidConfig.Manifest.readAndroidManifestAsync(debugPath);
134
+ await AndroidConfig.Manifest.writeAndroidManifestAsync(
135
+ debugPath,
136
+ mergeDebugMlKitDependencies(debug, hostModels)
137
+ );
138
+ return modConfig;
139
+ }
140
+ ]);
78
141
  return withInfoPlist(config, (plist) => {
79
142
  plist.modResults = withSumsubUsageDescriptions(plist.modResults, options);
80
143
  return plist;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useFunkitIdentity
3
- } from "./chunk-GOFKXSDM.js";
3
+ } from "./chunk-NXDFUNCP.js";
4
4
  import {
5
5
  logger
6
6
  } from "./chunk-2HFFVYAZ.js";
@@ -114,4 +114,4 @@ export {
114
114
  useIsStablecoin,
115
115
  useSourceTokenUsdPrice
116
116
  };
117
- //# sourceMappingURL=chunk-Q74I4SOP.js.map
117
+ //# sourceMappingURL=chunk-7RKYLSYP.js.map