@funkit/connect-rn 9.1.2 → 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.
- package/CHANGELOG.md +35 -0
- package/dist/{chunk-2C2OETEM.js → chunk-5DJHIA7X.js} +49 -73
- package/dist/chunk-5DJHIA7X.js.map +7 -0
- package/dist/{chunk-OJN7XVWC.js → chunk-AI6F43VP.js} +3 -3
- package/dist/{chunk-ZE77GVDW.js → chunk-KOJEF2II.js} +97 -29
- package/dist/chunk-KOJEF2II.js.map +7 -0
- package/dist/{chunk-ESQLFNOK.js → chunk-OW6L3UM7.js} +2 -1
- package/dist/chunk-OW6L3UM7.js.map +7 -0
- package/dist/clients/lighter.js +2 -2
- package/dist/clients/nado.js +3 -3
- package/dist/clients/solana.js +1 -1
- package/dist/index.js +4246 -3481
- package/dist/index.js.map +4 -4
- package/dist/preview.js +70 -6
- package/dist/preview.js.map +2 -2
- package/dist/src/components/AssetList.d.ts +27 -0
- package/dist/src/components/AssetList.d.ts.map +1 -0
- package/dist/src/components/DepositQrCard.d.ts +20 -0
- package/dist/src/components/DepositQrCard.d.ts.map +1 -0
- package/dist/src/components/SearchInput.d.ts +4 -1
- package/dist/src/components/SearchInput.d.ts.map +1 -1
- package/dist/src/components/SearchableAssetListSheet.d.ts +16 -0
- package/dist/src/components/SearchableAssetListSheet.d.ts.map +1 -0
- package/dist/src/components/TokenChainSelector.d.ts +15 -0
- package/dist/src/components/TokenChainSelector.d.ts.map +1 -0
- package/dist/src/fiat/FiatKycOptionRow.d.ts +4 -1
- package/dist/src/fiat/FiatKycOptionRow.d.ts.map +1 -1
- package/dist/src/fiat/FiatKycOutcomeScreen.d.ts +1 -4
- package/dist/src/fiat/FiatKycOutcomeScreen.d.ts.map +1 -1
- package/dist/src/fiat/FiatStatusScreen.d.ts +1 -0
- package/dist/src/fiat/FiatStatusScreen.d.ts.map +1 -1
- package/dist/src/fiat/FiatStepFailedScreen.d.ts.map +1 -1
- package/dist/src/fiat/closeFailure.d.ts +4 -1
- package/dist/src/fiat/closeFailure.d.ts.map +1 -1
- package/dist/src/fiat/kycFailover.d.ts +8 -4
- package/dist/src/fiat/kycFailover.d.ts.map +1 -1
- package/dist/src/fiat/kycOptionRows.d.ts +8 -1
- package/dist/src/fiat/kycOptionRows.d.ts.map +1 -1
- package/dist/src/fiat/providerFailover.d.ts +34 -0
- package/dist/src/fiat/providerFailover.d.ts.map +1 -0
- package/dist/src/fiat/providers/adapter.d.ts +6 -0
- package/dist/src/fiat/providers/adapter.d.ts.map +1 -1
- package/dist/src/fiat/providers/coinbase/CoinbaseCheckoutSurface.d.ts +3 -1
- package/dist/src/fiat/providers/coinbase/CoinbaseCheckoutSurface.d.ts.map +1 -1
- package/dist/src/fiat/providers/coinbase/coinbaseOnrampEvents.d.ts +9 -0
- package/dist/src/fiat/providers/coinbase/coinbaseOnrampEvents.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/StripeSessionAuthScreen.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripePreparedPayment.d.ts +22 -0
- package/dist/src/fiat/providers/stripe/stripePreparedPayment.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/stripeRoundPush.d.ts +6 -0
- package/dist/src/fiat/providers/stripe/stripeRoundPush.d.ts.map +1 -1
- package/dist/src/fiat/useKycCompletion.d.ts +17 -5
- package/dist/src/fiat/useKycCompletion.d.ts.map +1 -1
- package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
- package/dist/src/flow/Drawer.d.ts.map +1 -1
- package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
- package/dist/src/flow/FlowSheet.d.ts.map +1 -1
- package/dist/src/flow/flowStepHeight.d.ts +4 -8
- package/dist/src/flow/flowStepHeight.d.ts.map +1 -1
- package/dist/src/flow/useDepositSelection.d.ts +38 -0
- package/dist/src/flow/useDepositSelection.d.ts.map +1 -0
- package/dist/src/hooks/useNestedSheet.d.ts +12 -0
- package/dist/src/hooks/useNestedSheet.d.ts.map +1 -1
- package/dist/src/icons/FunIcon.d.ts +2 -2
- package/dist/src/icons/FunIcon.d.ts.map +1 -1
- package/dist/src/icons/iconSvg.d.ts +10 -0
- package/dist/src/icons/iconSvg.d.ts.map +1 -0
- package/dist/src/logging/datadogHttpLogTransport.d.ts +20 -2
- package/dist/src/logging/datadogHttpLogTransport.d.ts.map +1 -1
- package/dist/src/logging/logger.d.ts +5 -5
- package/dist/src/logging/logger.d.ts.map +1 -1
- package/dist/src/preview/flowPreview.d.ts +4 -1
- package/dist/src/preview/flowPreview.d.ts.map +1 -1
- package/dist/src/preview/previewFetch.d.ts.map +1 -1
- package/dist/src/preview/scenarioCatalog.d.ts +20 -1
- package/dist/src/preview/scenarioCatalog.d.ts.map +1 -1
- package/dist/src/preview/scenarios.d.ts +2 -0
- package/dist/src/preview/scenarios.d.ts.map +1 -1
- package/dist/src/providers/FunkitStatsigProvider.d.ts.map +1 -1
- package/dist/src/screens/LockedTransferCryptoScreen.d.ts +11 -6
- package/dist/src/screens/LockedTransferCryptoScreen.d.ts.map +1 -1
- package/dist/src/screens/SelectAvailableChainScreen.d.ts +12 -0
- package/dist/src/screens/SelectAvailableChainScreen.d.ts.map +1 -0
- package/dist/src/screens/SelectChainScreen.d.ts.map +1 -1
- package/dist/src/screens/SelectReceiveTokenScreen.d.ts.map +1 -1
- package/dist/src/transfer/DepositQrCode.d.ts +31 -0
- package/dist/src/transfer/DepositQrCode.d.ts.map +1 -0
- package/dist/src/transfer/DepositQrGlyph.d.ts +15 -0
- package/dist/src/transfer/DepositQrGlyph.d.ts.map +1 -0
- package/dist/src/transfer/depositQrCodeUri.d.ts +8 -0
- package/dist/src/transfer/depositQrCodeUri.d.ts.map +1 -0
- package/dist/src/transfer/depositSelection.d.ts +13 -0
- package/dist/src/transfer/depositSelection.d.ts.map +1 -0
- package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -1
- package/dist/src/transfer/monoChainLogo.d.ts +20 -0
- package/dist/src/transfer/monoChainLogo.d.ts.map +1 -0
- package/dist/src/transfer/qrModules.d.ts +20 -0
- package/dist/src/transfer/qrModules.d.ts.map +1 -0
- package/dist/src/utils/assetSearch.d.ts +5 -0
- package/dist/src/utils/assetSearch.d.ts.map +1 -0
- package/dist/src/utils/tokenAndChainPicker.d.ts +2 -0
- package/dist/src/utils/tokenAndChainPicker.d.ts.map +1 -1
- package/dist/src/utils/tokenOnChainJoiner.d.ts +12 -0
- package/dist/src/utils/tokenOnChainJoiner.d.ts.map +1 -0
- package/package.json +5 -3
- package/dist/chunk-2C2OETEM.js.map +0 -7
- package/dist/chunk-ESQLFNOK.js.map +0 -7
- package/dist/chunk-ZE77GVDW.js.map +0 -7
- /package/dist/{chunk-OJN7XVWC.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-
|
|
8
|
+
} from "./chunk-OW6L3UM7.js";
|
|
9
9
|
import {
|
|
10
10
|
logger
|
|
11
|
-
} from "./chunk-
|
|
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",
|
|
@@ -993,6 +1018,21 @@ var IN_REVIEW = {
|
|
|
993
1018
|
}
|
|
994
1019
|
]
|
|
995
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
|
+
);
|
|
996
1036
|
var ON_HOLD = {
|
|
997
1037
|
state: {
|
|
998
1038
|
kind: "KYC",
|
|
@@ -1353,6 +1393,16 @@ var DEFINITIONS = {
|
|
|
1353
1393
|
captureReissued: true
|
|
1354
1394
|
}),
|
|
1355
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
|
+
),
|
|
1356
1406
|
"kyc.completion.hold": fiat({ step: ON_HOLD, kycCompletion: "hold" }),
|
|
1357
1407
|
"kyc.completion.restricted": fiat({
|
|
1358
1408
|
step: REJECTED,
|
|
@@ -1458,6 +1508,12 @@ var DEFINITIONS = {
|
|
|
1458
1508
|
seed: { deposit: { screen: "transfer", chainId: "8453" } },
|
|
1459
1509
|
backend: {}
|
|
1460
1510
|
},
|
|
1511
|
+
"deposit.lockedTransfer": {
|
|
1512
|
+
seed: {
|
|
1513
|
+
deposit: { screen: "transfer", chainId: "8453", sourceSymbol: "USDC" }
|
|
1514
|
+
},
|
|
1515
|
+
backend: {}
|
|
1516
|
+
},
|
|
1461
1517
|
"withdraw.method": { seed: { withdrawal: {} }, backend: {} },
|
|
1462
1518
|
"withdraw.amount": {
|
|
1463
1519
|
seed: {
|
|
@@ -1679,7 +1735,7 @@ function unservedAmount(ranges) {
|
|
|
1679
1735
|
function isStepResponse(response) {
|
|
1680
1736
|
return "state" in response;
|
|
1681
1737
|
}
|
|
1682
|
-
function routingTable(quote, minimum, ranges, search) {
|
|
1738
|
+
function routingTable(quote, minimum, ranges, search, currentLimit) {
|
|
1683
1739
|
const limits = quote.state.kind === "QUOTE" ? quote.state.limits : void 0;
|
|
1684
1740
|
const provider = "provider" in quote ? quote.provider : "MOONPAY";
|
|
1685
1741
|
const spans = ranges?.map(([min, max, userMax]) => [min, userMax ?? max]) ?? [[minimum ?? limits?.min ?? 1, limits?.max ?? 1e6]];
|
|
@@ -1691,7 +1747,14 @@ function routingTable(quote, minimum, ranges, search) {
|
|
|
1691
1747
|
intervals: spans.map(([min, max]) => ({
|
|
1692
1748
|
min: Number(min).toFixed(2),
|
|
1693
1749
|
max: Number(max).toFixed(2),
|
|
1694
|
-
providers: [
|
|
1750
|
+
providers: [
|
|
1751
|
+
{
|
|
1752
|
+
provider,
|
|
1753
|
+
next: "READY",
|
|
1754
|
+
visibility: "COMPLETE",
|
|
1755
|
+
...currentLimit === void 0 ? {} : { currentLimit }
|
|
1756
|
+
}
|
|
1757
|
+
]
|
|
1695
1758
|
}))
|
|
1696
1759
|
}))
|
|
1697
1760
|
};
|
|
@@ -1703,12 +1766,13 @@ function createPreviewFetch(scenario, passThrough) {
|
|
|
1703
1766
|
minimum,
|
|
1704
1767
|
noRoute: noRouteReason,
|
|
1705
1768
|
ranges,
|
|
1706
|
-
providers
|
|
1769
|
+
providers,
|
|
1770
|
+
currentLimit
|
|
1707
1771
|
} = scenario.backend;
|
|
1708
1772
|
const answer = (path, method, amount, search, asked) => {
|
|
1709
1773
|
if (path.endsWith("/fiat/routing/table")) {
|
|
1710
1774
|
return json(
|
|
1711
|
-
providers === void 0 ? routingTable(quote, minimum, ranges, search) : providersTable(providers, search)
|
|
1775
|
+
providers === void 0 ? routingTable(quote, minimum, ranges, search, currentLimit) : providersTable(providers, search)
|
|
1712
1776
|
);
|
|
1713
1777
|
}
|
|
1714
1778
|
const isQuote = method === "POST" && (path.endsWith("/fiat/quote") || path.endsWith("/fiat/routing/quote"));
|