@funkit/connect-rn 9.2.0 → 9.4.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 +141 -0
- package/README.md +23 -0
- package/dist/{chunk-AI6F43VP.js → chunk-7EDY3KSV.js} +2 -2
- package/dist/chunk-7EDY3KSV.js.map +7 -0
- package/dist/{chunk-5DJHIA7X.js → chunk-EKU6Y6IC.js} +365 -92
- package/dist/chunk-EKU6Y6IC.js.map +7 -0
- package/dist/{chunk-OW6L3UM7.js → chunk-FAEJVOAC.js} +4 -1
- package/dist/chunk-FAEJVOAC.js.map +7 -0
- package/dist/clients/lighter.js +1 -1
- package/dist/clients/lighter.js.map +1 -1
- package/dist/clients/nado.js +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19948 -15445
- package/dist/index.js.map +4 -4
- package/dist/preview.js +224 -34
- package/dist/preview.js.map +2 -2
- package/dist/src/components/Grabber.d.ts +3 -1
- package/dist/src/components/Grabber.d.ts.map +1 -1
- package/dist/src/components/InfoTooltip.d.ts.map +1 -1
- package/dist/src/components/v2/FeeLine.d.ts +35 -0
- package/dist/src/components/v2/FeeLine.d.ts.map +1 -0
- package/dist/src/components/v2/IconDisc.d.ts +14 -0
- package/dist/src/components/v2/IconDisc.d.ts.map +1 -0
- package/dist/src/components/v2/ListRow.d.ts +29 -0
- package/dist/src/components/v2/ListRow.d.ts.map +1 -0
- package/dist/src/fiat/FiatContactScreen.d.ts.map +1 -1
- package/dist/src/fiat/FiatFormFieldRow.d.ts +1 -1
- package/dist/src/fiat/FiatFormFieldRow.d.ts.map +1 -1
- package/dist/src/fiat/FiatFormScreen.d.ts.map +1 -1
- package/dist/src/fiat/FiatKycPhoneField.d.ts.map +1 -1
- package/dist/src/fiat/FiatOtpScreen.d.ts.map +1 -1
- package/dist/src/fiat/FiatSsnField.d.ts.map +1 -1
- package/dist/src/fiat/FiatUnsupportedStep.d.ts.map +1 -1
- package/dist/src/fiat/KycGlassBackdrop.d.ts.map +1 -1
- package/dist/src/fiat/SurfaceSlot.d.ts.map +1 -1
- package/dist/src/fiat/actionSlot.d.ts +51 -0
- package/dist/src/fiat/actionSlot.d.ts.map +1 -0
- package/dist/src/fiat/applePayAttempt.d.ts +25 -0
- package/dist/src/fiat/applePayAttempt.d.ts.map +1 -0
- package/dist/src/fiat/contactRound.d.ts +33 -0
- package/dist/src/fiat/contactRound.d.ts.map +1 -0
- package/dist/src/fiat/depositOutcome.d.ts +2 -3
- package/dist/src/fiat/depositOutcome.d.ts.map +1 -1
- package/dist/src/fiat/depositProcessing.d.ts +20 -0
- package/dist/src/fiat/depositProcessing.d.ts.map +1 -0
- package/dist/src/fiat/depositSettlement.d.ts +18 -0
- package/dist/src/fiat/depositSettlement.d.ts.map +1 -0
- package/dist/src/fiat/fieldLimits.d.ts +13 -0
- package/dist/src/fiat/fieldLimits.d.ts.map +1 -0
- package/dist/src/fiat/kyc/fieldLabel.d.ts.map +1 -0
- package/dist/src/fiat/{formScreenProps.d.ts → kyc/formScreenProps.d.ts} +1 -1
- package/dist/src/fiat/kyc/formScreenProps.d.ts.map +1 -0
- package/dist/src/fiat/{formValidationError.d.ts → kyc/formValidationError.d.ts} +1 -1
- package/dist/src/fiat/kyc/formValidationError.d.ts.map +1 -0
- package/dist/src/fiat/kyc/isAdditionalKycForm.d.ts.map +1 -0
- package/dist/src/fiat/kyc/kycCapture.d.ts +13 -0
- package/dist/src/fiat/kyc/kycCapture.d.ts.map +1 -0
- package/dist/src/fiat/kyc/kycCopy.d.ts +21 -0
- package/dist/src/fiat/kyc/kycCopy.d.ts.map +1 -0
- package/dist/src/fiat/{kycFailover.d.ts → kyc/kycFailover.d.ts} +1 -1
- package/dist/src/fiat/kyc/kycFailover.d.ts.map +1 -0
- package/dist/src/fiat/kyc/kycFieldValidators.d.ts.map +1 -0
- package/dist/src/fiat/kyc/kycForm.d.ts +39 -0
- package/dist/src/fiat/kyc/kycForm.d.ts.map +1 -0
- package/dist/src/fiat/{kycFormAttempt.d.ts → kyc/kycFormAttempt.d.ts} +1 -1
- package/dist/src/fiat/kyc/kycFormAttempt.d.ts.map +1 -0
- package/dist/src/fiat/kyc/kycFormState.d.ts.map +1 -0
- package/dist/src/fiat/{kycOptionRows.d.ts → kyc/kycOptionRows.d.ts} +1 -1
- package/dist/src/fiat/kyc/kycOptionRows.d.ts.map +1 -0
- package/dist/src/fiat/kyc/kycRoutes.d.ts +34 -0
- package/dist/src/fiat/kyc/kycRoutes.d.ts.map +1 -0
- package/dist/src/fiat/kyc/kycVerdict.d.ts +34 -0
- package/dist/src/fiat/kyc/kycVerdict.d.ts.map +1 -0
- package/dist/src/fiat/kyc/kycWait.d.ts.map +1 -0
- package/dist/src/fiat/{sectionDetail.d.ts → kyc/sectionDetail.d.ts} +1 -1
- package/dist/src/fiat/kyc/sectionDetail.d.ts.map +1 -0
- package/dist/src/fiat/kyc/useKycCaptureRound.d.ts.map +1 -0
- package/dist/src/fiat/{useKycCompletion.d.ts → kyc/useKycCompletion.d.ts} +1 -1
- package/dist/src/fiat/kyc/useKycCompletion.d.ts.map +1 -0
- package/dist/src/fiat/kyc/useKycFormFailure.d.ts +16 -0
- package/dist/src/fiat/kyc/useKycFormFailure.d.ts.map +1 -0
- package/dist/src/fiat/{useKycRoundReporting.d.ts → kyc/useKycRoundReporting.d.ts} +1 -1
- package/dist/src/fiat/kyc/useKycRoundReporting.d.ts.map +1 -0
- package/dist/src/fiat/kyc/useKycScreens.d.ts +48 -0
- package/dist/src/fiat/kyc/useKycScreens.d.ts.map +1 -0
- package/dist/src/fiat/kyc/useKycThreshold.d.ts +15 -0
- package/dist/src/fiat/kyc/useKycThreshold.d.ts.map +1 -0
- package/dist/src/fiat/paymentAttempts.d.ts +79 -0
- package/dist/src/fiat/paymentAttempts.d.ts.map +1 -0
- package/dist/src/fiat/paymentReroute.d.ts +28 -1
- package/dist/src/fiat/paymentReroute.d.ts.map +1 -1
- package/dist/src/fiat/paymentSurfaceFailure.d.ts +5 -4
- package/dist/src/fiat/paymentSurfaceFailure.d.ts.map +1 -1
- package/dist/src/fiat/processing/CompletionCheck.d.ts +12 -0
- package/dist/src/fiat/processing/CompletionCheck.d.ts.map +1 -0
- package/dist/src/fiat/processing/CompletionWave.d.ts +17 -0
- package/dist/src/fiat/processing/CompletionWave.d.ts.map +1 -0
- package/dist/src/fiat/processing/DepositCardSheet.d.ts +25 -0
- package/dist/src/fiat/processing/DepositCardSheet.d.ts.map +1 -0
- package/dist/src/fiat/processing/DepositProcessingCard.d.ts +22 -0
- package/dist/src/fiat/processing/DepositProcessingCard.d.ts.map +1 -0
- package/dist/src/fiat/processing/ProcessingAurora.d.ts +13 -0
- package/dist/src/fiat/processing/ProcessingAurora.d.ts.map +1 -0
- package/dist/src/fiat/processing/ProcessingFailure.d.ts +26 -0
- package/dist/src/fiat/processing/ProcessingFailure.d.ts.map +1 -0
- package/dist/src/fiat/processing/ProcessingOptionIcons.d.ts +21 -0
- package/dist/src/fiat/processing/ProcessingOptionIcons.d.ts.map +1 -0
- package/dist/src/fiat/processing/ProcessingProgress.d.ts +7 -0
- package/dist/src/fiat/processing/ProcessingProgress.d.ts.map +1 -0
- package/dist/src/fiat/processing/RevealText.d.ts +16 -0
- package/dist/src/fiat/processing/RevealText.d.ts.map +1 -0
- package/dist/src/fiat/processing/cardSurface.d.ts +65 -0
- package/dist/src/fiat/processing/cardSurface.d.ts.map +1 -0
- package/dist/src/fiat/processing/cornerRadius.d.ts +13 -0
- package/dist/src/fiat/processing/cornerRadius.d.ts.map +1 -0
- package/dist/src/fiat/processing/gradientPuff.d.ts +18 -0
- package/dist/src/fiat/processing/gradientPuff.d.ts.map +1 -0
- package/dist/src/fiat/processing/pressureWave.d.ts +23 -0
- package/dist/src/fiat/processing/pressureWave.d.ts.map +1 -0
- package/dist/src/fiat/processing/skiaPeer.d.ts +15 -0
- package/dist/src/fiat/processing/skiaPeer.d.ts.map +1 -0
- package/dist/src/fiat/providers/adapter.d.ts +10 -3
- package/dist/src/fiat/providers/adapter.d.ts.map +1 -1
- package/dist/src/fiat/providers/applePayPaintGate.d.ts.map +1 -1
- package/dist/src/fiat/providers/coinbase/CoinbaseCheckoutSurface.d.ts +4 -1
- package/dist/src/fiat/providers/coinbase/CoinbaseCheckoutSurface.d.ts.map +1 -1
- package/dist/src/fiat/providers/coinbase/CoinbaseWarmup.d.ts.map +1 -1
- package/dist/src/fiat/providers/coinbase/coinbaseOnrampEvents.d.ts +6 -1
- package/dist/src/fiat/providers/coinbase/coinbaseOnrampEvents.d.ts.map +1 -1
- package/dist/src/fiat/providers/coinbase/coinbasePreparedPayment.d.ts +7 -1
- package/dist/src/fiat/providers/coinbase/coinbasePreparedPayment.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/moonpay.d.ts.map +1 -1
- package/dist/src/fiat/providers/moonpay/moonpayCardRefusal.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripeApplePayReady.d.ts +5 -1
- package/dist/src/fiat/providers/stripe/stripeApplePayReady.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripeKyc.d.ts +9 -1
- package/dist/src/fiat/providers/stripe/stripeKyc.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripeLinkWarmup.d.ts +12 -0
- package/dist/src/fiat/providers/stripe/stripeLinkWarmup.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripePayment.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/stripeRoundPush.d.ts +9 -0
- package/dist/src/fiat/providers/stripe/stripeRoundPush.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/useCreateStripeAccountWithExistingUserData.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/useStripeKycFailover.d.ts +5 -0
- package/dist/src/fiat/providers/stripe/useStripeKycFailover.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/useStripeKycPush.d.ts +20 -0
- package/dist/src/fiat/providers/stripe/useStripeKycPush.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/useStripeSessionAuth.d.ts +18 -1
- package/dist/src/fiat/providers/stripe/useStripeSessionAuth.d.ts.map +1 -1
- package/dist/src/fiat/providers/stripe/useStripeSheets.d.ts +9 -0
- package/dist/src/fiat/providers/stripe/useStripeSheets.d.ts.map +1 -0
- package/dist/src/fiat/providers/stripe/useStripeState.d.ts +7 -0
- package/dist/src/fiat/providers/stripe/useStripeState.d.ts.map +1 -0
- package/dist/src/fiat/providers/transak/TransakApplePaySurface.d.ts.map +1 -1
- package/dist/src/fiat/quoteRouting.d.ts +59 -0
- package/dist/src/fiat/quoteRouting.d.ts.map +1 -0
- package/dist/src/fiat/sessionAuth.d.ts +8 -0
- package/dist/src/fiat/sessionAuth.d.ts.map +1 -0
- package/dist/src/fiat/shownFieldIssues.d.ts +1 -1
- package/dist/src/fiat/shownFieldIssues.d.ts.map +1 -1
- package/dist/src/fiat/stepSurface.d.ts +36 -0
- package/dist/src/fiat/stepSurface.d.ts.map +1 -0
- package/dist/src/fiat/{renderCaptureSurface.d.ts → surfaceRegistry.d.ts} +5 -5
- package/dist/src/fiat/surfaceRegistry.d.ts.map +1 -0
- package/dist/src/fiat/useAuthHandoff.d.ts +17 -0
- package/dist/src/fiat/useAuthHandoff.d.ts.map +1 -0
- package/dist/src/fiat/useCaptureHold.d.ts +22 -0
- package/dist/src/fiat/useCaptureHold.d.ts.map +1 -0
- package/dist/src/fiat/useContactAutoSubmit.d.ts.map +1 -1
- package/dist/src/fiat/useDatePickerDock.d.ts.map +1 -1
- package/dist/src/fiat/useDepositSettlement.d.ts +35 -0
- package/dist/src/fiat/useDepositSettlement.d.ts.map +1 -0
- package/dist/src/fiat/useEntryQuote.d.ts +25 -0
- package/dist/src/fiat/useEntryQuote.d.ts.map +1 -0
- package/dist/src/fiat/useEntrySubmit.d.ts +24 -0
- package/dist/src/fiat/useEntrySubmit.d.ts.map +1 -0
- package/dist/src/fiat/useFailureAnnouncements.d.ts +17 -0
- package/dist/src/fiat/useFailureAnnouncements.d.ts.map +1 -0
- package/dist/src/fiat/useIdentityAssertion.d.ts +2 -6
- package/dist/src/fiat/useIdentityAssertion.d.ts.map +1 -1
- package/dist/src/fiat/usePaymentAttempts.d.ts +24 -0
- package/dist/src/fiat/usePaymentAttempts.d.ts.map +1 -0
- package/dist/src/fiat/usePaymentFailureAnswer.d.ts +40 -22
- package/dist/src/fiat/usePaymentFailureAnswer.d.ts.map +1 -1
- package/dist/src/fiat/useProcessingPhase.d.ts +4 -0
- package/dist/src/fiat/useProcessingPhase.d.ts.map +1 -0
- package/dist/src/fiat/useReplayableFailure.d.ts.map +1 -1
- package/dist/src/fiat/useRerouteProbe.d.ts +24 -0
- package/dist/src/fiat/useRerouteProbe.d.ts.map +1 -0
- package/dist/src/fiat/useStaleQuoteRecovery.d.ts +16 -0
- package/dist/src/fiat/useStaleQuoteRecovery.d.ts.map +1 -1
- package/dist/src/fiat/useStandingRefusals.d.ts +1 -1
- package/dist/src/fiat/useStandingRefusals.d.ts.map +1 -1
- package/dist/src/fiat/useSurfaceAttempt.d.ts +24 -0
- package/dist/src/fiat/useSurfaceAttempt.d.ts.map +1 -0
- package/dist/src/flow/CryptoAddressPage.d.ts +29 -0
- package/dist/src/flow/CryptoAddressPage.d.ts.map +1 -0
- package/dist/src/flow/CryptoDepositStep.d.ts +33 -0
- package/dist/src/flow/CryptoDepositStep.d.ts.map +1 -0
- package/dist/src/flow/CryptoListPage.d.ts +17 -0
- package/dist/src/flow/CryptoListPage.d.ts.map +1 -0
- package/dist/src/flow/CryptoNetworkPage.d.ts +12 -0
- package/dist/src/flow/CryptoNetworkPage.d.ts.map +1 -0
- package/dist/src/flow/CryptoTokenPage.d.ts +15 -0
- package/dist/src/flow/CryptoTokenPage.d.ts.map +1 -0
- package/dist/src/flow/DepositAmountStep.d.ts.map +1 -1
- package/dist/src/flow/DepositFlowContent.d.ts +1 -4
- package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
- package/dist/src/flow/DepositMatchSheet.d.ts.map +1 -1
- package/dist/src/flow/Drawer.d.ts +24 -2
- package/dist/src/flow/Drawer.d.ts.map +1 -1
- package/dist/src/flow/FiatDepositAmountStep.d.ts +1 -11
- package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
- package/dist/src/flow/FlowSheet.d.ts +12 -2
- package/dist/src/flow/FlowSheet.d.ts.map +1 -1
- package/dist/src/flow/FunkitFlowProvider.d.ts +21 -2
- package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
- package/dist/src/flow/SheetMaterial.d.ts +37 -1
- package/dist/src/flow/SheetMaterial.d.ts.map +1 -1
- package/dist/src/flow/WithdrawalFlowContent.d.ts.map +1 -1
- package/dist/src/flow/cryptoDepositFlow.d.ts +81 -0
- package/dist/src/flow/cryptoDepositFlow.d.ts.map +1 -0
- package/dist/src/flow/cryptoSheetSearch.d.ts +10 -0
- package/dist/src/flow/cryptoSheetSearch.d.ts.map +1 -0
- package/dist/src/flow/cryptoTokenList.d.ts +39 -0
- package/dist/src/flow/cryptoTokenList.d.ts.map +1 -0
- package/dist/src/flow/cryptoTokenPick.d.ts +16 -0
- package/dist/src/flow/cryptoTokenPick.d.ts.map +1 -0
- package/dist/src/flow/depositFlowConfig.d.ts +7 -0
- package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
- package/dist/src/flow/entryBanners.d.ts +29 -0
- package/dist/src/flow/entryBanners.d.ts.map +1 -0
- package/dist/src/flow/fiatStepScreens.d.ts +30 -0
- package/dist/src/flow/fiatStepScreens.d.ts.map +1 -0
- package/dist/src/flow/fiatSubmitRenderer.d.ts +103 -0
- package/dist/src/flow/fiatSubmitRenderer.d.ts.map +1 -0
- package/dist/src/flow/renderFiatFlowScreen.d.ts +99 -0
- package/dist/src/flow/renderFiatFlowScreen.d.ts.map +1 -0
- package/dist/src/flow/screenBundles.d.ts +49 -0
- package/dist/src/flow/screenBundles.d.ts.map +1 -0
- package/dist/src/flow/selectedChainStorage.d.ts +9 -0
- package/dist/src/flow/selectedChainStorage.d.ts.map +1 -1
- package/dist/src/flow/sheetPressHold.d.ts.map +1 -1
- package/dist/src/flow/sheetSizing.d.ts +26 -0
- package/dist/src/flow/sheetSizing.d.ts.map +1 -1
- package/dist/src/flow/storedChain.d.ts +7 -2
- package/dist/src/flow/storedChain.d.ts.map +1 -1
- package/dist/src/flow/useFeeDetails.d.ts +19 -0
- package/dist/src/flow/useFeeDetails.d.ts.map +1 -0
- package/dist/src/hooks/track/events.d.ts +29 -0
- package/dist/src/hooks/track/events.d.ts.map +1 -0
- package/dist/src/hooks/track/useTrackV2.d.ts +8 -0
- package/dist/src/hooks/track/useTrackV2.d.ts.map +1 -0
- package/dist/src/hooks/useCheckoutsListenerByUserId.d.ts.map +1 -0
- package/dist/src/hooks/useEnclosingSheetOpen.d.ts +14 -0
- package/dist/src/hooks/useEnclosingSheetOpen.d.ts.map +1 -0
- package/dist/src/hooks/useGuardedAmountInput.d.ts +5 -0
- package/dist/src/hooks/useGuardedAmountInput.d.ts.map +1 -1
- package/dist/src/hooks/useRecentDeposits.d.ts.map +1 -0
- package/dist/src/hooks/useSettledOpacity.d.ts +10 -0
- package/dist/src/hooks/useSettledOpacity.d.ts.map +1 -0
- package/dist/src/icons/FunIcon.d.ts.map +1 -1
- package/dist/src/icons/assetLogos.d.ts.map +1 -1
- package/dist/src/native/glassEffect.d.ts +9 -0
- package/dist/src/native/glassEffect.d.ts.map +1 -1
- package/dist/src/preview/fiatPreviewPress.d.ts +6 -0
- package/dist/src/preview/fiatPreviewPress.d.ts.map +1 -0
- package/dist/src/preview/flowPreview.d.ts +15 -3
- 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 +65 -9
- package/dist/src/preview/scenarioCatalog.d.ts.map +1 -1
- package/dist/src/preview/scenarios.d.ts +6 -0
- package/dist/src/preview/scenarios.d.ts.map +1 -1
- package/dist/src/providers/BrandingContext.d.ts.map +1 -0
- package/dist/src/providers/FunkitProvider.d.ts +2 -2
- package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
- package/dist/src/providers/FunkitStatsigProvider.d.ts.map +1 -1
- package/dist/src/providers/FunkitStatsigWhnProvider.d.ts +10 -0
- package/dist/src/providers/FunkitStatsigWhnProvider.d.ts.map +1 -0
- package/dist/src/{haptics → providers}/HapticsContext.d.ts +3 -1
- package/dist/src/providers/HapticsContext.d.ts.map +1 -0
- package/dist/src/providers/IdentityContext.d.ts.map +1 -0
- package/dist/src/{haptics → providers}/hapticTap.d.ts +3 -2
- package/dist/src/providers/hapticTap.d.ts.map +1 -0
- package/dist/src/providers/useFrozenIdentity.d.ts +1 -1
- package/dist/src/providers/useFrozenIdentity.d.ts.map +1 -1
- package/dist/src/screens/DepositAmountScreen.d.ts +20 -22
- package/dist/src/screens/DepositAmountScreen.d.ts.map +1 -1
- package/dist/src/screens/TokenAndChainPickerScreen.d.ts.map +1 -1
- package/dist/src/screens/WithdrawAmountScreen.d.ts +3 -1
- package/dist/src/screens/WithdrawAmountScreen.d.ts.map +1 -1
- package/dist/src/screens/WithdrawCryptoSteps.d.ts.map +1 -1
- package/dist/src/screens/depositMetrics.d.ts +7 -0
- package/dist/src/screens/depositMetrics.d.ts.map +1 -1
- package/dist/src/statsig/useFunWhnStatsigAnalytics.d.ts +4 -0
- package/dist/src/statsig/useFunWhnStatsigAnalytics.d.ts.map +1 -0
- package/dist/src/swapped/SwappedScreen.d.ts +4 -1
- package/dist/src/swapped/SwappedScreen.d.ts.map +1 -1
- package/dist/src/swapped/SwappedScreenShell.d.ts +4 -2
- package/dist/src/swapped/SwappedScreenShell.d.ts.map +1 -1
- package/dist/src/swapped/SwappedWebView.d.ts +4 -2
- package/dist/src/swapped/SwappedWebView.d.ts.map +1 -1
- package/dist/src/swapped/useSwappedBuyingCrypto.d.ts +23 -0
- package/dist/src/swapped/useSwappedBuyingCrypto.d.ts.map +1 -0
- package/dist/src/theme/buildFunkitTheme.d.ts +2 -0
- package/dist/src/theme/buildFunkitTheme.d.ts.map +1 -1
- package/dist/src/theme/restyle.d.ts +66 -0
- package/dist/src/theme/restyle.d.ts.map +1 -1
- package/dist/src/theme/toRestyleTheme.d.ts +6 -0
- package/dist/src/theme/toRestyleTheme.d.ts.map +1 -1
- package/dist/src/theme/typeScale.d.ts +12 -0
- package/dist/src/theme/typeScale.d.ts.map +1 -1
- package/dist/src/theme/useFunkitTheme.d.ts.map +1 -1
- package/dist/src/transfer/depositAssets.d.ts +4 -34
- package/dist/src/transfer/depositAssets.d.ts.map +1 -1
- package/dist/src/transfer/depositQrCodeUri.d.ts.map +1 -1
- package/dist/src/transfer/depositSelection.d.ts +1 -12
- package/dist/src/transfer/depositSelection.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useDepositAssets.d.ts +1 -1
- package/dist/src/transfer/hooks/useDepositAssets.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useLockedTokenAmount.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useSupportedTokens.d.ts +2 -0
- package/dist/src/transfer/hooks/useSupportedTokens.d.ts.map +1 -1
- package/dist/src/transfer/supportedTokens.d.ts +2 -16
- package/dist/src/transfer/supportedTokens.d.ts.map +1 -1
- package/dist/src/utils/tokenAndChainPicker.d.ts +2 -7
- package/dist/src/utils/tokenAndChainPicker.d.ts.map +1 -1
- package/dist/src/withdrawal/useDepositAddressWithdrawalStatus.d.ts.map +1 -1
- package/dist/src/withdrawal/useWithdrawalSourceTokenBalance.d.ts.map +1 -1
- package/ios/FrostedGlassView.swift +28 -3
- package/ios/FunkitGlassEffectModule.swift +4 -0
- package/package.json +7 -2
- package/dist/chunk-5DJHIA7X.js.map +0 -7
- package/dist/chunk-AI6F43VP.js.map +0 -7
- package/dist/chunk-OW6L3UM7.js.map +0 -7
- package/dist/src/branding/BrandingContext.d.ts.map +0 -1
- package/dist/src/fiat/FiatPaymentFailedSheet.d.ts +0 -26
- package/dist/src/fiat/FiatPaymentFailedSheet.d.ts.map +0 -1
- package/dist/src/fiat/fieldLabel.d.ts.map +0 -1
- package/dist/src/fiat/formScreenProps.d.ts.map +0 -1
- package/dist/src/fiat/formValidationError.d.ts.map +0 -1
- package/dist/src/fiat/isAdditionalKycForm.d.ts.map +0 -1
- package/dist/src/fiat/kycFailover.d.ts.map +0 -1
- package/dist/src/fiat/kycFieldValidators.d.ts.map +0 -1
- package/dist/src/fiat/kycFormAttempt.d.ts.map +0 -1
- package/dist/src/fiat/kycFormState.d.ts.map +0 -1
- package/dist/src/fiat/kycOptionRows.d.ts.map +0 -1
- package/dist/src/fiat/kycWait.d.ts.map +0 -1
- package/dist/src/fiat/renderCaptureSurface.d.ts.map +0 -1
- package/dist/src/fiat/sectionDetail.d.ts.map +0 -1
- package/dist/src/fiat/useKycCaptureRound.d.ts.map +0 -1
- package/dist/src/fiat/useKycCompletion.d.ts.map +0 -1
- package/dist/src/fiat/useKycRoundReporting.d.ts.map +0 -1
- package/dist/src/flow/DepositReceivedToast.d.ts +0 -17
- package/dist/src/flow/DepositReceivedToast.d.ts.map +0 -1
- package/dist/src/flow/useDepositReceivedToast.d.ts +0 -31
- package/dist/src/flow/useDepositReceivedToast.d.ts.map +0 -1
- package/dist/src/haptics/HapticsContext.d.ts.map +0 -1
- package/dist/src/haptics/hapticTap.d.ts.map +0 -1
- package/dist/src/history/useCheckoutsListenerByUserId.d.ts.map +0 -1
- package/dist/src/history/useRecentDeposits.d.ts.map +0 -1
- package/dist/src/identity/IdentityContext.d.ts.map +0 -1
- /package/dist/src/fiat/{fieldLabel.d.ts → kyc/fieldLabel.d.ts} +0 -0
- /package/dist/src/fiat/{isAdditionalKycForm.d.ts → kyc/isAdditionalKycForm.d.ts} +0 -0
- /package/dist/src/fiat/{kycFieldValidators.d.ts → kyc/kycFieldValidators.d.ts} +0 -0
- /package/dist/src/fiat/{kycFormState.d.ts → kyc/kycFormState.d.ts} +0 -0
- /package/dist/src/fiat/{kycWait.d.ts → kyc/kycWait.d.ts} +0 -0
- /package/dist/src/fiat/{useKycCaptureRound.d.ts → kyc/useKycCaptureRound.d.ts} +0 -0
- /package/dist/src/{history → hooks}/useCheckoutsListenerByUserId.d.ts +0 -0
- /package/dist/src/{history → hooks}/useRecentDeposits.d.ts +0 -0
- /package/dist/src/{branding → providers}/BrandingContext.d.ts +0 -0
- /package/dist/src/{identity → providers}/IdentityContext.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,146 @@
|
|
|
1
1
|
# @funkit/connect-rn
|
|
2
2
|
|
|
3
|
+
## 9.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 88d96e8: The gated V2 crypto deposit's address page shows the deposit QR with the network's glyph, a tap-to-copy address that expands in full, and Copy Address.
|
|
8
|
+
- cf8a8e3: The gated V2 crypto deposit opens on a currency page that ranks the customer's priority tokens, lists the rest under "More tokens", and searches by name or ticker.
|
|
9
|
+
- 665b790: Add the V2 crypto deposit pages in a resizable inset modal behind the `enable-rn-v2-crypto-deposit` gate (off by default).
|
|
10
|
+
- 3881010: The gated V2 crypto deposit's network page lists the networks that carry the picked token, and the token is remembered with the network for the next deposit.
|
|
11
|
+
- 0c86e2e: The fiat on-ramp shows the selected deposit target token under the amount; opt out with `showFiatDestinationToken: false`
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- bb1aeb1: Stop the fiat amount screen from re-quoting in a loop when the only provider left refuses the amount over the buyer's limit.
|
|
16
|
+
- c762d46: Correlate each React Native deposit and withdrawal attempt with a distinct checkout ID.
|
|
17
|
+
- c336489: Rename "Deposit Min" to "Deposit Minimum" and enter a whole-dollar minimum as `$20` rather than `$20.00`.
|
|
18
|
+
- 90f0d17: Log each fiat payment attempt of a checkout (`payment_attempt_started` / `payment_attempt_ended`) with an `attemptIndex` that counts across providers and reroutes, and add it to `payment_failed` and `deposit_settled`.
|
|
19
|
+
- 1828db1: Enable experiments from the secondary Fun WHN Statsig client in React Native.
|
|
20
|
+
- 9b72ff2: Add analytics support for React Native flows.
|
|
21
|
+
- 57bc44c: No user-facing changes.
|
|
22
|
+
- 5cba60d: Liquid Glass sheets and KYC form pages now use the theme's modal background color instead of always rendering white (or black on dark themes).
|
|
23
|
+
- ca6f477: Use the shared deposit token and chain selection from `@funkit/connect-core`; no behaviour change.
|
|
24
|
+
- 665b790: Round the V2 crypto deposit modal's corners to the design: tighter at the top, nested in the device's corner at the bottom.
|
|
25
|
+
- 7b33236: Keep secondary Fun WHN Statsig experiments consistent across Connect SDKs.
|
|
26
|
+
- Updated dependencies [cf8a8e3]
|
|
27
|
+
- Updated dependencies [665b790]
|
|
28
|
+
- Updated dependencies [943ea85]
|
|
29
|
+
- Updated dependencies [ca6f477]
|
|
30
|
+
- Updated dependencies [57bc44c]
|
|
31
|
+
- Updated dependencies [7ac5b52]
|
|
32
|
+
- Updated dependencies [7b33236]
|
|
33
|
+
- Updated dependencies [8892863]
|
|
34
|
+
- Updated dependencies [7c1c826]
|
|
35
|
+
- @funkit/connect-core@9.4.0
|
|
36
|
+
|
|
37
|
+
## 9.3.0
|
|
38
|
+
|
|
39
|
+
### Minor Changes
|
|
40
|
+
|
|
41
|
+
- 7bc5bb0: Apple Pay deposits now wait on an animated processing card, which also offers the ways on when a payment fails, in place of the deposit toasts and payment-failed screen; a custom `hapticFeedback` may receive `'success'`, and the optional `@shopify/react-native-skia` peer draws the card's effects.
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- b566e67: No consumer-facing changes.
|
|
46
|
+
- 5553773: No consumer-facing changes.
|
|
47
|
+
- c8b92f2: No consumer-facing changes.
|
|
48
|
+
- a4e0ef7: No consumer-facing changes.
|
|
49
|
+
- ed9fa79: No consumer-facing changes.
|
|
50
|
+
- 1d4f539: No consumer-facing changes.
|
|
51
|
+
- 7259782: No consumer-facing changes.
|
|
52
|
+
- 8d44192: No consumer-facing changes.
|
|
53
|
+
- 8776f81: No consumer-facing changes.
|
|
54
|
+
- 92e0e5b: No consumer-facing changes.
|
|
55
|
+
- 39d13e0: No consumer-facing changes.
|
|
56
|
+
- 103add4: No consumer-facing changes.
|
|
57
|
+
- b7ba436: No consumer-facing changes.
|
|
58
|
+
- 4087713: No consumer-facing changes.
|
|
59
|
+
- a25d57a: No consumer-facing changes.
|
|
60
|
+
- e706f76: Hide the disabled Continue button on the withdrawal amount screen while the amount is below the minimum.
|
|
61
|
+
- 7465f81: No consumer-facing changes.
|
|
62
|
+
- 0ba0440: No consumer-facing changes.
|
|
63
|
+
- e31358f: No consumer-facing changes.
|
|
64
|
+
- c0bfa4c: No consumer-facing changes.
|
|
65
|
+
- 0771dce: No consumer-facing changes.
|
|
66
|
+
- 55157e2: No consumer-facing changes.
|
|
67
|
+
- d9c0832: No consumer-facing changes.
|
|
68
|
+
- 8dc150b: No consumer-facing changes.
|
|
69
|
+
- f0adf5f: No consumer-facing changes.
|
|
70
|
+
- 52f9fdf: No consumer-facing changes.
|
|
71
|
+
- e43bd32: A declined MoonPay Apple Pay payment now offers another payment method instead of keeping the buyer on MoonPay.
|
|
72
|
+
- 4811617: Retrying a failed MoonPay payment now fetches a new quote instead of reopening the failure sheet.
|
|
73
|
+
- 674a6a6: No consumer-facing changes.
|
|
74
|
+
- db6f0f4: Suggest a debit card on the failed Apple Pay screen, since prepaid cards are often declined.
|
|
75
|
+
- 0211812: Offer "Deposit a higher amount" after a failed Apple Pay payment when the only provider left needs a higher minimum, and show the next provider's minimum after a refused identity check when no provider left serves the entered amount.
|
|
76
|
+
- cd38732: No consumer-facing changes.
|
|
77
|
+
- 954ebff: No consumer-facing changes.
|
|
78
|
+
- 1140645: No consumer-facing changes.
|
|
79
|
+
- 84246c9: No consumer-facing changes.
|
|
80
|
+
- 43191ae: No consumer-facing changes.
|
|
81
|
+
- 753414a: No consumer-facing changes.
|
|
82
|
+
- 6bcd238: No consumer-facing changes.
|
|
83
|
+
- 6a3bb31: Stop replaying a Stripe Link sign-in credential the SDK already refused. The tap no longer redeems it a second time, and a payment that fails on the spent credential reprices instead of reopening the same sheet.
|
|
84
|
+
- 290652a: No consumer-facing changes.
|
|
85
|
+
- 33a2245: No consumer-facing changes.
|
|
86
|
+
- f329ac6: No consumer-facing changes.
|
|
87
|
+
- 5c09d7e: No consumer-facing changes.
|
|
88
|
+
- 637190d: No consumer-facing changes.
|
|
89
|
+
- 75683b0: Fail over to the next fiat provider when the Stripe SDK refuses Link registration before reaching Stripe (e.g. Apple private relay emails), instead of re-showing an account-creation form that can never pass.
|
|
90
|
+
- 8fafe60: No consumer-facing changes.
|
|
91
|
+
- 8d59c52: No consumer-facing changes.
|
|
92
|
+
- 413e188: No consumer-facing changes.
|
|
93
|
+
- 419d247: No consumer-facing changes.
|
|
94
|
+
- 6c01b69: No consumer-facing changes.
|
|
95
|
+
- 3869e4c: No consumer-facing changes.
|
|
96
|
+
- 6eccdf5: No consumer-facing changes.
|
|
97
|
+
- 51c8eaa: No consumer-facing changes.
|
|
98
|
+
- dcdd9f8: No consumer-facing changes.
|
|
99
|
+
- 925604e: No consumer-facing changes.
|
|
100
|
+
- 006231f: No consumer-facing changes.
|
|
101
|
+
- b1ad1b8: No consumer-facing changes.
|
|
102
|
+
- 4d3863d: No consumer-facing changes.
|
|
103
|
+
- bfddc00: No consumer-facing changes.
|
|
104
|
+
- 19c02cf: No consumer-facing changes.
|
|
105
|
+
- e452c7c: No consumer-facing changes.
|
|
106
|
+
- bfc76f6: No consumer-facing changes.
|
|
107
|
+
- c6f367f: No consumer-facing changes.
|
|
108
|
+
- e8e21e5: No consumer-facing changes.
|
|
109
|
+
- 7477344: No consumer-facing changes.
|
|
110
|
+
- fa4db7b: No consumer-facing changes.
|
|
111
|
+
- e0f7d86: No consumer-facing changes.
|
|
112
|
+
- 2cce1d1: No consumer-facing changes.
|
|
113
|
+
- 0775497: No consumer-facing changes.
|
|
114
|
+
- e30f005: No consumer-facing changes.
|
|
115
|
+
- 154dce0: No consumer-facing changes.
|
|
116
|
+
- 6405bf3: No consumer-facing changes.
|
|
117
|
+
- b7f4140: No consumer-facing changes.
|
|
118
|
+
- adf03ef: No consumer-facing changes.
|
|
119
|
+
- 388a5ec: No consumer-facing changes.
|
|
120
|
+
- 58b6277: No consumer-facing changes.
|
|
121
|
+
- 0a4b3af: No consumer-facing changes.
|
|
122
|
+
- 3028fba: No consumer-facing changes.
|
|
123
|
+
- 0cfe596: No consumer-facing changes.
|
|
124
|
+
- 63dfb4d: No consumer-facing changes.
|
|
125
|
+
- 9feda14: No consumer-facing changes.
|
|
126
|
+
- 27f77fd: No consumer-facing changes.
|
|
127
|
+
- 28d002a: No consumer-facing changes.
|
|
128
|
+
- b5a0963: No consumer-facing changes.
|
|
129
|
+
- 4112e02: No consumer-facing changes.
|
|
130
|
+
- 774e178: Log the paid fiat amount when a fiat deposit settles.
|
|
131
|
+
- 12118d9: No consumer-facing changes.
|
|
132
|
+
- e0d4476: No consumer-facing changes.
|
|
133
|
+
- 0cf0704: Fix retrying a failed fiat payment reopening the same spent session, which failed again on every retry.
|
|
134
|
+
- d17c717: Fix the fiat amount page fading in on first open, and a MoonPay pay sheet reporting a lost session on every redraw.
|
|
135
|
+
- 9b6fef9: Fix the withdrawal recipient address shifting to the right when the field loses focus on web.
|
|
136
|
+
- Updated dependencies [7bc5bb0]
|
|
137
|
+
- Updated dependencies [309d703]
|
|
138
|
+
- Updated dependencies [84548dd]
|
|
139
|
+
- Updated dependencies [0211812]
|
|
140
|
+
- Updated dependencies [6eccdf5]
|
|
141
|
+
- Updated dependencies [51c8eaa]
|
|
142
|
+
- @funkit/connect-core@9.3.0
|
|
143
|
+
|
|
3
144
|
## 9.2.0
|
|
4
145
|
|
|
5
146
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -238,6 +238,23 @@ four Info.plist keys above. Bundle the Inter `.ttf` files natively (`UIAppFonts`
|
|
|
238
238
|
on iOS, `android/app/src/main/assets/fonts` on Android), named
|
|
239
239
|
`Inter-Regular`, `Inter-Medium` and `Inter-SemiBold` as the theme uses them.
|
|
240
240
|
|
|
241
|
+
## Deposit processing effects (optional)
|
|
242
|
+
|
|
243
|
+
After an Apple Pay payment, the deposit waits on a processing card. With
|
|
244
|
+
`@shopify/react-native-skia` installed, the card draws drifting light behind
|
|
245
|
+
its copy and a pressure wave when the deposit lands. Without it, the card
|
|
246
|
+
works the same and draws flat.
|
|
247
|
+
|
|
248
|
+
`@shopify/react-native-skia` is an **optional peer**, and Expo Go bundles it.
|
|
249
|
+
|
|
250
|
+
```sh
|
|
251
|
+
npx expo install @shopify/react-native-skia
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
In a bare React Native app, `pnpm add @shopify/react-native-skia`, install iOS
|
|
255
|
+
pods, and rebuild the native app. With pnpm, allow its install script, which
|
|
256
|
+
fetches Skia's prebuilt binaries: add it to `pnpm.onlyBuiltDependencies`.
|
|
257
|
+
|
|
241
258
|
## Peer dependencies
|
|
242
259
|
|
|
243
260
|
These are declared as **peer dependencies** (not bundled), so the host app links a
|
|
@@ -308,6 +325,12 @@ Two deliberate choices keep it that way:
|
|
|
308
325
|
step checks for its native module first and `import()`s
|
|
309
326
|
`@sumsub/react-native-mobilesdk-module` only when it is linked
|
|
310
327
|
(`src/fiat/providers/sumsub/sumsubSdk.ts`); otherwise Sumsub runs in the WebView.
|
|
328
|
+
- **Skia is an optional peer, loaded on demand.** `@shopify/react-native-skia`
|
|
329
|
+
draws the deposit processing card's effects. Expo Go bundles it, but a host
|
|
330
|
+
need not install it: `src/fiat/processing/skiaPeer.ts` `import()`s it
|
|
331
|
+
inside a try/catch when the card first shows, or as a deposit flow opens where
|
|
332
|
+
Liquid Glass needs the card's corners measured. The card draws flat without
|
|
333
|
+
it.
|
|
311
334
|
- **The glass module is optional at runtime.** `FunkitGlassEffect` (this
|
|
312
335
|
package's `ios/`) is not in Expo Go. `src/native/glassEffect.ts` looks it up
|
|
313
336
|
with `requireOptionalNativeModule`, so an unlinked binary renders the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFunkitIdentity
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EKU6Y6IC.js";
|
|
4
4
|
import {
|
|
5
5
|
logger
|
|
6
6
|
} from "./chunk-KOJEF2II.js";
|
|
@@ -114,4 +114,4 @@ export {
|
|
|
114
114
|
useIsStablecoin,
|
|
115
115
|
useSourceTokenUsdPrice
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=chunk-
|
|
117
|
+
//# sourceMappingURL=chunk-7EDY3KSV.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/statsig/useDynamicConfig.ts", "../src/geo/useUserIpInfo.ts", "../src/withdrawal/useSourceTokenUsdPrice.ts", "../src/hooks/useIsStablecoin.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type DynamicConfigName,\n type DynamicConfigValue,\n useDynamicConfig as useCoreDynamicConfig,\n} from '@funkit/connect-core'\n\nimport { useUserIpInfo } from '../geo/useUserIpInfo'\n\n// RN counterpart of `@funkit/connect`'s `hooks/statsig/useDynamicConfig`. The\n// core hook takes `countryCode` as a parameter so it stays platform-agnostic;\n// this wrapper threads the user's IP-derived `alpha2` (Moonpay/ipapi) so\n// country-conditional variant configs (e.g. `enableswappeddeposit`) resolve\n// against the real region instead of falling to their default branch.\nexport type { DynamicConfigName, DynamicConfigValue }\n\nexport const useDynamicConfig = <Name extends DynamicConfigName>(\n name: Name,\n options?: {\n bypassCountryCode?: boolean\n },\n): DynamicConfigValue<Name> => {\n const { userIpInfo } = useUserIpInfo()\n return useCoreDynamicConfig(name, {\n bypassCountryCode: options?.bypassCountryCode,\n countryCode: userIpInfo?.alpha2,\n })\n}\n", "import { useUserIpInfo as useCoreUserIpInfo } from '@funkit/connect-core'\nimport type { QueryClient } from '@tanstack/react-query'\n\nimport { useFunkitIdentity } from '../providers/IdentityContext'\nimport { logger } from '../logging/logger'\n\n// Re-exported so existing RN importers (isCountryBlocked, the flow hooks, tests)\n// keep their type source unchanged after the fetch logic moved to core.\nexport type {\n FunkitUserIpInfo,\n UseUserIpInfoResult,\n} from '@funkit/connect-core'\n\n// Thin RN wrapper over the shared core `useUserIpInfo` (V1 PR13 moved the\n// Moonpay\u2192ipapi fetch logic there so web and RN don't duplicate it). RN is\n// login-agnostic, so the lookup always runs (`enabled: true`); web's wrapper\n// gates on `isUserLoggedIn` instead. `apiKey` lets the core hook reach the\n// first-party geo endpoint; the chain it picks is Statsig-driven.\nexport function useUserIpInfo() {\n const { apiKey } = useFunkitIdentity()\n\n // Login-agnostic + session-stable: always run, never go stale. The fiat\n // rail prices a US buyer by state, so a stateless answer is worth a second\n // provider here; web reads only the country and leaves this off.\n return useCoreUserIpInfo({\n logger,\n apiKey,\n enabled: true,\n staleTime: Number.POSITIVE_INFINITY,\n requireState: true,\n })\n}\n\n/**\n * Re-asks for the location in the background; a cached answer keeps rendering\n * until the new one lands. Matches the core hook's query key, which\n * `useUserIpInfo.test.tsx` pins.\n */\nexport function refreshUserIpInfo(queryClient: QueryClient): void {\n void queryClient.invalidateQueries({ queryKey: ['getUserIpInfo'] })\n}\n", "import { getAssetPriceInfoWithFallback } from '@funkit/connect-core'\nimport { useQuery } from '@tanstack/react-query'\n\nimport { useIsStablecoin } from '../hooks/useIsStablecoin'\nimport { useFunkitIdentity } from '../providers/IdentityContext'\nimport { logger } from '../logging/logger'\n\nconst SOURCE_TOKEN_PRICE_QUERY_KEY = 'sourceTokenUsdPrice'\n\n/** Long enough that typing doesn't refetch, short enough to stay honest. */\nconst PRICE_STALE_TIME_MS = 60_000\n\n/** What a dollar stablecoin is worth, without asking anyone. */\nconst STABLECOIN_USD_PRICE = 1\n\n/**\n * Spot USD price of the source token, for the USD floor and ceiling the host\n * configures (`getMinWithdrawalUSD`, `getMaxWithdrawalFiat`, or\n * `getMaxWithdrawalUSD`).\n *\n * A dollar stablecoin is priced from its symbol and never fetched, as web's\n * `useAssetAddressPrice` does \u2014 it is the common withdrawal source, and the\n * amount screen was waiting on a round trip to be told a dollar is a dollar.\n *\n * `0` means \"unknown\", which is what the core validator reads as \"no price\" \u2014\n * so a failed or in-flight lookup leaves the USD limits inert rather than\n * judging an amount against a made-up rate. Per-token limits and the balance\n * check are unaffected either way.\n *\n * Not every source has a price: Lighter's L2 assets are addressed by index, not\n * by an ERC-20 funkit's price API knows, so that lookup 404s and core's Relay\n * fallback is what prices them.\n */\nexport function useSourceTokenUsdPrice(\n sourceToken:\n | { chainId: string | number; address: string; symbol: string }\n | undefined,\n {\n enabled = true,\n refetchInterval = false,\n }: {\n enabled?: boolean\n refetchInterval?: number | false\n } = {},\n) {\n const { apiKey } = useFunkitIdentity()\n const isStablecoin = useIsStablecoin()\n const chainId = sourceToken ? String(sourceToken.chainId) : undefined\n const isStable = !!sourceToken && isStablecoin(sourceToken.symbol)\n const unavailable = enabled && !!sourceToken && !isStable && !apiKey\n\n const query = useQuery({\n queryKey: [\n SOURCE_TOKEN_PRICE_QUERY_KEY,\n apiKey,\n chainId,\n sourceToken?.address,\n ],\n queryFn: async () => {\n if (!sourceToken || !chainId) {\n throw new Error('Missing price inputs')\n }\n const info = await getAssetPriceInfoWithFallback({\n chainId,\n assetTokenAddress: sourceToken.address as `0x${string}`,\n apiKey,\n logger,\n })\n const unitPrice = info.unitPrice\n if (!Number.isFinite(unitPrice) || unitPrice <= 0) {\n // Reported here, not on read: a cached bad price would otherwise warn\n // on every render. A non-positive price would silently scale every USD\n // limit to nothing.\n logger.warn('connect-rn:withdrawal:unusable_source_price', {\n chainId: sourceToken.chainId,\n address: sourceToken.address,\n unitPrice,\n })\n return 0\n }\n return unitPrice\n },\n enabled: enabled && !!sourceToken && !isStable && !unavailable,\n staleTime: PRICE_STALE_TIME_MS,\n refetchInterval: isStable ? false : refetchInterval,\n retry: false,\n })\n\n return {\n refetch: query.refetch,\n data: isStable ? STABLECOIN_USD_PRICE : (query.data ?? 0),\n isUnavailable: unavailable,\n isPending: !isStable && !unavailable && query.isPending,\n isError: !isStable && (unavailable || query.isError),\n isFetching: !isStable && query.isFetching,\n }\n}\n", "import { useCallback } from 'react'\nimport { useDynamicConfig } from '../statsig/useDynamicConfig'\n\nexport type IsStablecoinFn = (symbol: string) => boolean\n\nexport function useIsStablecoin(): IsStablecoinFn {\n const stablecoinSymbols = useDynamicConfig('stablecoinsymbols')\n return useCallback(\n (symbol: string) =>\n stablecoinSymbols.some((stable) =>\n symbol.toLowerCase().includes(stable.toLowerCase()),\n ),\n [stablecoinSymbols],\n )\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAAA;AAAA,EAGE,oBAAoB;AAAA,OACf;;;ACJP,SAAS,iBAAiB,yBAAyB;AAkB5C,SAAS,gBAAgB;AAC9B,QAAM,EAAE,OAAO,IAAI,kBAAkB;AAKrC,SAAO,kBAAkB;AAAA,IACvB;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,WAAW,OAAO;AAAA,IAClB,cAAc;AAAA,EAChB,CAAC;AACH;AAOO,SAAS,kBAAkB,aAAgC;AAChE,OAAK,YAAY,kBAAkB,EAAE,UAAU,CAAC,eAAe,EAAE,CAAC;AACpE;;;ADzBO,IAAM,mBAAmB,CAC9B,MACA,YAG6B;AAC7B,QAAM,EAAE,WAAW,IAAI,cAAc;AACrC,SAAO,qBAAqB,MAAM;AAAA,IAChC,mBAAmB,SAAS;AAAA,IAC5B,aAAa,YAAY;AAAA,EAC3B,CAAC;AACH;;;AE1BA,SAAS,qCAAqC;AAC9C,SAAS,gBAAgB;;;ACDzB,SAAS,mBAAmB;AAKrB,SAAS,kBAAkC;AAChD,QAAM,oBAAoB,iBAAiB,mBAAmB;AAC9D,SAAO;AAAA,IACL,CAAC,WACC,kBAAkB;AAAA,MAAK,CAAC,WACtB,OAAO,YAAY,EAAE,SAAS,OAAO,YAAY,CAAC;AAAA,IACpD;AAAA,IACF,CAAC,iBAAiB;AAAA,EACpB;AACF;;;ADPA,IAAM,+BAA+B;AAGrC,IAAM,sBAAsB;AAG5B,IAAM,uBAAuB;AAoBtB,SAAS,uBACd,aAGA;AAAA,EACE,UAAU;AAAA,EACV,kBAAkB;AACpB,IAGI,CAAC,GACL;AACA,QAAM,EAAE,OAAO,IAAI,kBAAkB;AACrC,QAAM,eAAe,gBAAgB;AACrC,QAAM,UAAU,cAAc,OAAO,YAAY,OAAO,IAAI;AAC5D,QAAM,WAAW,CAAC,CAAC,eAAe,aAAa,YAAY,MAAM;AACjE,QAAM,cAAc,WAAW,CAAC,CAAC,eAAe,CAAC,YAAY,CAAC;AAE9D,QAAM,QAAQ,SAAS;AAAA,IACrB,UAAU;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa;AAAA,IACf;AAAA,IACA,SAAS,YAAY;AACnB,UAAI,CAAC,eAAe,CAAC,SAAS;AAC5B,cAAM,IAAI,MAAM,sBAAsB;AAAA,MACxC;AACA,YAAM,OAAO,MAAM,8BAA8B;AAAA,QAC/C;AAAA,QACA,mBAAmB,YAAY;AAAA,QAC/B;AAAA,QACA;AAAA,MACF,CAAC;AACD,YAAM,YAAY,KAAK;AACvB,UAAI,CAAC,OAAO,SAAS,SAAS,KAAK,aAAa,GAAG;AAIjD,eAAO,KAAK,+CAA+C;AAAA,UACzD,SAAS,YAAY;AAAA,UACrB,SAAS,YAAY;AAAA,UACrB;AAAA,QACF,CAAC;AACD,eAAO;AAAA,MACT;AACA,aAAO;AAAA,IACT;AAAA,IACA,SAAS,WAAW,CAAC,CAAC,eAAe,CAAC,YAAY,CAAC;AAAA,IACnD,WAAW;AAAA,IACX,iBAAiB,WAAW,QAAQ;AAAA,IACpC,OAAO;AAAA,EACT,CAAC;AAED,SAAO;AAAA,IACL,SAAS,MAAM;AAAA,IACf,MAAM,WAAW,uBAAwB,MAAM,QAAQ;AAAA,IACvD,eAAe;AAAA,IACf,WAAW,CAAC,YAAY,CAAC,eAAe,MAAM;AAAA,IAC9C,SAAS,CAAC,aAAa,eAAe,MAAM;AAAA,IAC5C,YAAY,CAAC,YAAY,MAAM;AAAA,EACjC;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|