@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.
- package/CHANGELOG.md +57 -0
- package/README.md +5 -3
- package/dist/{chunk-RPYWTS42.js → chunk-5DJHIA7X.js} +97 -105
- package/dist/chunk-5DJHIA7X.js.map +7 -0
- package/dist/{chunk-5Y2EMQYX.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-OBY3O4LU.js → chunk-OW6L3UM7.js} +3 -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 +5057 -3771
- package/dist/index.js.map +4 -4
- package/dist/preview.js +113 -6
- package/dist/preview.js.map +2 -2
- package/dist/src/components/AmountDisplay.d.ts +2 -2
- package/dist/src/components/AmountDisplay.d.ts.map +1 -1
- 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/PasteAddressPanel.d.ts +16 -0
- package/dist/src/components/PasteAddressPanel.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/components/WalletAddressInput.d.ts +23 -10
- package/dist/src/components/WalletAddressInput.d.ts.map +1 -1
- package/dist/src/components/WithdrawSourceCard.d.ts +13 -2
- package/dist/src/components/WithdrawSourceCard.d.ts.map +1 -1
- 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 +7 -3
- 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 +8 -1
- 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/moonpay/moonpay.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/StripeSessionAuthScreen.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripeLinkWarmup.d.ts +29 -0
- package/dist/src/fiat/providers/stripe/stripeLinkWarmup.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/stripePayment.d.ts +1 -1
- package/dist/src/fiat/providers/stripe/stripePayment.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/providers/stripe/useStripeOnrampClient.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/FigmaSystemIcons.d.ts +1 -0
- package/dist/src/icons/FigmaSystemIcons.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/HandTapIcon.d.ts +4 -0
- package/dist/src/icons/HandTapIcon.d.ts.map +1 -0
- 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 +7 -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 +34 -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/screens/WithdrawAddressScreen.d.ts +6 -1
- package/dist/src/screens/WithdrawAddressScreen.d.ts.map +1 -1
- package/dist/src/screens/WithdrawAmountScreen.d.ts +6 -1
- package/dist/src/screens/WithdrawAmountScreen.d.ts.map +1 -1
- package/dist/src/screens/WithdrawCryptoSteps.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/useLockedTokenAmount.d.ts +2 -0
- package/dist/src/transfer/hooks/useLockedTokenAmount.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -1
- package/dist/src/transfer/lockedTokenAmount.d.ts +13 -0
- package/dist/src/transfer/lockedTokenAmount.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/formatAmount.d.ts +4 -3
- package/dist/src/utils/formatAmount.d.ts.map +1 -1
- 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/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts +1 -0
- package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts.map +1 -1
- package/dist/src/withdrawal/useWithdrawalSourceTokenBalance.d.ts +11 -2
- package/dist/src/withdrawal/useWithdrawalSourceTokenBalance.d.ts.map +1 -1
- package/package.json +6 -4
- package/dist/chunk-OBY3O4LU.js.map +0 -7
- package/dist/chunk-RPYWTS42.js.map +0 -7
- package/dist/chunk-ZE77GVDW.js.map +0 -7
- /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-
|
|
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",
|
|
@@ -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: [
|
|
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"));
|