@funkit/connect-rn 9.1.1 → 9.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 (143) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +5 -3
  3. package/dist/{chunk-RPYWTS42.js → chunk-5DJHIA7X.js} +97 -105
  4. package/dist/chunk-5DJHIA7X.js.map +7 -0
  5. package/dist/{chunk-5Y2EMQYX.js → chunk-AI6F43VP.js} +3 -3
  6. package/dist/{chunk-ZE77GVDW.js → chunk-KOJEF2II.js} +97 -29
  7. package/dist/chunk-KOJEF2II.js.map +7 -0
  8. package/dist/{chunk-OBY3O4LU.js → chunk-OW6L3UM7.js} +3 -1
  9. package/dist/chunk-OW6L3UM7.js.map +7 -0
  10. package/dist/clients/lighter.js +2 -2
  11. package/dist/clients/nado.js +3 -3
  12. package/dist/clients/solana.js +1 -1
  13. package/dist/index.js +5057 -3771
  14. package/dist/index.js.map +4 -4
  15. package/dist/preview.js +113 -6
  16. package/dist/preview.js.map +2 -2
  17. package/dist/src/components/AmountDisplay.d.ts +2 -2
  18. package/dist/src/components/AmountDisplay.d.ts.map +1 -1
  19. package/dist/src/components/AssetList.d.ts +27 -0
  20. package/dist/src/components/AssetList.d.ts.map +1 -0
  21. package/dist/src/components/DepositQrCard.d.ts +20 -0
  22. package/dist/src/components/DepositQrCard.d.ts.map +1 -0
  23. package/dist/src/components/PasteAddressPanel.d.ts +16 -0
  24. package/dist/src/components/PasteAddressPanel.d.ts.map +1 -0
  25. package/dist/src/components/SearchInput.d.ts +4 -1
  26. package/dist/src/components/SearchInput.d.ts.map +1 -1
  27. package/dist/src/components/SearchableAssetListSheet.d.ts +16 -0
  28. package/dist/src/components/SearchableAssetListSheet.d.ts.map +1 -0
  29. package/dist/src/components/TokenChainSelector.d.ts +15 -0
  30. package/dist/src/components/TokenChainSelector.d.ts.map +1 -0
  31. package/dist/src/components/WalletAddressInput.d.ts +23 -10
  32. package/dist/src/components/WalletAddressInput.d.ts.map +1 -1
  33. package/dist/src/components/WithdrawSourceCard.d.ts +13 -2
  34. package/dist/src/components/WithdrawSourceCard.d.ts.map +1 -1
  35. package/dist/src/fiat/FiatKycOptionRow.d.ts +4 -1
  36. package/dist/src/fiat/FiatKycOptionRow.d.ts.map +1 -1
  37. package/dist/src/fiat/FiatKycOutcomeScreen.d.ts +1 -4
  38. package/dist/src/fiat/FiatKycOutcomeScreen.d.ts.map +1 -1
  39. package/dist/src/fiat/FiatStatusScreen.d.ts +1 -0
  40. package/dist/src/fiat/FiatStatusScreen.d.ts.map +1 -1
  41. package/dist/src/fiat/FiatStepFailedScreen.d.ts.map +1 -1
  42. package/dist/src/fiat/closeFailure.d.ts +4 -1
  43. package/dist/src/fiat/closeFailure.d.ts.map +1 -1
  44. package/dist/src/fiat/kycFailover.d.ts +8 -4
  45. package/dist/src/fiat/kycFailover.d.ts.map +1 -1
  46. package/dist/src/fiat/kycOptionRows.d.ts +7 -3
  47. package/dist/src/fiat/kycOptionRows.d.ts.map +1 -1
  48. package/dist/src/fiat/providerFailover.d.ts +34 -0
  49. package/dist/src/fiat/providerFailover.d.ts.map +1 -0
  50. package/dist/src/fiat/providers/adapter.d.ts +8 -1
  51. package/dist/src/fiat/providers/adapter.d.ts.map +1 -1
  52. package/dist/src/fiat/providers/coinbase/CoinbaseCheckoutSurface.d.ts +3 -1
  53. package/dist/src/fiat/providers/coinbase/CoinbaseCheckoutSurface.d.ts.map +1 -1
  54. package/dist/src/fiat/providers/coinbase/coinbaseOnrampEvents.d.ts +9 -0
  55. package/dist/src/fiat/providers/coinbase/coinbaseOnrampEvents.d.ts.map +1 -1
  56. package/dist/src/fiat/providers/moonpay/moonpay.d.ts.map +1 -1
  57. package/dist/src/fiat/providers/stripe/StripeSessionAuthScreen.d.ts.map +1 -1
  58. package/dist/src/fiat/providers/stripe/stripeLinkWarmup.d.ts +29 -0
  59. package/dist/src/fiat/providers/stripe/stripeLinkWarmup.d.ts.map +1 -0
  60. package/dist/src/fiat/providers/stripe/stripePayment.d.ts +1 -1
  61. package/dist/src/fiat/providers/stripe/stripePayment.d.ts.map +1 -1
  62. package/dist/src/fiat/providers/stripe/stripePreparedPayment.d.ts +22 -0
  63. package/dist/src/fiat/providers/stripe/stripePreparedPayment.d.ts.map +1 -0
  64. package/dist/src/fiat/providers/stripe/stripeRoundPush.d.ts +6 -0
  65. package/dist/src/fiat/providers/stripe/stripeRoundPush.d.ts.map +1 -1
  66. package/dist/src/fiat/providers/stripe/useStripeOnrampClient.d.ts.map +1 -1
  67. package/dist/src/fiat/useKycCompletion.d.ts +17 -5
  68. package/dist/src/fiat/useKycCompletion.d.ts.map +1 -1
  69. package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
  70. package/dist/src/flow/Drawer.d.ts.map +1 -1
  71. package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
  72. package/dist/src/flow/FlowSheet.d.ts.map +1 -1
  73. package/dist/src/flow/flowStepHeight.d.ts +4 -8
  74. package/dist/src/flow/flowStepHeight.d.ts.map +1 -1
  75. package/dist/src/flow/useDepositSelection.d.ts +38 -0
  76. package/dist/src/flow/useDepositSelection.d.ts.map +1 -0
  77. package/dist/src/hooks/useNestedSheet.d.ts +12 -0
  78. package/dist/src/hooks/useNestedSheet.d.ts.map +1 -1
  79. package/dist/src/icons/FigmaSystemIcons.d.ts +1 -0
  80. package/dist/src/icons/FigmaSystemIcons.d.ts.map +1 -1
  81. package/dist/src/icons/FunIcon.d.ts +2 -2
  82. package/dist/src/icons/FunIcon.d.ts.map +1 -1
  83. package/dist/src/icons/HandTapIcon.d.ts +4 -0
  84. package/dist/src/icons/HandTapIcon.d.ts.map +1 -0
  85. package/dist/src/icons/iconSvg.d.ts +10 -0
  86. package/dist/src/icons/iconSvg.d.ts.map +1 -0
  87. package/dist/src/logging/datadogHttpLogTransport.d.ts +20 -2
  88. package/dist/src/logging/datadogHttpLogTransport.d.ts.map +1 -1
  89. package/dist/src/logging/logger.d.ts +5 -5
  90. package/dist/src/logging/logger.d.ts.map +1 -1
  91. package/dist/src/preview/flowPreview.d.ts +7 -1
  92. package/dist/src/preview/flowPreview.d.ts.map +1 -1
  93. package/dist/src/preview/previewFetch.d.ts.map +1 -1
  94. package/dist/src/preview/scenarioCatalog.d.ts +34 -1
  95. package/dist/src/preview/scenarioCatalog.d.ts.map +1 -1
  96. package/dist/src/preview/scenarios.d.ts +2 -0
  97. package/dist/src/preview/scenarios.d.ts.map +1 -1
  98. package/dist/src/providers/FunkitStatsigProvider.d.ts.map +1 -1
  99. package/dist/src/screens/LockedTransferCryptoScreen.d.ts +11 -6
  100. package/dist/src/screens/LockedTransferCryptoScreen.d.ts.map +1 -1
  101. package/dist/src/screens/SelectAvailableChainScreen.d.ts +12 -0
  102. package/dist/src/screens/SelectAvailableChainScreen.d.ts.map +1 -0
  103. package/dist/src/screens/SelectChainScreen.d.ts.map +1 -1
  104. package/dist/src/screens/SelectReceiveTokenScreen.d.ts.map +1 -1
  105. package/dist/src/screens/WithdrawAddressScreen.d.ts +6 -1
  106. package/dist/src/screens/WithdrawAddressScreen.d.ts.map +1 -1
  107. package/dist/src/screens/WithdrawAmountScreen.d.ts +6 -1
  108. package/dist/src/screens/WithdrawAmountScreen.d.ts.map +1 -1
  109. package/dist/src/screens/WithdrawCryptoSteps.d.ts.map +1 -1
  110. package/dist/src/transfer/DepositQrCode.d.ts +31 -0
  111. package/dist/src/transfer/DepositQrCode.d.ts.map +1 -0
  112. package/dist/src/transfer/DepositQrGlyph.d.ts +15 -0
  113. package/dist/src/transfer/DepositQrGlyph.d.ts.map +1 -0
  114. package/dist/src/transfer/depositQrCodeUri.d.ts +8 -0
  115. package/dist/src/transfer/depositQrCodeUri.d.ts.map +1 -0
  116. package/dist/src/transfer/depositSelection.d.ts +13 -0
  117. package/dist/src/transfer/depositSelection.d.ts.map +1 -0
  118. package/dist/src/transfer/hooks/useLockedTokenAmount.d.ts +2 -0
  119. package/dist/src/transfer/hooks/useLockedTokenAmount.d.ts.map +1 -1
  120. package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -1
  121. package/dist/src/transfer/lockedTokenAmount.d.ts +13 -0
  122. package/dist/src/transfer/lockedTokenAmount.d.ts.map +1 -1
  123. package/dist/src/transfer/monoChainLogo.d.ts +20 -0
  124. package/dist/src/transfer/monoChainLogo.d.ts.map +1 -0
  125. package/dist/src/transfer/qrModules.d.ts +20 -0
  126. package/dist/src/transfer/qrModules.d.ts.map +1 -0
  127. package/dist/src/utils/assetSearch.d.ts +5 -0
  128. package/dist/src/utils/assetSearch.d.ts.map +1 -0
  129. package/dist/src/utils/formatAmount.d.ts +4 -3
  130. package/dist/src/utils/formatAmount.d.ts.map +1 -1
  131. package/dist/src/utils/tokenAndChainPicker.d.ts +2 -0
  132. package/dist/src/utils/tokenAndChainPicker.d.ts.map +1 -1
  133. package/dist/src/utils/tokenOnChainJoiner.d.ts +12 -0
  134. package/dist/src/utils/tokenOnChainJoiner.d.ts.map +1 -0
  135. package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts +1 -0
  136. package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts.map +1 -1
  137. package/dist/src/withdrawal/useWithdrawalSourceTokenBalance.d.ts +11 -2
  138. package/dist/src/withdrawal/useWithdrawalSourceTokenBalance.d.ts.map +1 -1
  139. package/package.json +6 -4
  140. package/dist/chunk-OBY3O4LU.js.map +0 -7
  141. package/dist/chunk-RPYWTS42.js.map +0 -7
  142. package/dist/chunk-ZE77GVDW.js.map +0 -7
  143. /package/dist/{chunk-5Y2EMQYX.js.map → chunk-AI6F43VP.js.map} +0 -0
package/dist/preview.js CHANGED
@@ -5,10 +5,10 @@ import {
5
5
  NET_WORTH,
6
6
  PERSONA_PRIVACY_POLICY_URL,
7
7
  TRANSACTIONS_PER_MONTH
8
- } from "./chunk-OBY3O4LU.js";
8
+ } from "./chunk-OW6L3UM7.js";
9
9
  import {
10
10
  logger
11
- } from "./chunk-ZE77GVDW.js";
11
+ } from "./chunk-KOJEF2II.js";
12
12
 
13
13
  // src/preview/scenarioCatalog.ts
14
14
  var AMOUNT = [
@@ -330,6 +330,18 @@ var PREVIEW_SCENARIO_CATALOG = {
330
330
  requires: "fiatRail",
331
331
  touches: ["fiat/FiatKycOutcomeScreen.tsx", "fiat/useKycCompletion.ts"]
332
332
  },
333
+ "kyc.review.extended": {
334
+ title: "KYC: an extended review opens the pending card",
335
+ flow: "deposit",
336
+ requires: "fiatRail",
337
+ touches: ["fiat/useKycCompletion.ts", "fiat/kycOptionRows.ts"]
338
+ },
339
+ "kyc.review.brief": {
340
+ title: "KYC: a brief review waited out, then priced",
341
+ flow: "deposit",
342
+ requires: "fiatRail",
343
+ touches: ["fiat/useKycCompletion.ts", "fiat/FiatKycOutcomeScreen.tsx"]
344
+ },
333
345
  "kyc.completion.hold": {
334
346
  title: "KYC completion: on hold",
335
347
  flow: "deposit",
@@ -509,6 +521,19 @@ var PREVIEW_SCENARIO_CATALOG = {
509
521
  requires: "cryptoDeposit",
510
522
  touches: ["screens/TransferCryptoScreen.tsx"]
511
523
  },
524
+ "deposit.lockedTransfer": {
525
+ title: "Locked deposit: token and chain dropdowns over the QR card",
526
+ flow: "deposit",
527
+ requires: "cryptoDepositLocked",
528
+ touches: [
529
+ "screens/LockedTransferCryptoScreen.tsx",
530
+ "components/DepositQrCard.tsx",
531
+ "components/TokenChainSelector.tsx",
532
+ "flow/useDepositSelection.ts",
533
+ "screens/SelectReceiveTokenScreen.tsx",
534
+ "screens/SelectAvailableChainScreen.tsx"
535
+ ]
536
+ },
512
537
  // Crypto withdrawal.
513
538
  "withdraw.method": {
514
539
  title: "Withdraw: payout methods",
@@ -531,6 +556,27 @@ var PREVIEW_SCENARIO_CATALOG = {
531
556
  requires: "cryptoWithdrawal",
532
557
  touches: [...WITHDRAW, "screens/WithdrawAddressScreen.tsx"]
533
558
  },
559
+ "withdraw.address.pastePanel": {
560
+ title: "Withdraw: recipient address, paste panel",
561
+ flow: "withdrawal",
562
+ requires: "omnibusWithdrawFlow",
563
+ touches: [
564
+ ...WITHDRAW,
565
+ "screens/WithdrawAddressScreen.tsx",
566
+ "components/PasteAddressPanel.tsx",
567
+ "components/WalletAddressInput.tsx"
568
+ ]
569
+ },
570
+ "withdraw.address.pastePanel.editing": {
571
+ title: "Withdraw: recipient address, paste panel editing",
572
+ flow: "withdrawal",
573
+ requires: "omnibusWithdrawFlow",
574
+ touches: [
575
+ ...WITHDRAW,
576
+ "screens/WithdrawAddressScreen.tsx",
577
+ "components/WalletAddressInput.tsx"
578
+ ]
579
+ },
534
580
  "withdraw.receiveToken": {
535
581
  title: "Withdraw: receive token and chain",
536
582
  flow: "withdrawal",
@@ -972,6 +1018,21 @@ var IN_REVIEW = {
972
1018
  }
973
1019
  ]
974
1020
  };
1021
+ var reviewFor = (review) => ({
1022
+ ...IN_REVIEW,
1023
+ state: { ...IN_REVIEW.state, review }
1024
+ });
1025
+ var submittedInto = (review, polled) => fiat(
1026
+ { pressEntry: true },
1027
+ {
1028
+ quote: kycForm(US_ROUND),
1029
+ currentLimit: "500.00",
1030
+ responses: {
1031
+ "/fiat/kyc/form": review,
1032
+ [`/fiat/quotes/${quoteRef}`]: polled
1033
+ }
1034
+ }
1035
+ );
975
1036
  var ON_HOLD = {
976
1037
  state: {
977
1038
  kind: "KYC",
@@ -1332,6 +1393,16 @@ var DEFINITIONS = {
1332
1393
  captureReissued: true
1333
1394
  }),
1334
1395
  "kyc.completion.review": fiat({ step: IN_REVIEW, kycCompletion: "review" }),
1396
+ // The pending card at once, with "Deposit max" at the table's current limit.
1397
+ "kyc.review.extended": submittedInto(
1398
+ reviewFor({ duration: "EXTENDED" }),
1399
+ reviewFor({ duration: "EXTENDED" })
1400
+ ),
1401
+ // "Authorizing your limits now…" while the poll runs, then the price it brings.
1402
+ "kyc.review.brief": submittedInto(
1403
+ reviewFor({ duration: "BRIEF", holdMs: 3e4 }),
1404
+ PRICED
1405
+ ),
1335
1406
  "kyc.completion.hold": fiat({ step: ON_HOLD, kycCompletion: "hold" }),
1336
1407
  "kyc.completion.restricted": fiat({
1337
1408
  step: REJECTED,
@@ -1437,6 +1508,12 @@ var DEFINITIONS = {
1437
1508
  seed: { deposit: { screen: "transfer", chainId: "8453" } },
1438
1509
  backend: {}
1439
1510
  },
1511
+ "deposit.lockedTransfer": {
1512
+ seed: {
1513
+ deposit: { screen: "transfer", chainId: "8453", sourceSymbol: "USDC" }
1514
+ },
1515
+ backend: {}
1516
+ },
1440
1517
  "withdraw.method": { seed: { withdrawal: {} }, backend: {} },
1441
1518
  "withdraw.amount": {
1442
1519
  seed: {
@@ -1454,6 +1531,28 @@ var DEFINITIONS = {
1454
1531
  },
1455
1532
  backend: {}
1456
1533
  },
1534
+ // Empty, which is where the panel shows.
1535
+ "withdraw.address.pastePanel": {
1536
+ seed: {
1537
+ withdrawal: {
1538
+ stack: ["withdrawMethod", "withdrawAmount", "withdrawAddress"],
1539
+ amount: "25"
1540
+ }
1541
+ },
1542
+ backend: {}
1543
+ },
1544
+ // Filled and open for editing: the field shows the address start, not its tail.
1545
+ "withdraw.address.pastePanel.editing": {
1546
+ seed: {
1547
+ withdrawal: {
1548
+ stack: ["withdrawMethod", "withdrawAmount", "withdrawAddress"],
1549
+ amount: "25",
1550
+ recipient: DEMO_RECIPIENT,
1551
+ addressFocused: true
1552
+ }
1553
+ },
1554
+ backend: {}
1555
+ },
1457
1556
  "withdraw.receiveToken": {
1458
1557
  seed: {
1459
1558
  withdrawal: {
@@ -1636,7 +1735,7 @@ function unservedAmount(ranges) {
1636
1735
  function isStepResponse(response) {
1637
1736
  return "state" in response;
1638
1737
  }
1639
- function routingTable(quote, minimum, ranges, search) {
1738
+ function routingTable(quote, minimum, ranges, search, currentLimit) {
1640
1739
  const limits = quote.state.kind === "QUOTE" ? quote.state.limits : void 0;
1641
1740
  const provider = "provider" in quote ? quote.provider : "MOONPAY";
1642
1741
  const spans = ranges?.map(([min, max, userMax]) => [min, userMax ?? max]) ?? [[minimum ?? limits?.min ?? 1, limits?.max ?? 1e6]];
@@ -1648,7 +1747,14 @@ function routingTable(quote, minimum, ranges, search) {
1648
1747
  intervals: spans.map(([min, max]) => ({
1649
1748
  min: Number(min).toFixed(2),
1650
1749
  max: Number(max).toFixed(2),
1651
- providers: [{ provider, next: "READY", visibility: "COMPLETE" }]
1750
+ providers: [
1751
+ {
1752
+ provider,
1753
+ next: "READY",
1754
+ visibility: "COMPLETE",
1755
+ ...currentLimit === void 0 ? {} : { currentLimit }
1756
+ }
1757
+ ]
1652
1758
  }))
1653
1759
  }))
1654
1760
  };
@@ -1660,12 +1766,13 @@ function createPreviewFetch(scenario, passThrough) {
1660
1766
  minimum,
1661
1767
  noRoute: noRouteReason,
1662
1768
  ranges,
1663
- providers
1769
+ providers,
1770
+ currentLimit
1664
1771
  } = scenario.backend;
1665
1772
  const answer = (path, method, amount, search, asked) => {
1666
1773
  if (path.endsWith("/fiat/routing/table")) {
1667
1774
  return json(
1668
- providers === void 0 ? routingTable(quote, minimum, ranges, search) : providersTable(providers, search)
1775
+ providers === void 0 ? routingTable(quote, minimum, ranges, search, currentLimit) : providersTable(providers, search)
1669
1776
  );
1670
1777
  }
1671
1778
  const isQuote = method === "POST" && (path.endsWith("/fiat/quote") || path.endsWith("/fiat/routing/quote"));