@funkit/connect-rn 11.1.0 → 11.3.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 +82 -0
- package/dist/{chunk-QIDFAWW4.js → chunk-7SP2UUHA.js} +9 -2
- package/dist/chunk-7SP2UUHA.js.map +7 -0
- package/dist/{chunk-N626N462.js → chunk-AXAQRGDI.js} +2 -2
- package/dist/{chunk-S7UN7EKL.js → chunk-KRQW5S2X.js} +25 -25
- package/dist/chunk-KRQW5S2X.js.map +7 -0
- package/dist/clients/lighter.js +1 -1
- package/dist/clients/nado.js +2 -2
- package/dist/index.js +28244 -21969
- package/dist/index.js.map +4 -4
- package/dist/preview.js +115 -7
- package/dist/preview.js.map +4 -4
- package/dist/src/fiat/common/FiatUnsupportedStep.d.ts.map +1 -1
- package/dist/src/fiat/contact/FiatContactScreen.d.ts.map +1 -1
- package/dist/src/fiat/contact/phoneRegionRedirect.d.ts +17 -0
- package/dist/src/fiat/contact/phoneRegionRedirect.d.ts.map +1 -0
- package/dist/src/fiat/contact/useRedirectHold.d.ts +31 -0
- package/dist/src/fiat/contact/useRedirectHold.d.ts.map +1 -0
- package/dist/src/fiat/entry/useCaptureHold.d.ts +1 -0
- package/dist/src/fiat/entry/useCaptureHold.d.ts.map +1 -1
- package/dist/src/fiat/kyc/kycCapture.d.ts.map +1 -1
- package/dist/src/fiat/kyc/kycForm.d.ts +1 -0
- package/dist/src/fiat/kyc/kycForm.d.ts.map +1 -1
- package/dist/src/fiat/kyc/useKycScreens.d.ts +1 -0
- package/dist/src/fiat/kyc/useKycScreens.d.ts.map +1 -1
- package/dist/src/fiat/otp/useFunSession.d.ts +3 -0
- package/dist/src/fiat/otp/useFunSession.d.ts.map +1 -1
- package/dist/src/fiat/payment/failoverKind.d.ts +10 -12
- package/dist/src/fiat/payment/failoverKind.d.ts.map +1 -1
- package/dist/src/fiat/payment/failoverPrompt.d.ts +2 -7
- package/dist/src/fiat/payment/failoverPrompt.d.ts.map +1 -1
- package/dist/src/fiat/payment/paymentReroute.d.ts +2 -0
- package/dist/src/fiat/payment/paymentReroute.d.ts.map +1 -1
- package/dist/src/fiat/payment/providerFailover.d.ts +20 -8
- package/dist/src/fiat/payment/providerFailover.d.ts.map +1 -1
- package/dist/src/fiat/payment/usePaymentFailureAnswer.d.ts +7 -6
- package/dist/src/fiat/payment/usePaymentFailureAnswer.d.ts.map +1 -1
- package/dist/src/fiat/providerFlow.d.ts +15 -3
- package/dist/src/fiat/providerFlow.d.ts.map +1 -1
- package/dist/src/fiat/providerFlows.d.ts.map +1 -1
- package/dist/src/fiat/providerHandoff.d.ts +10 -2
- package/dist/src/fiat/providerHandoff.d.ts.map +1 -1
- package/dist/src/fiat/providers/adapter.d.ts +2 -0
- package/dist/src/fiat/providers/adapter.d.ts.map +1 -1
- package/dist/src/fiat/providers/applePayPaintGate.d.ts +4 -0
- package/dist/src/fiat/providers/applePayPaintGate.d.ts.map +1 -1
- package/dist/src/fiat/providers/checkout/statusScreens.d.ts +3 -1
- package/dist/src/fiat/providers/checkout/statusScreens.d.ts.map +1 -1
- package/dist/src/fiat/providers/checkout/useFiatNextApi.d.ts +4 -2
- package/dist/src/fiat/providers/checkout/useFiatNextApi.d.ts.map +1 -1
- package/dist/src/fiat/providers/coinbase/next/Checkout.d.ts.map +1 -1
- package/dist/src/fiat/providers/coinbase/next/useCoinbaseCheckout.d.ts +1 -1
- package/dist/src/fiat/providers/coinbase/next/useCoinbaseCheckout.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/errors.d.ts +12 -6
- package/dist/src/fiat/providers/moonpay/errors.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/events.d.ts +16 -1
- package/dist/src/fiat/providers/moonpay/events.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/fullCheckout/Checkout.d.ts +4 -0
- package/dist/src/fiat/providers/moonpay/fullCheckout/Checkout.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/fullCheckout/checkoutScreens.d.ts +12 -0
- package/dist/src/fiat/providers/moonpay/fullCheckout/checkoutScreens.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/{sdk → fullCheckout}/connection.d.ts +4 -2
- package/dist/src/fiat/providers/moonpay/fullCheckout/connection.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/fullCheckout/useCheckoutCalls.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/{useCheckoutModel.d.ts → fullCheckout/useCheckoutModel.d.ts} +21 -10
- package/dist/src/fiat/providers/moonpay/fullCheckout/useCheckoutModel.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/Checkout.d.ts +4 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/Checkout.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/GuestPhone.d.ts +24 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/GuestPhone.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/checkoutScreens.d.ts +7 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/checkoutScreens.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/connection.d.ts +18 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/connection.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useCheckoutCalls.d.ts +13 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useCheckoutCalls.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useGuestCheck.d.ts +34 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useGuestCheck.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useGuestCheckoutModel.d.ts +66 -0
- package/dist/src/fiat/providers/moonpay/guestCheckout/useGuestCheckoutModel.d.ts.map +1 -0
- package/dist/src/fiat/providers/moonpay/index.d.ts +2 -0
- package/dist/src/fiat/providers/moonpay/index.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/moonpayPaymentDisclosures.d.ts +18 -4
- package/dist/src/fiat/providers/moonpay/moonpayPaymentDisclosures.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/sdk/ApplePayButton.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/sdk/Challenge.d.ts +10 -1
- package/dist/src/fiat/providers/moonpay/sdk/Challenge.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/sdk/deviceQuote.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/sdk/transaction.d.ts +7 -0
- package/dist/src/fiat/providers/moonpay/sdk/transaction.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/useReadiness.d.ts +2 -2
- package/dist/src/fiat/providers/moonpay/useReadiness.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/next/Checkout.d.ts +11 -0
- package/dist/src/fiat/providers/stripe/next/Checkout.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/index.d.ts +4 -0
- package/dist/src/fiat/providers/stripe/next/index.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeCheckout.d.ts +64 -0
- package/dist/src/fiat/providers/stripe/next/useStripeCheckout.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeCheckoutCalls.d.ts +10 -0
- package/dist/src/fiat/providers/stripe/next/useStripeCheckoutCalls.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeExit.d.ts +15 -0
- package/dist/src/fiat/providers/stripe/next/useStripeExit.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeFunnel.d.ts +4 -0
- package/dist/src/fiat/providers/stripe/next/useStripeFunnel.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeIdentity.d.ts +23 -0
- package/dist/src/fiat/providers/stripe/next/useStripeIdentity.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeKycForm.d.ts +36 -0
- package/dist/src/fiat/providers/stripe/next/useStripeKycForm.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeOrderSlot.d.ts +19 -0
- package/dist/src/fiat/providers/stripe/next/useStripeOrderSlot.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripePayment.d.ts +28 -0
- package/dist/src/fiat/providers/stripe/next/useStripePayment.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeReview.d.ts +7 -0
- package/dist/src/fiat/providers/stripe/next/useStripeReview.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/next/useStripeSignIn.d.ts +21 -0
- package/dist/src/fiat/providers/stripe/next/useStripeSignIn.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/stripeAccountCreation.d.ts +16 -0
- package/dist/src/fiat/providers/stripe/stripeAccountCreation.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripeApplePaySelection.d.ts +34 -15
- package/dist/src/fiat/providers/stripe/stripeApplePaySelection.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripePayment.d.ts +6 -2
- package/dist/src/fiat/providers/stripe/stripePayment.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripeRoundPush.d.ts +2 -0
- package/dist/src/fiat/providers/stripe/stripeRoundPush.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/useApplePayFirst.d.ts +17 -6
- package/dist/src/fiat/providers/stripe/useApplePayFirst.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/useStripeKycPush.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/useStripeState.d.ts.map +1 -1
- package/dist/src/fiat/quote/providerSelection.d.ts +6 -3
- package/dist/src/fiat/quote/providerSelection.d.ts.map +1 -1
- package/dist/src/fiat/surface/ScreenSurfaceCover.d.ts +6 -1
- package/dist/src/fiat/surface/ScreenSurfaceCover.d.ts.map +1 -1
- package/dist/src/fiat/useProviderCheckout.d.ts +3 -1
- package/dist/src/fiat/useProviderCheckout.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/FunkitFlowProvider.d.ts.map +1 -1
- package/dist/src/flow/entryBanners.d.ts +8 -1
- package/dist/src/flow/entryBanners.d.ts.map +1 -1
- package/dist/src/flow/fiatStepScreens.d.ts.map +1 -1
- package/dist/src/flow/fiatSubmitRenderer.d.ts.map +1 -1
- package/dist/src/flow/renderFiatFlowScreen.d.ts.map +1 -1
- package/dist/src/flow/screenBundles.d.ts +0 -1
- package/dist/src/flow/screenBundles.d.ts.map +1 -1
- package/dist/src/flow/sheetAccessibility.d.ts +21 -0
- package/dist/src/flow/sheetAccessibility.d.ts.map +1 -0
- package/dist/src/flow/sheetSizing.d.ts.map +1 -1
- package/dist/src/flow/useV2DepositEnabled.d.ts.map +1 -1
- package/dist/src/flow/v1DepositCustomers.d.ts +2 -0
- package/dist/src/flow/v1DepositCustomers.d.ts.map +1 -0
- package/dist/src/hooks/track/events.d.ts +1 -0
- package/dist/src/hooks/track/events.d.ts.map +1 -1
- package/dist/src/preview/fixtures/moonPayChallenge.d.ts +10 -0
- package/dist/src/preview/fixtures/moonPayChallenge.d.ts.map +1 -0
- package/dist/src/preview/flowPreview.d.ts +20 -1
- package/dist/src/preview/flowPreview.d.ts.map +1 -1
- package/dist/src/preview/replay/replayFetch.d.ts.map +1 -1
- package/dist/src/preview/scenarioCatalog.d.ts +18 -0
- package/dist/src/preview/scenarioCatalog.d.ts.map +1 -1
- package/dist/src/preview/scenarios.d.ts.map +1 -1
- package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
- package/dist/src/screens/TokenAndChainPickerScreen.d.ts.map +1 -1
- package/dist/src/screens/WithdrawCryptoSteps.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-QIDFAWW4.js.map +0 -7
- package/dist/chunk-S7UN7EKL.js.map +0 -7
- package/dist/src/fiat/providers/moonpay/Checkout.d.ts +0 -4
- package/dist/src/fiat/providers/moonpay/Checkout.d.ts.map +0 -1
- package/dist/src/fiat/providers/moonpay/checkoutScreens.d.ts +0 -7
- package/dist/src/fiat/providers/moonpay/checkoutScreens.d.ts.map +0 -1
- package/dist/src/fiat/providers/moonpay/sdk/connection.d.ts.map +0 -1
- package/dist/src/fiat/providers/moonpay/unavailableAlert.d.ts +0 -11
- package/dist/src/fiat/providers/moonpay/unavailableAlert.d.ts.map +0 -1
- package/dist/src/fiat/providers/moonpay/useCheckoutCalls.d.ts.map +0 -1
- package/dist/src/fiat/providers/moonpay/useCheckoutModel.d.ts.map +0 -1
- package/dist/src/flow/v2DepositCustomers.d.ts +0 -2
- package/dist/src/flow/v2DepositCustomers.d.ts.map +0 -1
- /package/dist/{chunk-N626N462.js.map → chunk-AXAQRGDI.js.map} +0 -0
- /package/dist/src/fiat/providers/moonpay/{useCheckoutCalls.d.ts → fullCheckout/useCheckoutCalls.d.ts} +0 -0
package/dist/preview.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
PERSONA_PRIVACY_POLICY_URL,
|
|
8
8
|
TRANSACTIONS_PER_MONTH,
|
|
9
9
|
openingStep
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7SP2UUHA.js";
|
|
11
11
|
import {
|
|
12
12
|
logger
|
|
13
13
|
} from "./chunk-2HFFVYAZ.js";
|
|
@@ -258,6 +258,15 @@ var PREVIEW_SCENARIO_CATALOG = {
|
|
|
258
258
|
"fiat/contact/useContactAutoSubmit.ts"
|
|
259
259
|
]
|
|
260
260
|
},
|
|
261
|
+
"fiat.contact.redirected": {
|
|
262
|
+
title: "Contact: non-US number held for MoonPay",
|
|
263
|
+
flow: "deposit",
|
|
264
|
+
requires: "fiatRail",
|
|
265
|
+
touches: [
|
|
266
|
+
"fiat/contact/useRedirectHold.tsx",
|
|
267
|
+
"fiat/contact/phoneRegionRedirect.ts"
|
|
268
|
+
]
|
|
269
|
+
},
|
|
261
270
|
"fiat.otp.email": {
|
|
262
271
|
title: "OTP: email code",
|
|
263
272
|
flow: "deposit",
|
|
@@ -482,6 +491,26 @@ var PREVIEW_SCENARIO_CATALOG = {
|
|
|
482
491
|
"fiat/kyc/useKycCaptureRound.ts"
|
|
483
492
|
]
|
|
484
493
|
},
|
|
494
|
+
"kyc.moonpay-check.intro": {
|
|
495
|
+
title: "KYC: MoonPay checkout's intro to MoonPay's own check",
|
|
496
|
+
flow: "deposit",
|
|
497
|
+
requires: "fiatRail",
|
|
498
|
+
touches: [
|
|
499
|
+
"fiat/providers/moonpay/fullCheckout/checkoutScreens.tsx",
|
|
500
|
+
"fiat/providers/moonpay/fullCheckout/useCheckoutModel.ts",
|
|
501
|
+
"fiat/kyc/FiatKycIntroScreen.tsx"
|
|
502
|
+
]
|
|
503
|
+
},
|
|
504
|
+
"kyc.moonpay-check.again": {
|
|
505
|
+
title: "KYC: MoonPay checkout asks for additional verification",
|
|
506
|
+
flow: "deposit",
|
|
507
|
+
requires: "fiatRail",
|
|
508
|
+
touches: [
|
|
509
|
+
"fiat/providers/moonpay/fullCheckout/checkoutScreens.tsx",
|
|
510
|
+
"fiat/providers/moonpay/fullCheckout/useCheckoutModel.ts",
|
|
511
|
+
"fiat/providers/moonpay/moonpayHandoffCard.tsx"
|
|
512
|
+
]
|
|
513
|
+
},
|
|
485
514
|
"kyc.completion.review": {
|
|
486
515
|
title: "KYC completion: in review",
|
|
487
516
|
flow: "deposit",
|
|
@@ -1282,6 +1311,63 @@ var US_QUOTE = {
|
|
|
1282
1311
|
expiresAt: "2027-01-01T00:00:00Z"
|
|
1283
1312
|
};
|
|
1284
1313
|
|
|
1314
|
+
// src/preview/fixtures/moonPayChallenge.ts
|
|
1315
|
+
import {
|
|
1316
|
+
moonPayCheckoutReducer
|
|
1317
|
+
} from "@funkit/connect-core";
|
|
1318
|
+
var SESSION_TOKEN = "preview_session";
|
|
1319
|
+
function moonPayChallengeState(start, card) {
|
|
1320
|
+
const quoteInput = {
|
|
1321
|
+
source: { asset: { code: "USD" }, amount: start.checkout.amount },
|
|
1322
|
+
destination: { asset: { code: "usdc_sol" } },
|
|
1323
|
+
wallet: { address: "preview" },
|
|
1324
|
+
paymentMethod: { type: "apple_pay" },
|
|
1325
|
+
feeBehavior: "inclusive"
|
|
1326
|
+
};
|
|
1327
|
+
const challenged = {
|
|
1328
|
+
type: "DEVICE_QUOTE",
|
|
1329
|
+
input: quoteInput,
|
|
1330
|
+
quote: {
|
|
1331
|
+
signature: "preview",
|
|
1332
|
+
executable: false,
|
|
1333
|
+
challengeUrl: "https://buy-sandbox.moonpay.com/challenge"
|
|
1334
|
+
}
|
|
1335
|
+
};
|
|
1336
|
+
const events = [
|
|
1337
|
+
(state) => ({
|
|
1338
|
+
type: "STEP",
|
|
1339
|
+
call: stepCall(state),
|
|
1340
|
+
response: { next: "connect", sessionToken: SESSION_TOKEN, quoteInput }
|
|
1341
|
+
}),
|
|
1342
|
+
() => ({
|
|
1343
|
+
type: "CONNECTED",
|
|
1344
|
+
sessionToken: SESSION_TOKEN,
|
|
1345
|
+
credentials: { customerId: "preview", accessToken: "preview" }
|
|
1346
|
+
}),
|
|
1347
|
+
(state) => ({
|
|
1348
|
+
type: "STEP",
|
|
1349
|
+
call: stepCall(state),
|
|
1350
|
+
response: { next: "order", orderId: "ord_preview", quoteInput }
|
|
1351
|
+
}),
|
|
1352
|
+
() => challenged,
|
|
1353
|
+
...card === "again" ? [
|
|
1354
|
+
() => ({ type: "QUOTE_CHALLENGE_PASSED" }),
|
|
1355
|
+
() => challenged
|
|
1356
|
+
] : []
|
|
1357
|
+
];
|
|
1358
|
+
return events.reduce(
|
|
1359
|
+
(state, event) => moonPayCheckoutReducer(state, event(state)),
|
|
1360
|
+
start
|
|
1361
|
+
);
|
|
1362
|
+
}
|
|
1363
|
+
function stepCall(state) {
|
|
1364
|
+
const { call } = state;
|
|
1365
|
+
if (call === void 0 || call.action === "order") {
|
|
1366
|
+
throw new Error("preview: no step in flight");
|
|
1367
|
+
}
|
|
1368
|
+
return call;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1285
1371
|
// src/preview/scenarios.ts
|
|
1286
1372
|
var PROVIDER = "MOONPAY";
|
|
1287
1373
|
var { quoteRef } = US_QUOTE;
|
|
@@ -1633,6 +1719,11 @@ var KYC_CAPTURE = {
|
|
|
1633
1719
|
}
|
|
1634
1720
|
]
|
|
1635
1721
|
};
|
|
1722
|
+
var MOONPAY_HANDOFF = {
|
|
1723
|
+
...pricedAt("MOONPAY", "5000")(AMOUNT2),
|
|
1724
|
+
transitions: [],
|
|
1725
|
+
handoff: { provider: "MOONPAY" }
|
|
1726
|
+
};
|
|
1636
1727
|
var MOONPAY_HOSTED_CHECK = {
|
|
1637
1728
|
state: {
|
|
1638
1729
|
kind: "KYC",
|
|
@@ -1987,6 +2078,12 @@ var DEFINITIONS = {
|
|
|
1987
2078
|
{ pressEntry: true },
|
|
1988
2079
|
{ quote: pricedQuote({ phone: { type: "TEXT" } }) }
|
|
1989
2080
|
),
|
|
2081
|
+
"fiat.contact.redirected": fiat({
|
|
2082
|
+
redirectHold: {
|
|
2083
|
+
fields: [{ name: "phoneNumber", kind: "PHONE" }],
|
|
2084
|
+
contacts: { phone: "+33612345678" }
|
|
2085
|
+
}
|
|
2086
|
+
}),
|
|
1990
2087
|
"fiat.otp.email": fiat({ step: otp("EMAIL_OTP") }),
|
|
1991
2088
|
"fiat.otp.sms": fiat({ step: otp("SMS_OTP") }),
|
|
1992
2089
|
"fiat.funauth.email": fiat({ pressEntry: true }, { quote: FUN_AUTH_EMAIL }),
|
|
@@ -2069,6 +2166,16 @@ var DEFINITIONS = {
|
|
|
2069
2166
|
captureReissued: true,
|
|
2070
2167
|
moonPayCaptureRedoing: true
|
|
2071
2168
|
}),
|
|
2169
|
+
// The quote hands off to MoonPay's own checkout, seeded at MoonPay's extra check: the preview's
|
|
2170
|
+
// backend answers no `/fiat/next`.
|
|
2171
|
+
"kyc.moonpay-check.intro": fiat(
|
|
2172
|
+
{ moonPayChallenge: (start) => moonPayChallengeState(start, "intro") },
|
|
2173
|
+
{ quote: MOONPAY_HANDOFF }
|
|
2174
|
+
),
|
|
2175
|
+
"kyc.moonpay-check.again": fiat(
|
|
2176
|
+
{ moonPayChallenge: (start) => moonPayChallengeState(start, "again") },
|
|
2177
|
+
{ quote: MOONPAY_HANDOFF }
|
|
2178
|
+
),
|
|
2072
2179
|
"kyc.completion.review": fiat({ step: IN_REVIEW, kycCompletion: "review" }),
|
|
2073
2180
|
// The pending card at once, with "Deposit max" at the table's current limit.
|
|
2074
2181
|
"kyc.review.extended": submittedInto(
|
|
@@ -2344,7 +2451,7 @@ var DEFINITIONS = {
|
|
|
2344
2451
|
]
|
|
2345
2452
|
}
|
|
2346
2453
|
),
|
|
2347
|
-
// A prepaid decline with nobody else to take it:
|
|
2454
|
+
// A prepaid decline with nobody else to take it: Continue's switch lands back at Coinbase.
|
|
2348
2455
|
"fiat.prepaidDeclinedAlone": fiat(
|
|
2349
2456
|
{
|
|
2350
2457
|
amount: AMOUNT2,
|
|
@@ -2658,7 +2765,7 @@ var PREVIEW_SCENARIOS = Object.fromEntries(
|
|
|
2658
2765
|
var DEFAULT_PREVIEW_QUOTE = PRICED;
|
|
2659
2766
|
|
|
2660
2767
|
// src/preview/previewFetch.ts
|
|
2661
|
-
import {
|
|
2768
|
+
import { FROG_API_BASE_URL, getApiBaseUrl } from "@funkit/api-base";
|
|
2662
2769
|
var json = (body, status = 200) => new Response(JSON.stringify(body), {
|
|
2663
2770
|
status,
|
|
2664
2771
|
headers: { "Content-Type": "application/json" }
|
|
@@ -2898,7 +3005,7 @@ function createPreviewFetch(scenario, passThrough, { quoteDelayMs = 0 } = {}) {
|
|
|
2898
3005
|
current = listed ?? current ?? quote;
|
|
2899
3006
|
return json(current);
|
|
2900
3007
|
};
|
|
2901
|
-
const fiatApi = `${
|
|
3008
|
+
const fiatApi = `${getApiBaseUrl()}/fiat/`;
|
|
2902
3009
|
const currencyLookup = `${FROG_API_BASE_URL}/api/swapped/supportedCountries`;
|
|
2903
3010
|
return async (input, init) => {
|
|
2904
3011
|
const url = input instanceof Request ? input.url : String(input);
|
|
@@ -2934,7 +3041,7 @@ function createPreviewFetch(scenario, passThrough, { quoteDelayMs = 0 } = {}) {
|
|
|
2934
3041
|
}
|
|
2935
3042
|
|
|
2936
3043
|
// src/preview/replay/replayFetch.ts
|
|
2937
|
-
import {
|
|
3044
|
+
import { getApiBaseUrl as getApiBaseUrl2 } from "@funkit/api-base";
|
|
2938
3045
|
var REPLAY_EXPIRY_MS = 15 * 6e4;
|
|
2939
3046
|
function unexpired(value) {
|
|
2940
3047
|
if (Array.isArray(value)) {
|
|
@@ -3021,7 +3128,8 @@ function createReplayFetch(tape, passThrough, { wait = sleep, from = 0, onOffTap
|
|
|
3021
3128
|
return repeat === -1 ? tape.responses.findIndex(unserved) : repeat;
|
|
3022
3129
|
};
|
|
3023
3130
|
let leftTape = false;
|
|
3024
|
-
const
|
|
3131
|
+
const apiBaseUrl = getApiBaseUrl2();
|
|
3132
|
+
const fiatApi = `${apiBaseUrl}/fiat/`;
|
|
3025
3133
|
return async (input, init) => {
|
|
3026
3134
|
const url = input instanceof Request ? input.url : String(input);
|
|
3027
3135
|
if (!url.startsWith(fiatApi)) {
|
|
@@ -3032,7 +3140,7 @@ function createReplayFetch(tape, passThrough, { wait = sleep, from = 0, onOffTap
|
|
|
3032
3140
|
}
|
|
3033
3141
|
const method = (init?.method ?? (input instanceof Request ? input.method : "GET")).toUpperCase();
|
|
3034
3142
|
const { pathname, searchParams } = new URL(url);
|
|
3035
|
-
const endpoint = `${method} ${url.slice(
|
|
3143
|
+
const endpoint = `${method} ${url.slice(apiBaseUrl.length).split("?")[0]}`;
|
|
3036
3144
|
const sent = init?.body === void 0 && input instanceof Request ? { ...init, body: await input.clone().text() } : init;
|
|
3037
3145
|
const isQuote = QUOTE.test(pathname);
|
|
3038
3146
|
const asked = isQuote ? requestedProviders(sent) : void 0;
|