@funkit/connect-rn 3.7.0 → 3.8.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 +28 -0
- package/dist/{chunk-VDKAH5Y5.js → chunk-UN5NP4RP.js} +75 -64
- package/dist/chunk-UN5NP4RP.js.map +7 -0
- package/dist/clients/lighter/lighterFastWithdrawal.d.ts.map +1 -1
- package/dist/clients/lighter/useLighterUnstakedFee.d.ts +12 -6
- package/dist/clients/lighter/useLighterUnstakedFee.d.ts.map +1 -1
- package/dist/clients/lighter/useLighterWithdrawal.d.ts.map +1 -1
- package/dist/clients/lighter/useLighterWithdrawalMethods.d.ts.map +1 -1
- package/dist/clients/lighter.js +47 -86
- package/dist/clients/lighter.js.map +3 -3
- package/dist/index.js +803 -593
- package/dist/index.js.map +4 -4
- package/dist/src/components/ReceiveAmountSummary.d.ts.map +1 -1
- package/dist/src/components/WithdrawSourceCard.d.ts.map +1 -1
- package/dist/src/flow/DepositFlowContent.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/WithdrawalFlowContent.d.ts.map +1 -1
- package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
- package/dist/src/flow/sheetSizing.d.ts +22 -0
- package/dist/src/flow/sheetSizing.d.ts.map +1 -0
- package/dist/src/flow/useCopiedToast.d.ts.map +1 -1
- package/dist/src/flow/withdrawalFlowConfig.d.ts +7 -0
- package/dist/src/flow/withdrawalFlowConfig.d.ts.map +1 -1
- package/dist/src/haptics/HapticsContext.d.ts.map +1 -1
- package/dist/src/identity/IdentityContext.d.ts +9 -0
- package/dist/src/identity/IdentityContext.d.ts.map +1 -1
- package/dist/src/providers/FunkitStatsigProvider.d.ts.map +1 -1
- package/dist/src/screens/QrCodeScreen.d.ts.map +1 -1
- package/dist/src/screens/SelectReceiveTokenAndChainScreen.d.ts.map +1 -1
- package/dist/src/screens/WithdrawAddressScreen.d.ts +1 -1
- package/dist/src/screens/WithdrawAddressScreen.d.ts.map +1 -1
- package/dist/src/screens/WithdrawCryptoComplete.d.ts.map +1 -1
- package/dist/src/screens/WithdrawCryptoSteps.d.ts +2 -1
- package/dist/src/screens/WithdrawCryptoSteps.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useFops.d.ts +6 -0
- package/dist/src/transfer/hooks/useFops.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useWithdrawalFops.d.ts.map +1 -1
- package/dist/src/utils/amountGlyphs.d.ts.map +1 -1
- package/dist/src/utils/executionErrorMessage.d.ts.map +1 -1
- package/dist/src/utils/numpadInput.d.ts.map +1 -1
- package/dist/src/withdrawal/receiveDestination.d.ts.map +1 -1
- package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts +3 -1
- package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts.map +1 -1
- package/dist/src/withdrawal/useCryptoWithdrawalSubmit.d.ts.map +1 -1
- package/dist/src/withdrawal/useWithdrawalDestinationTokens.d.ts.map +1 -1
- package/dist/src/withdrawal/useWithdrawalStatus.d.ts.map +1 -1
- package/dist/src/withdrawal/validation.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-VDKAH5Y5.js.map +0 -7
- package/dist/src/components/SheetContent.d.ts +0 -25
- package/dist/src/components/SheetContent.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
resolveFunkitIdentity,
|
|
8
8
|
useFunkitIdentity,
|
|
9
9
|
useFunkitTranslation
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UN5NP4RP.js";
|
|
11
11
|
|
|
12
12
|
// src/theme/tokens.ts
|
|
13
13
|
function fontFamilyForWeight(family, styleName) {
|
|
@@ -453,7 +453,7 @@ function useFunkitColorScheme() {
|
|
|
453
453
|
|
|
454
454
|
// src/providers/FunkitProvider.tsx
|
|
455
455
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
456
|
-
import { useEffect as
|
|
456
|
+
import { useEffect as useEffect20, useMemo as useMemo14, useRef as useRef16 } from "react";
|
|
457
457
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
458
458
|
|
|
459
459
|
// src/flow/FunkitFlowProvider.tsx
|
|
@@ -515,29 +515,12 @@ async function pasteFromClipboard() {
|
|
|
515
515
|
}
|
|
516
516
|
|
|
517
517
|
// src/flow/DepositFlowContent.tsx
|
|
518
|
-
import { BottomSheetModal as BottomSheetModal2 } from "@gorhom/bottom-sheet";
|
|
518
|
+
import { BottomSheetModal as BottomSheetModal2, BottomSheetView as BottomSheetView2 } from "@gorhom/bottom-sheet";
|
|
519
519
|
import { useStatsigClient } from "@statsig/react-bindings";
|
|
520
|
-
import { useCallback as useCallback8, useEffect as
|
|
520
|
+
import { useCallback as useCallback8, useEffect as useEffect15, useState as useState10 } from "react";
|
|
521
521
|
import { Share } from "react-native";
|
|
522
522
|
import { useSafeAreaInsets as useSafeAreaInsets5 } from "react-native-safe-area-context";
|
|
523
523
|
|
|
524
|
-
// src/components/SheetContent.tsx
|
|
525
|
-
import { BottomSheetView } from "@gorhom/bottom-sheet";
|
|
526
|
-
import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
|
|
527
|
-
var FULL_HEIGHT_DETENT = ["100%"];
|
|
528
|
-
function sheetSizing({ fullHeight }) {
|
|
529
|
-
return fullHeight ? { enableDynamicSizing: false, snapPoints: FULL_HEIGHT_DETENT } : { enableDynamicSizing: true };
|
|
530
|
-
}
|
|
531
|
-
function SheetContent({
|
|
532
|
-
fullHeight,
|
|
533
|
-
children
|
|
534
|
-
}) {
|
|
535
|
-
if (fullHeight) {
|
|
536
|
-
return /* @__PURE__ */ jsx2(Fragment, { children });
|
|
537
|
-
}
|
|
538
|
-
return /* @__PURE__ */ jsx2(BottomSheetView, { children });
|
|
539
|
-
}
|
|
540
|
-
|
|
541
524
|
// src/geo/useCheckoutBlocked.ts
|
|
542
525
|
import { useEffect as useEffect2, useMemo as useMemo3 } from "react";
|
|
543
526
|
import { useEffectEvent } from "@funkit/connect-core";
|
|
@@ -618,7 +601,7 @@ import {
|
|
|
618
601
|
useRef,
|
|
619
602
|
useState as useState3
|
|
620
603
|
} from "react";
|
|
621
|
-
import { jsx as
|
|
604
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
622
605
|
function useNestedSheet() {
|
|
623
606
|
const nestedSheetRef = useRef(null);
|
|
624
607
|
const [nestedScreen, setNestedScreen] = useState3(null);
|
|
@@ -634,7 +617,7 @@ function useNestedSheet() {
|
|
|
634
617
|
nestedSheetRef.current?.dismiss();
|
|
635
618
|
}, []);
|
|
636
619
|
const renderNestedBackdrop = useCallback2(
|
|
637
|
-
(props) => /* @__PURE__ */
|
|
620
|
+
(props) => /* @__PURE__ */ jsx2(
|
|
638
621
|
BottomSheetBackdrop,
|
|
639
622
|
{
|
|
640
623
|
...props,
|
|
@@ -657,11 +640,11 @@ function useNestedSheet() {
|
|
|
657
640
|
|
|
658
641
|
// src/icons/CryptoBitcoinIcon.tsx
|
|
659
642
|
import { SvgXml } from "react-native-svg";
|
|
660
|
-
import { jsx as
|
|
643
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
661
644
|
var CIRCLE_BITCOIN_SVG = `<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.9168 11.8737C12.9168 12.449 12.4505 12.9154 11.8752 12.9154H8.75016V10.832H11.8752C12.4505 10.832 12.9168 11.2984 12.9168 11.8737Z" fill="currentColor"/><path d="M11.4585 7.08203H8.75016V9.16536H11.4585C12.0338 9.16536 12.5002 8.69899 12.5002 8.1237C12.5002 7.5484 12.0338 7.08203 11.4585 7.08203Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0002 0.832031C4.93755 0.832031 0.833496 4.93609 0.833496 9.9987C0.833496 15.0613 4.93755 19.1654 10.0002 19.1654C15.0628 19.1654 19.1668 15.0613 19.1668 9.9987C19.1668 4.93609 15.0628 0.832031 10.0002 0.832031ZM8.3335 4.16536C8.79373 4.16536 9.16683 4.53846 9.16683 4.9987V5.41536H10.0002V4.9987C10.0002 4.53846 10.3733 4.16536 10.8335 4.16536C11.2937 4.16536 11.6668 4.53846 11.6668 4.9987V5.42326C13.0653 5.52964 14.1668 6.69803 14.1668 8.1237C14.1668 8.74941 13.9546 9.32557 13.5983 9.78413C14.2 10.2809 14.5835 11.0325 14.5835 11.8737C14.5835 13.3695 13.3709 14.582 11.8752 14.582H11.6668V14.9987C11.6668 15.4589 11.2937 15.832 10.8335 15.832C10.3733 15.832 10.0002 15.4589 10.0002 14.9987V14.582H9.16683V14.9987C9.16683 15.4589 8.79373 15.832 8.3335 15.832C7.87326 15.832 7.50016 15.4589 7.50016 14.9987V14.582H6.66683C6.20659 14.582 5.8335 14.2089 5.8335 13.7487C5.8335 13.2885 6.20659 12.9154 6.66683 12.9154H7.0835V7.08203H6.66683C6.20659 7.08203 5.8335 6.70894 5.8335 6.2487C5.8335 5.78846 6.20659 5.41536 6.66683 5.41536H7.50016V4.9987C7.50016 4.53846 7.87326 4.16536 8.3335 4.16536Z" fill="currentColor"/></svg>`;
|
|
662
645
|
function CryptoBitcoinIcon({ size = 28 }) {
|
|
663
646
|
const theme = useTheme();
|
|
664
|
-
return /* @__PURE__ */
|
|
647
|
+
return /* @__PURE__ */ jsx3(
|
|
665
648
|
SvgXml,
|
|
666
649
|
{
|
|
667
650
|
xml: CIRCLE_BITCOIN_SVG,
|
|
@@ -777,7 +760,7 @@ var FALLBACK_ASSET_LOGO = "https://sdk-cdn.fun.xyz/images/dollar_circle.png";
|
|
|
777
760
|
import { useEffect as useEffect4, useState as useState4 } from "react";
|
|
778
761
|
import { Image } from "react-native";
|
|
779
762
|
import { SvgCss } from "react-native-svg/css";
|
|
780
|
-
import { jsx as
|
|
763
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
781
764
|
var svgCache = /* @__PURE__ */ new Map();
|
|
782
765
|
function ensureViewBox(svg) {
|
|
783
766
|
if (/\bviewBox\s*=/.test(svg)) {
|
|
@@ -845,7 +828,7 @@ function FunIcon({ uri, size = 32, fallbackUri }) {
|
|
|
845
828
|
}, [currentUri, isSvg]);
|
|
846
829
|
const ready = isSvg ? xml != null : rasterLoaded;
|
|
847
830
|
const clip = { overflow: "hidden" };
|
|
848
|
-
return /* @__PURE__ */
|
|
831
|
+
return /* @__PURE__ */ jsx4(
|
|
849
832
|
Box,
|
|
850
833
|
{
|
|
851
834
|
width: size,
|
|
@@ -855,7 +838,7 @@ function FunIcon({ uri, size = 32, fallbackUri }) {
|
|
|
855
838
|
clip,
|
|
856
839
|
{ backgroundColor: ready ? void 0 : theme.background.secondary }
|
|
857
840
|
],
|
|
858
|
-
children: isSvg ? xml != null ? /* @__PURE__ */
|
|
841
|
+
children: isSvg ? xml != null ? /* @__PURE__ */ jsx4(SvgCss, { xml, width: size, height: size }) : null : /* @__PURE__ */ jsx4(
|
|
859
842
|
Image,
|
|
860
843
|
{
|
|
861
844
|
source: { uri: currentUri },
|
|
@@ -870,26 +853,26 @@ function FunIcon({ uri, size = 32, fallbackUri }) {
|
|
|
870
853
|
|
|
871
854
|
// src/icons/PaymentBrandIcons.tsx
|
|
872
855
|
import { SvgXml as SvgXml2 } from "react-native-svg";
|
|
873
|
-
import { jsx as
|
|
856
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
874
857
|
var MASTERCARD_SVG = '<svg width="24" height="18" viewBox="0 0 24 18" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="8.5" cy="9" r="7.5" fill="#EB001B"/><circle cx="15.5" cy="9" r="7.5" fill="#F79E1B"/><path d="M12 3.3A7.49 7.49 0 0 1 12 14.7 7.49 7.49 0 0 1 12 3.3Z" fill="#FF5F00"/></svg>';
|
|
875
858
|
var VISA_SVG = '<svg width="24" height="19" viewBox="0 0 24 19" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M24 0.00405757L15.7253 19H10.3255L6.25345 3.83691C6.17546 3.09873 5.70545 2.48223 5.05208 2.17398L5.03943 2.16789C3.58936 1.48244 1.90322 0.924752 0.139106 0.573914L0 0.551607L0.122245 0.00202878H8.81426C9.99877 0.00202878 10.9831 0.835522 11.1664 1.92454L11.1685 1.93671L13.3205 12.9303L18.636 0L24 0.00405757Z" fill="#1B33C3"/></svg>';
|
|
876
859
|
var JCB_SVG = '<svg width="24" height="19" viewBox="0 0 24 19" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_5933_159)"><path d="M23.9201 15.1208C23.9201 17.2137 22.2589 18.9179 20.2188 18.9179H0.0800781V3.8791C0.0800781 1.78623 1.7413 0.0820312 3.7814 0.0820312H23.9201V15.1208Z" fill="white"/><path d="M17.3625 11.264H18.8926C18.9363 11.264 19.0383 11.249 19.0821 11.249C19.3735 11.1892 19.6212 10.9201 19.6212 10.5464C19.6212 10.1876 19.3735 9.91855 19.0821 9.84381C19.0383 9.82886 18.9509 9.82886 18.8926 9.82886H17.3625V11.264Z" fill="url(#paint0_linear_5933_159)"/><path d="M18.7177 1.35266C17.2605 1.35266 16.0656 2.56354 16.0656 4.0734V6.89878H19.8106C19.8981 6.89878 20.0001 6.89878 20.0729 6.91373C20.9181 6.95857 21.5447 7.40705 21.5447 8.1844C21.5447 8.79731 21.1221 9.32053 20.3352 9.42517V9.45507C21.195 9.51487 21.8507 10.0082 21.8507 10.7706C21.8507 11.5928 21.1221 12.131 20.1604 12.131H16.051V17.6621H19.9418C21.399 17.6621 22.5939 16.4512 22.5939 14.9414V1.35266H18.7177Z" fill="url(#paint1_linear_5933_159)"/><path d="M19.4318 8.36381C19.4318 8.00504 19.1841 7.76585 18.8926 7.721C18.8635 7.721 18.7906 7.70605 18.7469 7.70605H17.3625V9.02158H18.7469C18.7906 9.02158 18.8781 9.02158 18.8926 9.00663C19.1841 8.96178 19.4318 8.72259 19.4318 8.36381Z" fill="url(#paint2_linear_5933_159)"/><path d="M4.0583 1.35266C2.60109 1.35266 1.40617 2.56354 1.40617 4.0734V10.7855C2.14935 11.1593 2.92168 11.3985 3.694 11.3985C4.61204 11.3985 5.10749 10.8304 5.10749 10.053V6.88383H7.38075V10.0381C7.38075 11.2639 6.63757 12.2655 4.11659 12.2655C2.58652 12.2655 1.3916 11.9217 1.3916 11.9217V17.6472H5.28236C6.73957 17.6472 7.93449 16.4363 7.93449 14.9264V1.35266H4.0583Z" fill="url(#paint3_linear_5933_159)"/><path d="M11.388 1.35266C9.93075 1.35266 8.73584 2.56354 8.73584 4.0734V7.63128C9.40616 7.04827 10.5719 6.67454 12.4517 6.76423C13.4572 6.80908 14.5355 7.09311 14.5355 7.09311V8.24419C13.9964 7.96016 13.3552 7.70603 12.5246 7.64623C11.0965 7.54159 10.2368 8.25914 10.2368 9.51487C10.2368 10.7855 11.0965 11.5031 12.5246 11.3835C13.3552 11.3237 13.9964 11.0546 14.5355 10.7855V11.9366C14.5355 11.9366 13.4718 12.2207 12.4517 12.2655C10.5719 12.3552 9.40616 11.9815 8.73584 11.3985V17.6771H12.6266C14.0838 17.6771 15.2787 16.4662 15.2787 14.9563V1.35266H11.388Z" fill="url(#paint4_linear_5933_159)"/></g><defs><linearGradient id="paint0_linear_5933_159" x1="16.0632" y1="10.5482" x2="22.6115" y2="10.5482" gradientUnits="userSpaceOnUse"><stop stop-color="#007940"/><stop offset="0.2285" stop-color="#00873F"/><stop offset="0.7433" stop-color="#40A737"/><stop offset="1" stop-color="#5CB531"/></linearGradient><linearGradient id="paint1_linear_5933_159" x1="16.063" y1="9.50087" x2="22.6118" y2="9.50087" gradientUnits="userSpaceOnUse"><stop stop-color="#007940"/><stop offset="0.2285" stop-color="#00873F"/><stop offset="0.7433" stop-color="#40A737"/><stop offset="1" stop-color="#5CB531"/></linearGradient><linearGradient id="paint2_linear_5933_159" x1="16.063" y1="8.36194" x2="22.6116" y2="8.36194" gradientUnits="userSpaceOnUse"><stop stop-color="#007940"/><stop offset="0.2285" stop-color="#00873F"/><stop offset="0.7433" stop-color="#40A737"/><stop offset="1" stop-color="#5CB531"/></linearGradient><linearGradient id="paint3_linear_5933_159" x1="1.40309" y1="9.50086" x2="8.05279" y2="9.50086" gradientUnits="userSpaceOnUse"><stop stop-color="#1F286F"/><stop offset="0.4751" stop-color="#004E94"/><stop offset="0.8261" stop-color="#0066B1"/><stop offset="1" stop-color="#006FBC"/></linearGradient><linearGradient id="paint4_linear_5933_159" x1="8.69816" y1="9.50086" x2="15.1566" y2="9.50086" gradientUnits="userSpaceOnUse"><stop stop-color="#6C2C2F"/><stop offset="0.1735" stop-color="#882730"/><stop offset="0.5731" stop-color="#BE1833"/><stop offset="0.8585" stop-color="#DC0436"/><stop offset="1" stop-color="#E60039"/></linearGradient><clipPath id="clip0_5933_159"><rect width="24" height="19" fill="white"/></clipPath></defs></svg>';
|
|
877
860
|
var UNIONPAY_SVG = '<svg width="256px" height="160px" viewBox="0 0 256 160" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"><g><path d="M50.041631,0.000667563305 L113.820211,0.000667563305 C122.723127,0.000667563305 128.260438,7.25731345 126.183558,16.1897657 L96.4900715,143.675416 C94.3945365,152.576777 85.480739,159.839641 76.571605,159.839641 L12.7992433,159.839641 C3.908764,159.839641 -1.64098444,152.576777 0.435896208,143.675416 L30.1418186,16.1897657 C32.2186993,7.25731345 41.1278333,0.000667563305 50.041631,0.000667563305" fill="#E21836"></path><path d="M108.513283,0.000667563305 L181.857018,0.000667563305 C190.758378,0.000667563305 186.744527,7.25731345 184.650546,16.1897657 L154.961724,143.675416 C152.878625,152.576777 153.528427,159.839641 144.608411,159.839641 L71.2646775,159.839641 C62.3446615,159.839641 56.8244495,152.576777 58.919985,143.675416 L88.6072525,16.1897657 C90.715224,7.25731345 99.6057035,0.000667563305 108.513283,0.000667563305" fill="#00447C"></path><path d="M178.94783,0.000667563305 L242.726409,0.000667563305 C251.641762,0.000667563305 257.179074,7.25731345 255.085093,16.1897657 L225.396271,143.675416 C223.300736,152.576777 214.380719,159.839641 205.466922,159.839641 L141.717879,159.839641 C132.797863,159.839641 127.265215,152.576777 129.354532,143.675416 L159.048017,16.1897657 C161.124899,7.25731345 170.027814,0.000667563305 178.94783,0.000667563305" fill="#007B84"></path><path d="M66.698338,40.8561434 C60.139686,40.9229891 58.202715,40.8561434 57.5840035,40.7100156 C57.346157,41.8401744 52.920349,62.256098 52.9079125,62.273198 C51.9549725,66.403641 51.261643,69.347961 48.9064975,71.2491775 C47.5695833,72.3544635 46.0088137,72.8876745 44.1993159,72.8876745 C41.2907503,72.8876745 39.5962892,71.4434965 39.3118063,68.704377 L39.2573971,67.7638735 C39.2573971,67.7638735 40.1434913,62.231225 40.1434913,62.200134 C40.1434913,62.200134 44.7884909,43.5952629 45.6201759,41.1359627 C45.6637033,40.9960531 45.6761397,40.9229891 45.6870215,40.8561434 C36.6457507,40.9354255 35.0430082,40.8561434 34.9326351,40.7100156 C34.8720075,40.9105527 34.6481522,42.0640298 34.6481522,42.0640298 L29.9052159,63.0333735 L29.4979234,64.8117805 L28.7097659,70.6289115 C28.7097659,72.3544635 29.0486581,73.762887 29.7233334,74.9536735 C31.8841598,78.729679 38.0479561,79.2955355 41.5348148,79.2955355 C46.0274683,79.2955355 50.241857,78.341041 53.089795,76.598389 C58.0332685,73.677387 59.3266555,69.1116695 60.4801325,65.0542905 L61.014898,62.972746 C61.014898,62.972746 65.7998075,43.6496723 66.6128375,41.1359627 C66.643929,40.9960531 66.656365,40.9229891 66.698338,40.8561434 Z M82.9786885,56.444252 C81.825211,56.444252 79.7172395,56.724071 77.823796,57.6521385 C77.1366845,58.0050215 76.486882,58.412314 75.8013245,58.818052 L76.420036,56.5841615 L76.081144,56.20796 C72.0657375,57.0209905 71.167207,57.129809 67.4580475,57.6521385 L67.147137,57.8588935 C66.7165265,61.4296985 66.3341065,64.1144085 64.7375825,71.133208 C64.129753,73.7199815 63.498605,76.331628 62.8659025,78.912183 L63.036903,79.2401935 C66.8377815,79.0396565 67.9912585,79.0396565 71.29468,79.0940655 L71.562063,78.8033645 C71.981792,76.65342 72.036201,76.1497455 72.965823,71.795447 C73.402652,69.7310025 74.313619,65.1948215 74.7628845,63.579643 C75.588351,63.197223 76.402936,62.8210215 77.1802115,62.8210215 C79.0316825,62.8210215 78.8062725,64.4362005 78.734763,65.079785 C78.655481,66.160198 77.9808055,69.68903 77.2890305,72.7188505 L76.8273285,74.674476 C76.5055365,76.1186545 76.152653,77.522414 75.830861,78.954156 L75.9707705,79.2401935 C79.7172395,79.0396565 80.859835,79.0396565 84.0591015,79.0940655 L84.435303,78.8033645 C85.013596,75.4455335 85.183042,74.547003 86.209046,69.6579385 L86.725157,67.411612 C87.727843,63.0153405 88.2315175,60.786114 87.4728965,58.970398 C86.670748,56.93549 84.7462135,56.444252 82.9786885,56.444252 Z M101.165696,61.047123 C99.1743155,61.429543 97.904247,61.684489 96.6419515,61.8492715 C95.3905375,62.049809 94.1702145,62.2316915 92.24568,62.499074 L92.093334,62.637429 L91.9534245,62.7478025 C91.7528875,64.181099 91.6129775,65.420076 91.3471495,66.876691 C91.1217395,68.383051 90.7750745,70.094612 90.2107725,72.5539125 C89.7739435,74.436474 89.5485335,75.092495 89.299805,75.754734 C89.057295,76.4169725 88.7899125,77.060557 88.298674,78.9120275 L88.413711,79.0830285 L88.510093,79.240038 C90.308709,79.1545375 91.4855045,79.09391 92.6949455,79.0830285 C93.902832,79.039501 95.1542455,79.0830285 97.0912165,79.09391 L97.260663,78.955555 L97.4425455,78.803209 C97.7223645,77.133621 97.7643375,76.6843555 97.935338,75.8697705 C98.104784,74.9961125 98.39704,73.786672 99.113688,70.556314 C99.4525805,69.039072 99.8303365,67.5264935 100.181665,65.97816 C100.546985,64.436045 100.929404,62.9172485 101.293169,61.4000065 L101.23876,61.2165695 L101.165696,61.047123 Z M101.208135,54.841043 C99.3986375,53.7730665 96.222689,54.1119585 94.0851805,55.587228 C91.953891,57.0329605 91.711381,59.0849685 93.5146605,60.166936 C95.293067,61.2053765 98.481452,60.896021 100.600305,59.408315 C102.726932,57.9314915 102.99276,55.898138 101.208135,54.841043 Z M112.151399,79.574733 C115.812368,79.574733 119.565055,78.565829 122.389675,75.571763 C124.562938,73.143554 125.559405,69.5307765 125.904516,68.043071 C127.028457,63.112034 126.153244,60.809743 125.054176,59.407538 C123.384588,57.2700295 120.43405,56.5844725 117.373138,56.5844725 C115.532549,56.5844725 111.148714,56.766355 107.724038,59.923649 C105.264737,62.2010665 104.12836,65.291515 103.442803,68.2544895 C102.751028,71.2734285 101.955097,76.70814 106.95298,78.7306115 C108.495095,79.3928505 110.718104,79.574733 112.151399,79.574733 Z M111.865362,68.4798995 C112.709484,64.7458675 113.705951,61.6118915 116.249197,61.6118915 C118.242132,61.6118915 118.386705,63.943719 117.500611,67.6901875 C117.342047,68.5218725 116.614517,71.6138755 115.630486,72.9305805 C114.943374,73.902175 114.130344,74.49135 113.231813,74.49135 C112.96443,74.49135 111.374124,74.49135 111.349251,72.1299865 C111.336815,70.964073 111.574661,69.7732865 111.865362,68.4798995 Z M135.05616,79.094532 L135.342197,78.803831 C135.747935,76.6538865 135.814781,76.148657 136.713312,71.7959135 C137.162577,69.731469 138.092198,65.195288 138.529028,63.580109 C139.356049,63.196135 140.156643,62.8199335 140.958791,62.8199335 C142.797825,62.8199335 142.57397,64.4351125 142.500907,65.0786965 C142.43406,66.1606645 141.759386,69.6879415 141.055173,72.717762 L140.618345,74.673388 C140.284116,76.1191205 139.920351,77.521326 139.598559,78.9546225 L139.738469,79.24066 C143.497374,79.0401225 144.596441,79.0401225 147.814363,79.094532 L148.203001,78.803831 C148.767303,75.4444455 148.919649,74.5459145 149.976744,69.658405 L150.480419,67.410524 C151.487768,63.0142525 151.99766,60.7865805 151.251476,58.9708645 C150.426009,56.9359565 148.489038,56.4447185 146.746386,56.4447185 C145.591354,56.4447185 143.472501,56.722983 141.589939,57.652605 C140.916819,58.005488 140.242143,58.411226 139.579904,58.8185185 L140.156643,56.584628 L139.847287,56.206872 C135.833436,57.021457 134.91625,57.1302755 131.211754,57.652605 L130.927271,57.85936 C130.478006,61.4301645 130.112686,64.1133205 128.516162,71.1336745 C127.908333,73.720448 127.277185,76.332094 126.646037,78.9126495 L126.815483,79.24066 C130.622579,79.0401225 131.758957,79.0401225 135.05616,79.094532 Z M162.673542,79.2398825 C162.909834,78.0864055 164.313594,71.2494885 164.32603,71.2494885 C164.32603,71.2494885 165.52148,66.232951 165.594545,66.0510685 C165.594545,66.0510685 165.970746,65.5287395 166.346947,65.321984 L166.900367,65.321984 C172.122106,65.321984 178.018519,65.321984 182.6402,61.92218 C185.785058,59.590353 187.935002,56.1470215 188.89416,51.9621695 C189.142889,50.9361655 189.326326,49.7158426 189.326326,48.4955199 C189.326326,46.8927774 189.004534,45.3071349 188.074912,44.0681575 C185.718212,40.770954 181.025022,40.7103265 175.60741,40.6854536 C175.59031,40.6854536 172.93669,40.7103265 172.93669,40.7103265 C166.001837,40.7958268 163.220744,40.770954 162.078149,40.6310444 C161.981767,41.1362735 161.799884,42.0348043 161.799884,42.0348043 C161.799884,42.0348043 159.315711,53.547812 159.315711,53.5664665 C159.315711,53.5664665 153.371107,78.0444325 153.091287,79.1979095 C159.146265,79.124846 161.628884,79.124846 162.673542,79.2398825 Z M167.276569,58.7882045 C167.276569,58.7882045 169.917752,47.2985153 169.905316,47.3420427 L169.990815,46.7528678 L170.028125,46.3036024 L171.083665,46.4124209 C171.083665,46.4124209 176.530813,46.8803409 176.658287,46.8927774 C178.808231,47.7244624 179.694325,49.8681887 179.075614,52.666381 C178.511312,55.223618 176.852606,57.373563 174.721316,58.412003 C172.966227,59.291879 170.816282,59.364943 168.601047,59.364943 L167.167751,59.364943 L167.276569,58.7882045 Z M183.721236,68.692718 C183.023242,71.668129 182.221093,77.102841 187.194103,79.039812 C188.779745,79.714487 190.200605,79.915024 191.644784,79.8419605 C193.169799,79.759569 194.582886,78.99473 195.891818,77.8941075 C195.773673,78.346482 195.655527,78.7988565 195.537381,79.2527855 L195.76279,79.5434865 C199.339813,79.392695 200.449763,79.392695 204.325259,79.4222315 L204.676588,79.1548485 C205.242445,75.8281085 205.775656,72.597751 207.246262,66.2334175 C207.962909,63.184942 208.678003,60.1660035 209.413306,57.1299645 L209.29827,56.795736 C205.296854,57.537257 204.227323,57.6958215 200.378253,58.241469 L200.085998,58.479315 C200.047134,58.788671 200.006716,59.08559 199.969406,59.3825095 C199.370904,58.4155785 198.503465,57.590112 197.164996,57.0755555 C195.453434,56.4024345 191.433365,57.269874 187.977597,60.416286 C185.549388,62.662613 184.383475,65.7406245 183.721236,68.692718 Z M192.12514,68.8746005 C192.981698,65.2074135 193.965729,62.104529 196.515194,62.104529 C198.127263,62.104529 198.976048,63.5922345 198.803493,66.1292625 C198.666693,66.761965 198.51901,67.4288675 198.343345,68.182825 C198.0884,69.2725655 197.811689,70.3529785 197.542752,71.4349465 C197.26915,72.174913 196.950468,72.8729065 196.600694,73.3377175 C195.944673,74.267339 194.383904,74.8440775 193.485373,74.8440775 C193.230426,74.8440775 191.65722,74.8440775 191.602811,72.524687 C191.590374,71.3696555 191.828221,70.1804235 192.12514,68.8746005 Z M236.010903,56.766044 L235.701548,56.413161 C231.742105,57.2153095 231.025456,57.3427825 227.387807,57.834021 L227.120423,58.1014035 C227.107988,58.144931 227.097105,58.211777 227.078451,58.2724045 L227.066014,58.211777 C224.357986,64.459519 224.437268,63.111723 222.232914,68.0303235 C222.220477,67.806468 222.220477,67.6665585 222.208042,67.428712 L221.656175,56.766044 L221.30951,56.413161 C217.161968,57.2153095 217.064031,57.3427825 213.233616,57.834021 L212.935143,58.1014035 C212.893169,58.228877 212.893169,58.3687865 212.868297,58.5211325 L212.893169,58.575542 C213.371971,61.022406 213.256934,60.4767585 213.737291,64.338264 C213.961146,66.233262 214.25962,68.139142 214.483475,70.010822 C214.861232,73.143243 215.072651,74.685358 215.534352,79.4656035 C212.947578,83.7344015 212.335085,85.3495805 209.844694,89.0960495 L209.861794,89.1333585 L208.10826,91.906678 C207.907723,92.198934 207.725841,92.399471 207.470894,92.4849715 C207.191075,92.6233265 206.82731,92.648199 206.32208,92.648199 L205.350486,92.648199 L203.906308,97.451763 L208.860663,97.5372635 C211.769228,97.524827 213.597381,96.1645945 214.581412,94.336442 L217.696733,88.9981125 L217.646987,88.9981125 L217.974998,88.621911 C220.070533,84.110603 236.010903,56.766044 236.010903,56.766044 Z M183.72108,119.853625 L181.619326,119.853625 L189.398302,94.1242455 L191.978857,94.1242455 L192.798105,91.4737355 L192.877387,94.421165 C192.781005,96.243099 194.214302,97.858278 197.979425,97.5908955 L202.333723,97.5908955 L203.832311,92.63654 L202.193814,92.63654 C201.251756,92.63654 200.814927,92.3986935 200.869337,91.888801 L200.790054,88.890071 L192.726596,88.890071 L192.726596,88.9056165 C190.119614,88.960026 182.33442,89.1558995 180.758105,89.5756285 C178.850671,90.0668665 176.840635,91.5125995 176.840635,91.5125995 L177.630347,88.85898 L170.087664,88.85898 L168.516013,94.1242455 L160.632883,120.246927 L159.103204,120.246927 L157.603062,125.165528 L172.626247,125.165528 L172.122572,126.805579 L179.525345,126.805579 L180.016584,125.165528 L182.093465,125.165528 L183.72108,119.853625 Z M177.557284,99.352202 C176.349398,99.6864305 174.101516,100.699998 174.101516,100.699998 L176.100669,94.1242455 L182.093465,94.1242455 L180.647732,98.915373 C180.647732,98.915373 178.796261,99.0241915 177.557284,99.352202 Z M177.672321,108.746356 C177.672321,108.746356 175.789759,108.982648 174.550781,109.262467 C173.330458,109.632451 171.042159,110.798364 171.042159,110.798364 L173.106603,103.955229 L179.13049,103.955229 L177.672321,108.746356 Z M174.31449,119.914253 L168.30304,119.914253 L170.045692,114.139095 L176.038487,114.139095 L174.31449,119.914253 Z M188.791404,103.955229 L197.456474,103.955229 L196.211278,107.987735 L187.431173,107.987735 L186.112912,112.396443 L193.795505,112.396443 L187.978375,120.587374 C187.571082,121.188986 187.205762,121.401959 186.800025,121.571405 C186.392732,121.77816 185.857967,122.02067 185.239255,122.02067 L183.107965,122.02067 L181.643577,126.849107 L187.218198,126.849107 C190.115882,126.849107 191.827443,125.530847 193.091294,123.800631 L197.080273,118.341047 L197.936831,123.884578 C198.118713,124.923017 198.864898,125.530847 199.370127,125.767139 C199.928211,126.046958 200.50495,126.527315 201.319535,126.598824 C202.193192,126.636133 202.82434,126.66567 203.244069,126.66567 L205.983189,126.66567 L207.627904,121.262049 L206.547491,121.262049 C205.927224,121.262049 204.859248,121.157894 204.677366,120.963575 C204.495483,120.727283 204.495483,120.363518 204.397546,119.810098 L203.528552,114.254131 L199.970183,114.254131 L201.530954,112.396443 L210.293959,112.396443 L211.641755,107.987735 L203.528552,107.987735 L204.792402,103.955229 L212.880733,103.955229 L214.380875,98.982219 L190.266674,98.982219 L188.791404,103.955229 Z M115.605924,121.037106 L117.628395,114.309008 L125.940582,114.309008 L127.459378,109.304907 L119.139419,109.304907 L120.409488,105.163582 L128.539791,105.163582 L130.046152,100.318045 L109.703292,100.318045 L108.228023,105.163582 L112.849704,105.163582 L111.616945,109.304907 L106.982827,109.304907 L105.446931,114.394508 L110.067057,114.394508 L107.371465,123.295869 C107.0077,124.474219 107.542466,124.923484 107.881358,125.470686 C108.228023,126.003897 108.579352,126.35678 109.369064,126.557317 C110.183649,126.7392 110.741733,126.848018 111.500354,126.848018 L120.87119,126.848018 L122.540778,121.304488 L118.387016,121.875009 C117.584868,121.875009 115.363414,121.778627 115.605924,121.037106 Z M116.55933,88.8286665 L114.452913,92.635763 C114.002093,93.4674475 113.596355,93.983559 113.231036,94.221405 C112.909244,94.4219425 112.271878,94.505888 111.348474,94.505888 L110.249406,94.505888 L108.780355,99.3762975 L112.430442,99.3762975 C114.18553,99.3762975 115.533326,98.7327135 116.176911,98.410921 C116.868686,98.040938 117.050568,98.252357 117.585334,97.736246 L118.818094,96.668269 L130.216064,96.668269 L131.728643,91.5973225 L123.385365,91.5973225 L124.84198,88.8286665 L116.55933,88.8286665 Z M133.386416,121.134887 C133.192097,120.855067 133.332007,120.362275 133.628926,119.336271 L136.744247,109.024932 L147.826644,109.024932 C149.441823,109.001614 150.607736,108.982959 151.366357,108.92855 C152.180942,108.843049 153.067037,108.552348 154.032413,108.030019 C155.028881,107.482817 155.538773,106.906078 155.969384,106.243839 C156.44974,105.583155 157.220798,104.137422 157.883037,101.908196 L161.798952,88.859291 L150.298381,88.926137 C150.298381,88.926137 146.757113,89.448466 145.197898,90.0252045 C143.624692,90.668789 141.37681,92.4658505 141.37681,92.4658505 L142.415251,88.8888275 L135.31095,88.8888275 L125.364931,121.874854 C125.012048,123.155803 124.775756,124.085425 124.721347,124.643509 C124.702692,125.245121 125.479968,125.840514 125.983643,126.289779 C126.579036,126.739045 127.458911,126.665981 128.303033,126.739045 C129.190682,126.805891 130.452978,126.847863 132.195629,126.847863 L137.655214,126.847863 L139.33102,121.189296 L134.443511,121.650998 C133.921182,121.650998 133.543426,121.371178 133.386416,121.134887 Z M138.754282,102.060541 L150.394763,102.060541 L149.654797,104.379932 C149.550642,104.434341 149.301913,104.264895 148.117345,104.404805 L138.037634,104.404805 L138.754282,102.060541 Z M141.086109,94.2815665 L152.824526,94.2815665 L151.980405,97.075095 C151.980405,97.075095 146.447757,97.020686 145.561663,97.1839135 C141.662847,97.858589 139.38543,99.941688 139.38543,99.941688 L141.086109,94.2815665 Z M149.915339,112.146937 C149.818957,112.493602 149.666611,112.705021 149.453638,112.863585 C149.217345,113.015931 148.834926,113.07034 148.264406,113.07034 L146.605699,113.07034 L146.703636,110.245721 L139.804537,110.245721 L139.524718,124.054801 C139.513836,125.051268 139.610218,125.628007 140.339303,126.089709 C141.068387,126.666447 143.314714,126.739511 146.338316,126.739511 L150.661524,126.739511 L152.222294,121.570628 L148.458724,121.777383 L147.207311,121.850447 C147.03631,121.777383 146.873082,121.710537 146.6912,121.528655 C146.532635,121.371645 146.265253,121.468028 146.30878,120.47156 L146.338316,116.931847 L150.285323,116.768619 C152.416613,116.768619 153.32758,116.075288 154.104855,115.414604 C154.846376,114.781902 155.088886,114.054372 155.368706,113.07034 L156.030945,109.936365 L150.607114,109.936365 L149.915339,112.146937 Z" fill="#FEFEFE"></path></g></svg>';
|
|
878
861
|
function MastercardIcon({ size = 24 }) {
|
|
879
|
-
return /* @__PURE__ */
|
|
862
|
+
return /* @__PURE__ */ jsx5(SvgXml2, { xml: MASTERCARD_SVG, width: size, height: size * (18 / 24) });
|
|
880
863
|
}
|
|
881
864
|
function VisaIcon({ size = 24 }) {
|
|
882
|
-
return /* @__PURE__ */
|
|
865
|
+
return /* @__PURE__ */ jsx5(SvgXml2, { xml: VISA_SVG, width: size, height: size * (19 / 24) });
|
|
883
866
|
}
|
|
884
867
|
function JcbIcon({ size = 24 }) {
|
|
885
|
-
return /* @__PURE__ */
|
|
868
|
+
return /* @__PURE__ */ jsx5(SvgXml2, { xml: JCB_SVG, width: size, height: size * (19 / 24) });
|
|
886
869
|
}
|
|
887
870
|
function UnionPayIcon({ size = 24 }) {
|
|
888
|
-
return /* @__PURE__ */
|
|
871
|
+
return /* @__PURE__ */ jsx5(SvgXml2, { xml: UNIONPAY_SVG, width: size, height: size * (160 / 256) });
|
|
889
872
|
}
|
|
890
873
|
|
|
891
874
|
// src/icons/PaymentMethodIcon.tsx
|
|
892
|
-
import { jsx as
|
|
875
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
893
876
|
var CARD_ICON = "https://sdk-cdn.fun.xyz/images/swapped/card-payment.svg";
|
|
894
877
|
var BRAND_ICONS = {
|
|
895
878
|
mastercard: MastercardIcon,
|
|
@@ -903,9 +886,9 @@ function PaymentMethodIcon({ fop }) {
|
|
|
903
886
|
if (isSavedFormOfPaymentType(fop)) {
|
|
904
887
|
const BrandIcon = BRAND_ICONS[fop.cardBrand.replace(/ /g, "_").toLowerCase()];
|
|
905
888
|
if (BrandIcon) {
|
|
906
|
-
return /* @__PURE__ */
|
|
889
|
+
return /* @__PURE__ */ jsx6(BrandIcon, { size: 32 });
|
|
907
890
|
}
|
|
908
|
-
return /* @__PURE__ */
|
|
891
|
+
return /* @__PURE__ */ jsx6(
|
|
909
892
|
FunIcon,
|
|
910
893
|
{
|
|
911
894
|
uri: genericCardIcon(isDarkMode),
|
|
@@ -913,7 +896,7 @@ function PaymentMethodIcon({ fop }) {
|
|
|
913
896
|
}
|
|
914
897
|
);
|
|
915
898
|
}
|
|
916
|
-
return /* @__PURE__ */
|
|
899
|
+
return /* @__PURE__ */ jsx6(
|
|
917
900
|
FunIcon,
|
|
918
901
|
{
|
|
919
902
|
uri: getSwappedIcon(fop, isDarkMode),
|
|
@@ -928,7 +911,7 @@ var chainIconUri = (chainKey) => `${CDN_BASE}/${chainKey}.svg`;
|
|
|
928
911
|
var tokenLogoUri = (symbol) => ASSET_LOGO_SRCS[symbol.toUpperCase()] ?? `${CDN_BASE}/${symbol.toLowerCase()}.svg`;
|
|
929
912
|
|
|
930
913
|
// src/icons/QrChainCluster.tsx
|
|
931
|
-
import { jsx as
|
|
914
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
932
915
|
function toIconUri(icon) {
|
|
933
916
|
return icon.startsWith("http") ? icon : chainIconUri(icon);
|
|
934
917
|
}
|
|
@@ -944,7 +927,7 @@ function QrChainCluster({ iconKeys, max = 4 }) {
|
|
|
944
927
|
return null;
|
|
945
928
|
}
|
|
946
929
|
if (keys.length === 1) {
|
|
947
|
-
return /* @__PURE__ */
|
|
930
|
+
return /* @__PURE__ */ jsx7(Box, { alignItems: "center", justifyContent: "center", style: card, children: /* @__PURE__ */ jsx7(Box, { style: ring(SINGLE_SIZE), children: /* @__PURE__ */ jsx7(
|
|
948
931
|
FunIcon,
|
|
949
932
|
{
|
|
950
933
|
uri: toIconUri(first),
|
|
@@ -953,7 +936,7 @@ function QrChainCluster({ iconKeys, max = 4 }) {
|
|
|
953
936
|
}
|
|
954
937
|
) }) });
|
|
955
938
|
}
|
|
956
|
-
return /* @__PURE__ */
|
|
939
|
+
return /* @__PURE__ */ jsx7(Box, { alignItems: "center", justifyContent: "center", style: card, children: /* @__PURE__ */ jsx7(Box, { flexDirection: "row", flexWrap: "wrap", style: grid, children: keys.map((key) => /* @__PURE__ */ jsx7(Box, { style: ring(GRID_SIZE), children: /* @__PURE__ */ jsx7(
|
|
957
940
|
FunIcon,
|
|
958
941
|
{
|
|
959
942
|
uri: toIconUri(key),
|
|
@@ -982,13 +965,13 @@ var ring = (iconSize) => ({
|
|
|
982
965
|
|
|
983
966
|
// src/icons/FigmaSystemIcons.tsx
|
|
984
967
|
import { SvgXml as SvgXml3 } from "react-native-svg";
|
|
985
|
-
import { jsx as
|
|
968
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
986
969
|
function useIconColor(color) {
|
|
987
970
|
const theme = useTheme();
|
|
988
971
|
return color ?? theme.content.elements.primary;
|
|
989
972
|
}
|
|
990
973
|
function renderIcon(svg, size, color) {
|
|
991
|
-
return /* @__PURE__ */
|
|
974
|
+
return /* @__PURE__ */ jsx8(
|
|
992
975
|
SvgXml3,
|
|
993
976
|
{
|
|
994
977
|
xml: svg.replace(/currentColor/g, color),
|
|
@@ -1026,7 +1009,7 @@ function FigmaChevronLeftIcon({ size = 20, color }) {
|
|
|
1026
1009
|
return renderIcon(CHEVRON_LEFT_SVG, size, useIconColor(color));
|
|
1027
1010
|
}
|
|
1028
1011
|
function FigmaSuccessCheckIcon({ size = 16 }) {
|
|
1029
|
-
return /* @__PURE__ */
|
|
1012
|
+
return /* @__PURE__ */ jsx8(SvgXml3, { xml: SUCCESS_CHECK_SVG, width: size, height: size });
|
|
1030
1013
|
}
|
|
1031
1014
|
function FigmaChevronDownIcon({ size = 16, color }) {
|
|
1032
1015
|
return renderIcon(CHEVRON_DOWN_SVG, size, useIconColor(color));
|
|
@@ -1055,7 +1038,7 @@ function FigmaAlertCircleIcon({ size = 22, color }) {
|
|
|
1055
1038
|
}
|
|
1056
1039
|
|
|
1057
1040
|
// src/icons/SourceTokenCluster.tsx
|
|
1058
|
-
import { jsx as
|
|
1041
|
+
import { jsx as jsx9, jsxs } from "react/jsx-runtime";
|
|
1059
1042
|
function toIconUri2(icon) {
|
|
1060
1043
|
return icon.startsWith("http") ? icon : chainIconUri(icon);
|
|
1061
1044
|
}
|
|
@@ -1070,14 +1053,14 @@ function SourceTokenCluster({
|
|
|
1070
1053
|
const visible = icons.slice(0, maxVisible);
|
|
1071
1054
|
const overflow = icons.length - visible.length;
|
|
1072
1055
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "center", style: { gap }, children: [
|
|
1073
|
-
visible.map((icon) => /* @__PURE__ */
|
|
1056
|
+
visible.map((icon) => /* @__PURE__ */ jsx9(
|
|
1074
1057
|
Box,
|
|
1075
1058
|
{
|
|
1076
1059
|
style: [
|
|
1077
1060
|
iconRing(size),
|
|
1078
1061
|
{ backgroundColor: theme.background.secondary }
|
|
1079
1062
|
],
|
|
1080
|
-
children: /* @__PURE__ */
|
|
1063
|
+
children: /* @__PURE__ */ jsx9(
|
|
1081
1064
|
FunIcon,
|
|
1082
1065
|
{
|
|
1083
1066
|
uri: toIconUri2(icon),
|
|
@@ -1092,7 +1075,7 @@ function SourceTokenCluster({
|
|
|
1092
1075
|
// Both chips are a fixed `size`×`size` circle (Figma). The "+" glyph sits
|
|
1093
1076
|
// on `bgSecondary` (Add money `crypto2`); the "+N" count on `pillPressed`
|
|
1094
1077
|
// (Transfer `tap-target`).
|
|
1095
|
-
/* @__PURE__ */
|
|
1078
|
+
/* @__PURE__ */ jsx9(
|
|
1096
1079
|
Box,
|
|
1097
1080
|
{
|
|
1098
1081
|
alignItems: "center",
|
|
@@ -1105,14 +1088,14 @@ function SourceTokenCluster({
|
|
|
1105
1088
|
],
|
|
1106
1089
|
children: overflowMode === "plus" ? (
|
|
1107
1090
|
// The geometric "+" glyph centers cleanly; the text "+" did not.
|
|
1108
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ jsx9(
|
|
1109
1092
|
FigmaPlusIcon,
|
|
1110
1093
|
{
|
|
1111
1094
|
size,
|
|
1112
1095
|
color: theme.content.elements.secondary
|
|
1113
1096
|
}
|
|
1114
1097
|
)
|
|
1115
|
-
) : /* @__PURE__ */
|
|
1098
|
+
) : /* @__PURE__ */ jsx9(
|
|
1116
1099
|
Text,
|
|
1117
1100
|
{
|
|
1118
1101
|
variant: "bodyMedium",
|
|
@@ -1151,7 +1134,7 @@ var overflowText = (size) => ({
|
|
|
1151
1134
|
});
|
|
1152
1135
|
|
|
1153
1136
|
// src/icons/TokenChainIcon.tsx
|
|
1154
|
-
import { jsx as
|
|
1137
|
+
import { jsx as jsx10, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1155
1138
|
function TokenChainIcon({
|
|
1156
1139
|
symbol,
|
|
1157
1140
|
iconSrc,
|
|
@@ -1163,7 +1146,7 @@ function TokenChainIcon({
|
|
|
1163
1146
|
const badge = Math.round(size * 0.5);
|
|
1164
1147
|
const badgeUri = chainIconSrc ?? (chainKey ? chainIconUri(chainKey) : void 0);
|
|
1165
1148
|
return /* @__PURE__ */ jsxs2(Box, { width: size, height: size, children: [
|
|
1166
|
-
/* @__PURE__ */
|
|
1149
|
+
/* @__PURE__ */ jsx10(
|
|
1167
1150
|
FunIcon,
|
|
1168
1151
|
{
|
|
1169
1152
|
uri: iconSrc ?? tokenLogoUri(symbol),
|
|
@@ -1171,7 +1154,7 @@ function TokenChainIcon({
|
|
|
1171
1154
|
fallbackUri: FALLBACK_ASSET_LOGO
|
|
1172
1155
|
}
|
|
1173
1156
|
),
|
|
1174
|
-
badgeUri ? /* @__PURE__ */
|
|
1157
|
+
badgeUri ? /* @__PURE__ */ jsx10(
|
|
1175
1158
|
Box,
|
|
1176
1159
|
{
|
|
1177
1160
|
borderRadius: "rounded",
|
|
@@ -1181,7 +1164,7 @@ function TokenChainIcon({
|
|
|
1181
1164
|
badgeRing(badge),
|
|
1182
1165
|
{ backgroundColor: theme.background.modal }
|
|
1183
1166
|
],
|
|
1184
|
-
children: /* @__PURE__ */
|
|
1167
|
+
children: /* @__PURE__ */ jsx10(
|
|
1185
1168
|
FunIcon,
|
|
1186
1169
|
{
|
|
1187
1170
|
uri: badgeUri,
|
|
@@ -1206,17 +1189,17 @@ import { Linking, Pressable, StyleSheet as StyleSheet2 } from "react-native";
|
|
|
1206
1189
|
|
|
1207
1190
|
// src/icons/StatusIcon.tsx
|
|
1208
1191
|
import { StyleSheet } from "react-native";
|
|
1209
|
-
import { jsx as
|
|
1192
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1210
1193
|
function StatusIcon() {
|
|
1211
1194
|
const theme = useTheme();
|
|
1212
|
-
return /* @__PURE__ */
|
|
1195
|
+
return /* @__PURE__ */ jsx11(
|
|
1213
1196
|
Box,
|
|
1214
1197
|
{
|
|
1215
1198
|
borderRadius: "rounded",
|
|
1216
1199
|
alignItems: "center",
|
|
1217
1200
|
justifyContent: "center",
|
|
1218
1201
|
style: [styles.circle, { backgroundColor: theme.background.secondary }],
|
|
1219
|
-
children: /* @__PURE__ */
|
|
1202
|
+
children: /* @__PURE__ */ jsx11(
|
|
1220
1203
|
FigmaAlertCircleIcon,
|
|
1221
1204
|
{
|
|
1222
1205
|
size: 20,
|
|
@@ -1231,7 +1214,7 @@ var styles = StyleSheet.create({
|
|
|
1231
1214
|
});
|
|
1232
1215
|
|
|
1233
1216
|
// src/screens/CheckoutBlockedScreen.tsx
|
|
1234
|
-
import { jsx as
|
|
1217
|
+
import { jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1235
1218
|
var FUN_REGIONAL_RESTRICTIONS_URL = "https://intercom.help/funxyz/en/articles/9827689-regional-restrictions";
|
|
1236
1219
|
function CheckoutBlockedScreen() {
|
|
1237
1220
|
const { t } = useFunkitTranslation();
|
|
@@ -1244,7 +1227,7 @@ function CheckoutBlockedScreen() {
|
|
|
1244
1227
|
style: { backgroundColor: theme.background.modal },
|
|
1245
1228
|
children: [
|
|
1246
1229
|
/* @__PURE__ */ jsxs3(Box, { alignItems: "center", style: styles2.topBar, children: [
|
|
1247
|
-
/* @__PURE__ */
|
|
1230
|
+
/* @__PURE__ */ jsx12(
|
|
1248
1231
|
Box,
|
|
1249
1232
|
{
|
|
1250
1233
|
style: [
|
|
@@ -1253,7 +1236,7 @@ function CheckoutBlockedScreen() {
|
|
|
1253
1236
|
]
|
|
1254
1237
|
}
|
|
1255
1238
|
),
|
|
1256
|
-
/* @__PURE__ */
|
|
1239
|
+
/* @__PURE__ */ jsx12(
|
|
1257
1240
|
Text,
|
|
1258
1241
|
{
|
|
1259
1242
|
variant: "bodyMedium",
|
|
@@ -1263,9 +1246,9 @@ function CheckoutBlockedScreen() {
|
|
|
1263
1246
|
)
|
|
1264
1247
|
] }),
|
|
1265
1248
|
/* @__PURE__ */ jsxs3(Box, { alignItems: "center", justifyContent: "center", style: styles2.content, children: [
|
|
1266
|
-
/* @__PURE__ */
|
|
1249
|
+
/* @__PURE__ */ jsx12(StatusIcon, {}),
|
|
1267
1250
|
/* @__PURE__ */ jsxs3(Box, { alignItems: "center", style: styles2.textGroup, children: [
|
|
1268
|
-
/* @__PURE__ */
|
|
1251
|
+
/* @__PURE__ */ jsx12(
|
|
1269
1252
|
Text,
|
|
1270
1253
|
{
|
|
1271
1254
|
variant: "bodyMedium",
|
|
@@ -1274,7 +1257,7 @@ function CheckoutBlockedScreen() {
|
|
|
1274
1257
|
}
|
|
1275
1258
|
),
|
|
1276
1259
|
/* @__PURE__ */ jsxs3(Box, { alignItems: "center", children: [
|
|
1277
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ jsx12(
|
|
1278
1261
|
Text,
|
|
1279
1262
|
{
|
|
1280
1263
|
variant: "detail",
|
|
@@ -1285,11 +1268,11 @@ function CheckoutBlockedScreen() {
|
|
|
1285
1268
|
children: t("checkoutBlocked.regionMessage")
|
|
1286
1269
|
}
|
|
1287
1270
|
),
|
|
1288
|
-
/* @__PURE__ */
|
|
1271
|
+
/* @__PURE__ */ jsx12(
|
|
1289
1272
|
Pressable,
|
|
1290
1273
|
{
|
|
1291
1274
|
onPress: () => Linking.openURL(FUN_REGIONAL_RESTRICTIONS_URL),
|
|
1292
|
-
children: /* @__PURE__ */
|
|
1275
|
+
children: /* @__PURE__ */ jsx12(
|
|
1293
1276
|
Text,
|
|
1294
1277
|
{
|
|
1295
1278
|
variant: "detail",
|
|
@@ -1335,17 +1318,17 @@ import { Pressable as Pressable2 } from "react-native";
|
|
|
1335
1318
|
|
|
1336
1319
|
// src/components/Grabber.tsx
|
|
1337
1320
|
import { StyleSheet as StyleSheet3 } from "react-native";
|
|
1338
|
-
import { jsx as
|
|
1321
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1339
1322
|
function Grabber() {
|
|
1340
1323
|
const theme = useTheme();
|
|
1341
|
-
return /* @__PURE__ */
|
|
1324
|
+
return /* @__PURE__ */ jsx13(
|
|
1342
1325
|
Box,
|
|
1343
1326
|
{
|
|
1344
1327
|
testID: "grabber",
|
|
1345
1328
|
alignItems: "center",
|
|
1346
1329
|
pointerEvents: "none",
|
|
1347
1330
|
style: styles3.overlay,
|
|
1348
|
-
children: /* @__PURE__ */
|
|
1331
|
+
children: /* @__PURE__ */ jsx13(
|
|
1349
1332
|
Box,
|
|
1350
1333
|
{
|
|
1351
1334
|
style: [
|
|
@@ -1372,11 +1355,11 @@ function useScreenSize() {
|
|
|
1372
1355
|
|
|
1373
1356
|
// src/icons/CopyAddressIcon.tsx
|
|
1374
1357
|
import { SvgXml as SvgXml4 } from "react-native-svg";
|
|
1375
|
-
import { jsx as
|
|
1358
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1376
1359
|
var COPY_ADDRESS_SVG = `<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.2 5.8V4.26C10.2 3.64394 10.2 3.33591 10.0801 3.10061C9.97465 2.89363 9.80637 2.72535 9.59939 2.61989C9.36409 2.5 9.05606 2.5 8.44 2.5H4.26C3.64394 2.5 3.33591 2.5 3.10061 2.61989C2.89363 2.72535 2.72535 2.89363 2.61989 3.10061C2.5 3.33591 2.5 3.64394 2.5 4.26V8.44C2.5 9.05606 2.5 9.36409 2.61989 9.59939C2.72535 9.80637 2.89363 9.97465 3.10061 10.0801C3.33591 10.2 3.64394 10.2 4.26 10.2H5.8M7.56 13.5H11.74C12.3561 13.5 12.6641 13.5 12.8994 13.3801C13.1064 13.2746 13.2746 13.1064 13.3801 12.8994C13.5 12.6641 13.5 12.3561 13.5 11.74V7.56C13.5 6.94394 13.5 6.63591 13.3801 6.40061C13.2746 6.19363 13.1064 6.02535 12.8994 5.91989C12.6641 5.8 12.3561 5.8 11.74 5.8H7.56C6.94394 5.8 6.63591 5.8 6.40061 5.91989C6.19363 6.02535 6.02535 6.19363 5.91989 6.40061C5.8 6.63591 5.8 6.94394 5.8 7.56V11.74C5.8 12.3561 5.8 12.6641 5.91989 12.8994C6.02535 13.1064 6.19363 13.2746 6.40061 13.3801C6.63591 13.5 6.94394 13.5 7.56 13.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
|
|
1377
1360
|
function CopyAddressIcon({ size = 16 }) {
|
|
1378
1361
|
const theme = useTheme();
|
|
1379
|
-
return /* @__PURE__ */
|
|
1362
|
+
return /* @__PURE__ */ jsx14(
|
|
1380
1363
|
SvgXml4,
|
|
1381
1364
|
{
|
|
1382
1365
|
xml: COPY_ADDRESS_SVG,
|
|
@@ -1388,7 +1371,7 @@ function CopyAddressIcon({ size = 16 }) {
|
|
|
1388
1371
|
}
|
|
1389
1372
|
|
|
1390
1373
|
// src/screens/QrCodeScreen.tsx
|
|
1391
|
-
import { jsx as
|
|
1374
|
+
import { jsx as jsx15, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1392
1375
|
function QrCodeScreen(props) {
|
|
1393
1376
|
const { t } = useFunkitTranslation();
|
|
1394
1377
|
const {
|
|
@@ -1407,7 +1390,9 @@ function QrCodeScreen(props) {
|
|
|
1407
1390
|
useEffect5(() => () => clearTimeout(copyTimer.current), []);
|
|
1408
1391
|
const handleCopy = async () => {
|
|
1409
1392
|
const ok = await onCopyAddress?.();
|
|
1410
|
-
if (ok === false)
|
|
1393
|
+
if (ok === false) {
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1411
1396
|
setCopied(true);
|
|
1412
1397
|
clearTimeout(copyTimer.current);
|
|
1413
1398
|
copyTimer.current = setTimeout(() => setCopied(false), copiedFeedbackMs);
|
|
@@ -1420,8 +1405,8 @@ function QrCodeScreen(props) {
|
|
|
1420
1405
|
style: [sheet, { backgroundColor: theme.background.modal }],
|
|
1421
1406
|
children: [
|
|
1422
1407
|
/* @__PURE__ */ jsxs4(Box, { alignItems: "center", style: topBar, children: [
|
|
1423
|
-
/* @__PURE__ */
|
|
1424
|
-
/* @__PURE__ */
|
|
1408
|
+
/* @__PURE__ */ jsx15(Grabber, {}),
|
|
1409
|
+
/* @__PURE__ */ jsx15(
|
|
1425
1410
|
Text,
|
|
1426
1411
|
{
|
|
1427
1412
|
variant: "bodyMedium",
|
|
@@ -1453,7 +1438,7 @@ function QrCodeScreen(props) {
|
|
|
1453
1438
|
],
|
|
1454
1439
|
children: [
|
|
1455
1440
|
qrCode,
|
|
1456
|
-
centerIcon ? /* @__PURE__ */
|
|
1441
|
+
centerIcon ? /* @__PURE__ */ jsx15(
|
|
1457
1442
|
Box,
|
|
1458
1443
|
{
|
|
1459
1444
|
alignItems: "center",
|
|
@@ -1466,7 +1451,7 @@ function QrCodeScreen(props) {
|
|
|
1466
1451
|
}
|
|
1467
1452
|
),
|
|
1468
1453
|
address ? /* @__PURE__ */ jsxs4(Box, { alignItems: "center", style: addressGroup, children: [
|
|
1469
|
-
/* @__PURE__ */
|
|
1454
|
+
/* @__PURE__ */ jsx15(
|
|
1470
1455
|
Text,
|
|
1471
1456
|
{
|
|
1472
1457
|
variant: "body",
|
|
@@ -1477,7 +1462,7 @@ function QrCodeScreen(props) {
|
|
|
1477
1462
|
children: address
|
|
1478
1463
|
}
|
|
1479
1464
|
),
|
|
1480
|
-
onCopyAddress ? /* @__PURE__ */
|
|
1465
|
+
onCopyAddress ? /* @__PURE__ */ jsx15(
|
|
1481
1466
|
Pressable2,
|
|
1482
1467
|
{
|
|
1483
1468
|
onPress: handleCopy,
|
|
@@ -1499,8 +1484,8 @@ function QrCodeScreen(props) {
|
|
|
1499
1484
|
}
|
|
1500
1485
|
],
|
|
1501
1486
|
children: [
|
|
1502
|
-
/* @__PURE__ */
|
|
1503
|
-
/* @__PURE__ */
|
|
1487
|
+
/* @__PURE__ */ jsx15(CopyAddressIcon, {}),
|
|
1488
|
+
/* @__PURE__ */ jsx15(
|
|
1504
1489
|
Text,
|
|
1505
1490
|
{
|
|
1506
1491
|
variant: "bodyMedium",
|
|
@@ -1517,13 +1502,13 @@ function QrCodeScreen(props) {
|
|
|
1517
1502
|
]
|
|
1518
1503
|
}
|
|
1519
1504
|
),
|
|
1520
|
-
/* @__PURE__ */
|
|
1505
|
+
/* @__PURE__ */ jsx15(Box, { style: buttonContainer, children: /* @__PURE__ */ jsx15(
|
|
1521
1506
|
Pressable2,
|
|
1522
1507
|
{
|
|
1523
1508
|
onPress: onClose,
|
|
1524
1509
|
accessibilityRole: "button",
|
|
1525
1510
|
accessibilityLabel: doneLabel,
|
|
1526
|
-
children: /* @__PURE__ */
|
|
1511
|
+
children: /* @__PURE__ */ jsx15(
|
|
1527
1512
|
Box,
|
|
1528
1513
|
{
|
|
1529
1514
|
flexDirection: "row",
|
|
@@ -1534,7 +1519,7 @@ function QrCodeScreen(props) {
|
|
|
1534
1519
|
doneButton,
|
|
1535
1520
|
{ backgroundColor: theme.background.button.primary.default }
|
|
1536
1521
|
],
|
|
1537
|
-
children: /* @__PURE__ */
|
|
1522
|
+
children: /* @__PURE__ */ jsx15(
|
|
1538
1523
|
Text,
|
|
1539
1524
|
{
|
|
1540
1525
|
variant: "bodyMedium",
|
|
@@ -1601,7 +1586,7 @@ import { useSafeAreaInsets as useSafeAreaInsets2 } from "react-native-safe-area-
|
|
|
1601
1586
|
import { useRef as useRef3, useState as useState6 } from "react";
|
|
1602
1587
|
import { StyleSheet as StyleSheet4, View } from "react-native";
|
|
1603
1588
|
import Svg, { Defs, LinearGradient, Rect, Stop } from "react-native-svg";
|
|
1604
|
-
import { jsx as
|
|
1589
|
+
import { jsx as jsx16, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1605
1590
|
var SCROLL_FADE_HEIGHT = 42;
|
|
1606
1591
|
var SCROLL_EPSILON = 1;
|
|
1607
1592
|
function ScrollFade({
|
|
@@ -1611,14 +1596,14 @@ function ScrollFade({
|
|
|
1611
1596
|
}) {
|
|
1612
1597
|
const gradientId = `${id}-fade-${edge}`;
|
|
1613
1598
|
const topOpaque = edge === "top";
|
|
1614
|
-
return /* @__PURE__ */
|
|
1599
|
+
return /* @__PURE__ */ jsx16(
|
|
1615
1600
|
View,
|
|
1616
1601
|
{
|
|
1617
1602
|
pointerEvents: "none",
|
|
1618
1603
|
style: [styles4.fade, edge === "top" ? { top: 0 } : { bottom: 0 }],
|
|
1619
1604
|
children: /* @__PURE__ */ jsxs5(Svg, { width: "100%", height: "100%", children: [
|
|
1620
|
-
/* @__PURE__ */
|
|
1621
|
-
/* @__PURE__ */
|
|
1605
|
+
/* @__PURE__ */ jsx16(Defs, { children: /* @__PURE__ */ jsxs5(LinearGradient, { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
1606
|
+
/* @__PURE__ */ jsx16(
|
|
1622
1607
|
Stop,
|
|
1623
1608
|
{
|
|
1624
1609
|
offset: "0",
|
|
@@ -1626,7 +1611,7 @@ function ScrollFade({
|
|
|
1626
1611
|
stopOpacity: topOpaque ? 1 : 0
|
|
1627
1612
|
}
|
|
1628
1613
|
),
|
|
1629
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ jsx16(
|
|
1630
1615
|
Stop,
|
|
1631
1616
|
{
|
|
1632
1617
|
offset: "1",
|
|
@@ -1635,7 +1620,7 @@ function ScrollFade({
|
|
|
1635
1620
|
}
|
|
1636
1621
|
)
|
|
1637
1622
|
] }) }),
|
|
1638
|
-
/* @__PURE__ */
|
|
1623
|
+
/* @__PURE__ */ jsx16(
|
|
1639
1624
|
Rect,
|
|
1640
1625
|
{
|
|
1641
1626
|
x: "0",
|
|
@@ -1703,9 +1688,9 @@ function useNestedSheetHeight() {
|
|
|
1703
1688
|
|
|
1704
1689
|
// src/icons/ChainAvatar.tsx
|
|
1705
1690
|
import { StyleSheet as StyleSheet5 } from "react-native";
|
|
1706
|
-
import { jsx as
|
|
1691
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1707
1692
|
function ChainAvatar({ uri, size = 36 }) {
|
|
1708
|
-
return /* @__PURE__ */
|
|
1693
|
+
return /* @__PURE__ */ jsx17(Box, { style: [styles5.ring, { width: size, height: size }], children: /* @__PURE__ */ jsx17(FunIcon, { uri, size, fallbackUri: FALLBACK_ASSET_LOGO }) });
|
|
1709
1694
|
}
|
|
1710
1695
|
var styles5 = StyleSheet5.create({
|
|
1711
1696
|
// `border/icon` has no dark-mode counterpart in the token export, so it isn't
|
|
@@ -1721,7 +1706,7 @@ var styles5 = StyleSheet5.create({
|
|
|
1721
1706
|
});
|
|
1722
1707
|
|
|
1723
1708
|
// src/screens/SelectChainScreen.tsx
|
|
1724
|
-
import { jsx as
|
|
1709
|
+
import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1725
1710
|
function SelectChainScreen(props) {
|
|
1726
1711
|
const { t } = useFunkitTranslation();
|
|
1727
1712
|
const { onBack, ...chainList } = props;
|
|
@@ -1740,8 +1725,8 @@ function SelectChainScreen(props) {
|
|
|
1740
1725
|
},
|
|
1741
1726
|
children: [
|
|
1742
1727
|
/* @__PURE__ */ jsxs6(Box, { style: styles6.backTopBar, children: [
|
|
1743
|
-
/* @__PURE__ */
|
|
1744
|
-
/* @__PURE__ */
|
|
1728
|
+
/* @__PURE__ */ jsx18(Grabber, {}),
|
|
1729
|
+
/* @__PURE__ */ jsx18(
|
|
1745
1730
|
Pressable3,
|
|
1746
1731
|
{
|
|
1747
1732
|
onPress: onBack,
|
|
@@ -1749,7 +1734,7 @@ function SelectChainScreen(props) {
|
|
|
1749
1734
|
accessibilityRole: "button",
|
|
1750
1735
|
accessibilityLabel: t("common.back"),
|
|
1751
1736
|
style: styles6.backPress,
|
|
1752
|
-
children: /* @__PURE__ */
|
|
1737
|
+
children: /* @__PURE__ */ jsx18(
|
|
1753
1738
|
Box,
|
|
1754
1739
|
{
|
|
1755
1740
|
alignItems: "center",
|
|
@@ -1761,7 +1746,7 @@ function SelectChainScreen(props) {
|
|
|
1761
1746
|
borderColor: theme.border.elements.default.color
|
|
1762
1747
|
}
|
|
1763
1748
|
],
|
|
1764
|
-
children: /* @__PURE__ */
|
|
1749
|
+
children: /* @__PURE__ */ jsx18(
|
|
1765
1750
|
FigmaChevronLeftIcon,
|
|
1766
1751
|
{
|
|
1767
1752
|
size: 24,
|
|
@@ -1773,12 +1758,12 @@ function SelectChainScreen(props) {
|
|
|
1773
1758
|
}
|
|
1774
1759
|
)
|
|
1775
1760
|
] }),
|
|
1776
|
-
/* @__PURE__ */
|
|
1761
|
+
/* @__PURE__ */ jsx18(
|
|
1777
1762
|
ChainList,
|
|
1778
1763
|
{
|
|
1779
1764
|
...chainList,
|
|
1780
1765
|
header: /* @__PURE__ */ jsxs6(Box, { style: styles6.titleBlock, children: [
|
|
1781
|
-
/* @__PURE__ */
|
|
1766
|
+
/* @__PURE__ */ jsx18(
|
|
1782
1767
|
Text,
|
|
1783
1768
|
{
|
|
1784
1769
|
variant: "bodyMedium",
|
|
@@ -1789,7 +1774,7 @@ function SelectChainScreen(props) {
|
|
|
1789
1774
|
children: t("selectChain.title")
|
|
1790
1775
|
}
|
|
1791
1776
|
),
|
|
1792
|
-
/* @__PURE__ */
|
|
1777
|
+
/* @__PURE__ */ jsx18(
|
|
1793
1778
|
Text,
|
|
1794
1779
|
{
|
|
1795
1780
|
variant: "body",
|
|
@@ -1823,8 +1808,8 @@ function ChangeChainScreen(props) {
|
|
|
1823
1808
|
},
|
|
1824
1809
|
children: [
|
|
1825
1810
|
/* @__PURE__ */ jsxs6(Box, { alignItems: "center", style: styles6.titleTopBar, children: [
|
|
1826
|
-
/* @__PURE__ */
|
|
1827
|
-
/* @__PURE__ */
|
|
1811
|
+
/* @__PURE__ */ jsx18(Grabber, {}),
|
|
1812
|
+
/* @__PURE__ */ jsx18(
|
|
1828
1813
|
Text,
|
|
1829
1814
|
{
|
|
1830
1815
|
variant: "bodyMedium",
|
|
@@ -1833,14 +1818,14 @@ function ChangeChainScreen(props) {
|
|
|
1833
1818
|
}
|
|
1834
1819
|
)
|
|
1835
1820
|
] }),
|
|
1836
|
-
/* @__PURE__ */
|
|
1837
|
-
/* @__PURE__ */
|
|
1821
|
+
/* @__PURE__ */ jsx18(ChainList, { ...chainList }),
|
|
1822
|
+
/* @__PURE__ */ jsx18(Box, { style: styles6.buttonContainer, children: /* @__PURE__ */ jsx18(
|
|
1838
1823
|
Pressable3,
|
|
1839
1824
|
{
|
|
1840
1825
|
onPress: onCancel,
|
|
1841
1826
|
accessibilityRole: "button",
|
|
1842
1827
|
accessibilityLabel: cancelLabel,
|
|
1843
|
-
children: /* @__PURE__ */
|
|
1828
|
+
children: /* @__PURE__ */ jsx18(
|
|
1844
1829
|
Box,
|
|
1845
1830
|
{
|
|
1846
1831
|
alignItems: "center",
|
|
@@ -1850,7 +1835,7 @@ function ChangeChainScreen(props) {
|
|
|
1850
1835
|
styles6.cancelButton,
|
|
1851
1836
|
{ backgroundColor: theme.background.button.primary.default }
|
|
1852
1837
|
],
|
|
1853
|
-
children: /* @__PURE__ */
|
|
1838
|
+
children: /* @__PURE__ */ jsx18(
|
|
1854
1839
|
Text,
|
|
1855
1840
|
{
|
|
1856
1841
|
variant: "bodyMedium",
|
|
@@ -1886,7 +1871,7 @@ function ChainList({
|
|
|
1886
1871
|
...scrollProps,
|
|
1887
1872
|
children: [
|
|
1888
1873
|
header,
|
|
1889
|
-
loading2 ? Array.from({ length: skeletonCount }, (_, index) => /* @__PURE__ */
|
|
1874
|
+
loading2 ? Array.from({ length: skeletonCount }, (_, index) => /* @__PURE__ */ jsx18(ChainRowSkeleton, {}, index)) : chains.map((chain) => /* @__PURE__ */ jsx18(
|
|
1890
1875
|
ChainRow,
|
|
1891
1876
|
{
|
|
1892
1877
|
chain,
|
|
@@ -1898,8 +1883,8 @@ function ChainList({
|
|
|
1898
1883
|
]
|
|
1899
1884
|
}
|
|
1900
1885
|
),
|
|
1901
|
-
showTopFade ? /* @__PURE__ */
|
|
1902
|
-
showBottomFade ? /* @__PURE__ */
|
|
1886
|
+
showTopFade ? /* @__PURE__ */ jsx18(ScrollFade, { edge: "top", color: theme.background.modal, id: "chain-list" }) : null,
|
|
1887
|
+
showBottomFade ? /* @__PURE__ */ jsx18(
|
|
1903
1888
|
ScrollFade,
|
|
1904
1889
|
{
|
|
1905
1890
|
edge: "bottom",
|
|
@@ -1915,7 +1900,7 @@ function ChainRow({
|
|
|
1915
1900
|
onPress
|
|
1916
1901
|
}) {
|
|
1917
1902
|
const theme = useTheme();
|
|
1918
|
-
return /* @__PURE__ */
|
|
1903
|
+
return /* @__PURE__ */ jsx18(
|
|
1919
1904
|
Pressable3,
|
|
1920
1905
|
{
|
|
1921
1906
|
onPress: () => onPress?.(chain),
|
|
@@ -1933,8 +1918,8 @@ function ChainRow({
|
|
|
1933
1918
|
selected ? { backgroundColor: theme.background.secondary } : null
|
|
1934
1919
|
],
|
|
1935
1920
|
children: [
|
|
1936
|
-
/* @__PURE__ */
|
|
1937
|
-
/* @__PURE__ */
|
|
1921
|
+
/* @__PURE__ */ jsx18(ChainAvatar, { uri: chain.iconUri }),
|
|
1922
|
+
/* @__PURE__ */ jsx18(Box, { flex: 1, children: /* @__PURE__ */ jsx18(
|
|
1938
1923
|
Text,
|
|
1939
1924
|
{
|
|
1940
1925
|
variant: "bodyMedium",
|
|
@@ -1943,7 +1928,7 @@ function ChainRow({
|
|
|
1943
1928
|
children: chain.name
|
|
1944
1929
|
}
|
|
1945
1930
|
) }),
|
|
1946
|
-
selected ? /* @__PURE__ */
|
|
1931
|
+
selected ? /* @__PURE__ */ jsx18(FigmaCheckIcon, { size: 20, color: theme.content.elements.secondary }) : null
|
|
1947
1932
|
]
|
|
1948
1933
|
}
|
|
1949
1934
|
)
|
|
@@ -1953,7 +1938,7 @@ function ChainRow({
|
|
|
1953
1938
|
function ChainRowSkeleton() {
|
|
1954
1939
|
const theme = useTheme();
|
|
1955
1940
|
return /* @__PURE__ */ jsxs6(Box, { flexDirection: "row", alignItems: "center", style: styles6.row, children: [
|
|
1956
|
-
/* @__PURE__ */
|
|
1941
|
+
/* @__PURE__ */ jsx18(
|
|
1957
1942
|
Box,
|
|
1958
1943
|
{
|
|
1959
1944
|
style: [
|
|
@@ -1962,7 +1947,7 @@ function ChainRowSkeleton() {
|
|
|
1962
1947
|
]
|
|
1963
1948
|
}
|
|
1964
1949
|
),
|
|
1965
|
-
/* @__PURE__ */
|
|
1950
|
+
/* @__PURE__ */ jsx18(Box, { flex: 1, children: /* @__PURE__ */ jsx18(
|
|
1966
1951
|
Box,
|
|
1967
1952
|
{
|
|
1968
1953
|
style: [
|
|
@@ -2054,7 +2039,7 @@ function usePulse() {
|
|
|
2054
2039
|
}
|
|
2055
2040
|
|
|
2056
2041
|
// src/screens/SelectMethodScreen.tsx
|
|
2057
|
-
import { Fragment
|
|
2042
|
+
import { Fragment, jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2058
2043
|
var DROPDOWN_OPEN_DURATION = 250;
|
|
2059
2044
|
var DROPDOWN_CLOSE_DURATION = 150;
|
|
2060
2045
|
var DROPDOWN_EASING = Easing.bezier(0.22, 1, 0.36, 1);
|
|
@@ -2121,8 +2106,8 @@ function SelectMethodScreen(props) {
|
|
|
2121
2106
|
const [dropdownOpen, setDropdownOpen] = useState7(initialDropdownOpen);
|
|
2122
2107
|
const scrimVisible = !error && showDropdown && dropdownOpen;
|
|
2123
2108
|
const methodRows = methods.map((method, i) => /* @__PURE__ */ jsxs7(Box, { children: [
|
|
2124
|
-
i > 0 ? /* @__PURE__ */
|
|
2125
|
-
/* @__PURE__ */
|
|
2109
|
+
i > 0 ? /* @__PURE__ */ jsx19(MethodDivider, {}) : null,
|
|
2110
|
+
/* @__PURE__ */ jsx19(
|
|
2126
2111
|
Pressable4,
|
|
2127
2112
|
{
|
|
2128
2113
|
onPress: method.disabled ? void 0 : () => onSelectMethod(method.id),
|
|
@@ -2131,11 +2116,11 @@ function SelectMethodScreen(props) {
|
|
|
2131
2116
|
accessibilityLabel: method.title,
|
|
2132
2117
|
accessibilityState: { disabled: !!method.disabled },
|
|
2133
2118
|
style: method.disabled ? { opacity: theme.opacity.disabled / 100 } : void 0,
|
|
2134
|
-
children: /* @__PURE__ */
|
|
2119
|
+
children: /* @__PURE__ */ jsx19(PaymentMethodRow, { method })
|
|
2135
2120
|
}
|
|
2136
2121
|
)
|
|
2137
2122
|
] }, method.id));
|
|
2138
|
-
const noteText = note ? /* @__PURE__ */
|
|
2123
|
+
const noteText = note ? /* @__PURE__ */ jsx19(Box, { style: noteBox, children: /* @__PURE__ */ jsx19(
|
|
2139
2124
|
Text,
|
|
2140
2125
|
{
|
|
2141
2126
|
variant: "detail",
|
|
@@ -2151,7 +2136,7 @@ function SelectMethodScreen(props) {
|
|
|
2151
2136
|
style: { backgroundColor: theme.background.modal },
|
|
2152
2137
|
children: [
|
|
2153
2138
|
/* @__PURE__ */ jsxs7(Box, { alignItems: "center", style: topBar2, children: [
|
|
2154
|
-
/* @__PURE__ */
|
|
2139
|
+
/* @__PURE__ */ jsx19(
|
|
2155
2140
|
Box,
|
|
2156
2141
|
{
|
|
2157
2142
|
style: [
|
|
@@ -2160,7 +2145,7 @@ function SelectMethodScreen(props) {
|
|
|
2160
2145
|
]
|
|
2161
2146
|
}
|
|
2162
2147
|
),
|
|
2163
|
-
/* @__PURE__ */
|
|
2148
|
+
/* @__PURE__ */ jsx19(
|
|
2164
2149
|
Text,
|
|
2165
2150
|
{
|
|
2166
2151
|
variant: "bodyMedium",
|
|
@@ -2169,22 +2154,22 @@ function SelectMethodScreen(props) {
|
|
|
2169
2154
|
}
|
|
2170
2155
|
)
|
|
2171
2156
|
] }),
|
|
2172
|
-
error ? /* @__PURE__ */
|
|
2157
|
+
error ? /* @__PURE__ */ jsx19(
|
|
2173
2158
|
SelectMethodError,
|
|
2174
2159
|
{
|
|
2175
2160
|
title: errorTitle,
|
|
2176
2161
|
message: errorMessage,
|
|
2177
2162
|
onRetry
|
|
2178
2163
|
}
|
|
2179
|
-
) : loading2 ? /* @__PURE__ */
|
|
2164
|
+
) : loading2 ? /* @__PURE__ */ jsx19(
|
|
2180
2165
|
SelectMethodLoading,
|
|
2181
2166
|
{
|
|
2182
2167
|
count: skeletonCount,
|
|
2183
2168
|
showDropdown: Boolean(showDropdown)
|
|
2184
2169
|
}
|
|
2185
|
-
) : /* @__PURE__ */ jsxs7(
|
|
2170
|
+
) : /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
2186
2171
|
showDropdown ? /* @__PURE__ */ jsxs7(Box, { style: depositSection, children: [
|
|
2187
|
-
/* @__PURE__ */
|
|
2172
|
+
/* @__PURE__ */ jsx19(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx19(
|
|
2188
2173
|
Text,
|
|
2189
2174
|
{
|
|
2190
2175
|
variant: "detail",
|
|
@@ -2193,7 +2178,7 @@ function SelectMethodScreen(props) {
|
|
|
2193
2178
|
children: t("selectMethod.depositTo")
|
|
2194
2179
|
}
|
|
2195
2180
|
) }),
|
|
2196
|
-
/* @__PURE__ */
|
|
2181
|
+
/* @__PURE__ */ jsx19(
|
|
2197
2182
|
ReceiveTokenDropdown,
|
|
2198
2183
|
{
|
|
2199
2184
|
tokens: receiveTokens,
|
|
@@ -2211,7 +2196,7 @@ function SelectMethodScreen(props) {
|
|
|
2211
2196
|
// "Pay with" section: a labeled, bordered card wrapping the method
|
|
2212
2197
|
// rows with hairline dividers between them (Figma node 11202:8282).
|
|
2213
2198
|
/* @__PURE__ */ jsxs7(Box, { style: payWithSection, children: [
|
|
2214
|
-
/* @__PURE__ */
|
|
2199
|
+
/* @__PURE__ */ jsx19(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx19(
|
|
2215
2200
|
Text,
|
|
2216
2201
|
{
|
|
2217
2202
|
variant: "detail",
|
|
@@ -2220,7 +2205,7 @@ function SelectMethodScreen(props) {
|
|
|
2220
2205
|
children: t("selectMethod.payWith")
|
|
2221
2206
|
}
|
|
2222
2207
|
) }),
|
|
2223
|
-
/* @__PURE__ */
|
|
2208
|
+
/* @__PURE__ */ jsx19(
|
|
2224
2209
|
Box,
|
|
2225
2210
|
{
|
|
2226
2211
|
borderWidth: 1,
|
|
@@ -2253,7 +2238,7 @@ function SelectMethodScreen(props) {
|
|
|
2253
2238
|
)
|
|
2254
2239
|
)
|
|
2255
2240
|
] }),
|
|
2256
|
-
scrimVisible ? /* @__PURE__ */
|
|
2241
|
+
scrimVisible ? /* @__PURE__ */ jsx19(
|
|
2257
2242
|
AnimatedPressable,
|
|
2258
2243
|
{
|
|
2259
2244
|
entering: scrimEnter,
|
|
@@ -2277,9 +2262,9 @@ function SelectMethodError({
|
|
|
2277
2262
|
const theme = useTheme();
|
|
2278
2263
|
const retryLabel = t("common.tryAgain");
|
|
2279
2264
|
return /* @__PURE__ */ jsxs7(Box, { alignItems: "center", justifyContent: "center", style: errorContainer, children: [
|
|
2280
|
-
/* @__PURE__ */
|
|
2265
|
+
/* @__PURE__ */ jsx19(StatusIcon, {}),
|
|
2281
2266
|
/* @__PURE__ */ jsxs7(Box, { alignItems: "center", style: errorText, children: [
|
|
2282
|
-
/* @__PURE__ */
|
|
2267
|
+
/* @__PURE__ */ jsx19(
|
|
2283
2268
|
Text,
|
|
2284
2269
|
{
|
|
2285
2270
|
variant: "bodyMedium",
|
|
@@ -2287,7 +2272,7 @@ function SelectMethodError({
|
|
|
2287
2272
|
children: title
|
|
2288
2273
|
}
|
|
2289
2274
|
),
|
|
2290
|
-
/* @__PURE__ */
|
|
2275
|
+
/* @__PURE__ */ jsx19(
|
|
2291
2276
|
Text,
|
|
2292
2277
|
{
|
|
2293
2278
|
variant: "detail",
|
|
@@ -2299,13 +2284,13 @@ function SelectMethodError({
|
|
|
2299
2284
|
}
|
|
2300
2285
|
)
|
|
2301
2286
|
] }),
|
|
2302
|
-
onRetry ? /* @__PURE__ */
|
|
2287
|
+
onRetry ? /* @__PURE__ */ jsx19(
|
|
2303
2288
|
Pressable4,
|
|
2304
2289
|
{
|
|
2305
2290
|
onPress: onRetry,
|
|
2306
2291
|
accessibilityRole: "button",
|
|
2307
2292
|
accessibilityLabel: retryLabel,
|
|
2308
|
-
children: /* @__PURE__ */
|
|
2293
|
+
children: /* @__PURE__ */ jsx19(
|
|
2309
2294
|
Box,
|
|
2310
2295
|
{
|
|
2311
2296
|
borderRadius: "button",
|
|
@@ -2315,7 +2300,7 @@ function SelectMethodError({
|
|
|
2315
2300
|
retryButton,
|
|
2316
2301
|
{ backgroundColor: theme.background.button.primary.default }
|
|
2317
2302
|
],
|
|
2318
|
-
children: /* @__PURE__ */
|
|
2303
|
+
children: /* @__PURE__ */ jsx19(
|
|
2319
2304
|
Text,
|
|
2320
2305
|
{
|
|
2321
2306
|
variant: "bodyMedium",
|
|
@@ -2339,9 +2324,9 @@ function PaymentMethodRow({ method }) {
|
|
|
2339
2324
|
gap: "elementsHorizontal",
|
|
2340
2325
|
style: row,
|
|
2341
2326
|
children: [
|
|
2342
|
-
/* @__PURE__ */
|
|
2327
|
+
/* @__PURE__ */ jsx19(Box, { width: 48, height: 48, alignItems: "center", justifyContent: "center", children: method.icon }),
|
|
2343
2328
|
/* @__PURE__ */ jsxs7(Box, { flex: 1, style: details, children: [
|
|
2344
|
-
/* @__PURE__ */
|
|
2329
|
+
/* @__PURE__ */ jsx19(
|
|
2345
2330
|
Text,
|
|
2346
2331
|
{
|
|
2347
2332
|
variant: "bodyMedium",
|
|
@@ -2349,7 +2334,7 @@ function PaymentMethodRow({ method }) {
|
|
|
2349
2334
|
children: method.title
|
|
2350
2335
|
}
|
|
2351
2336
|
),
|
|
2352
|
-
method.subtitle ? /* @__PURE__ */
|
|
2337
|
+
method.subtitle ? /* @__PURE__ */ jsx19(
|
|
2353
2338
|
Text,
|
|
2354
2339
|
{
|
|
2355
2340
|
variant: "detail",
|
|
@@ -2365,7 +2350,7 @@ function PaymentMethodRow({ method }) {
|
|
|
2365
2350
|
}
|
|
2366
2351
|
function MethodDivider() {
|
|
2367
2352
|
const theme = useTheme();
|
|
2368
|
-
return /* @__PURE__ */
|
|
2353
|
+
return /* @__PURE__ */ jsx19(
|
|
2369
2354
|
Box,
|
|
2370
2355
|
{
|
|
2371
2356
|
style: [
|
|
@@ -2385,7 +2370,7 @@ function ReceiveTokenDropdown({
|
|
|
2385
2370
|
const theme = useTheme();
|
|
2386
2371
|
const selectable = tokens.length > 1;
|
|
2387
2372
|
return /* @__PURE__ */ jsxs7(Box, { style: dropdownAnchor, children: [
|
|
2388
|
-
/* @__PURE__ */
|
|
2373
|
+
/* @__PURE__ */ jsx19(
|
|
2389
2374
|
Pressable4,
|
|
2390
2375
|
{
|
|
2391
2376
|
onPress: selectable ? onToggle : void 0,
|
|
@@ -2408,8 +2393,8 @@ function ReceiveTokenDropdown({
|
|
|
2408
2393
|
],
|
|
2409
2394
|
children: [
|
|
2410
2395
|
/* @__PURE__ */ jsxs7(Box, { flexDirection: "row", alignItems: "center", style: triggerLeft, children: [
|
|
2411
|
-
selected.icon ?? /* @__PURE__ */
|
|
2412
|
-
/* @__PURE__ */
|
|
2396
|
+
selected.icon ?? /* @__PURE__ */ jsx19(ReceiveTokenIconFallback, {}),
|
|
2397
|
+
/* @__PURE__ */ jsx19(
|
|
2413
2398
|
Text,
|
|
2414
2399
|
{
|
|
2415
2400
|
variant: "bodyMedium",
|
|
@@ -2419,24 +2404,24 @@ function ReceiveTokenDropdown({
|
|
|
2419
2404
|
}
|
|
2420
2405
|
)
|
|
2421
2406
|
] }),
|
|
2422
|
-
selectable ? /* @__PURE__ */
|
|
2407
|
+
selectable ? /* @__PURE__ */ jsx19(AnimatedChevron, { open }) : null
|
|
2423
2408
|
]
|
|
2424
2409
|
}
|
|
2425
2410
|
)
|
|
2426
2411
|
}
|
|
2427
2412
|
),
|
|
2428
|
-
open && selectable ? /* @__PURE__ */
|
|
2413
|
+
open && selectable ? /* @__PURE__ */ jsx19(
|
|
2429
2414
|
Reanimated.View,
|
|
2430
2415
|
{
|
|
2431
2416
|
entering: menuEnter,
|
|
2432
2417
|
exiting: menuExit,
|
|
2433
2418
|
style: dropdownMenuOverlay,
|
|
2434
|
-
children: /* @__PURE__ */
|
|
2419
|
+
children: /* @__PURE__ */ jsx19(
|
|
2435
2420
|
Box,
|
|
2436
2421
|
{
|
|
2437
2422
|
borderRadius: "element",
|
|
2438
2423
|
style: [dropdownMenu, { backgroundColor: theme.background.modal }],
|
|
2439
|
-
children: tokens.map((token) => /* @__PURE__ */
|
|
2424
|
+
children: tokens.map((token) => /* @__PURE__ */ jsx19(
|
|
2440
2425
|
Pressable4,
|
|
2441
2426
|
{
|
|
2442
2427
|
onPress: () => onSelect(token.id),
|
|
@@ -2457,8 +2442,8 @@ function ReceiveTokenDropdown({
|
|
|
2457
2442
|
alignItems: "center",
|
|
2458
2443
|
style: triggerLeft,
|
|
2459
2444
|
children: [
|
|
2460
|
-
token.icon ?? /* @__PURE__ */
|
|
2461
|
-
/* @__PURE__ */
|
|
2445
|
+
token.icon ?? /* @__PURE__ */ jsx19(ReceiveTokenIconFallback, {}),
|
|
2446
|
+
/* @__PURE__ */ jsx19(
|
|
2462
2447
|
Text,
|
|
2463
2448
|
{
|
|
2464
2449
|
variant: "bodyMedium",
|
|
@@ -2469,7 +2454,7 @@ function ReceiveTokenDropdown({
|
|
|
2469
2454
|
]
|
|
2470
2455
|
}
|
|
2471
2456
|
),
|
|
2472
|
-
token.id === selected.id ? /* @__PURE__ */
|
|
2457
|
+
token.id === selected.id ? /* @__PURE__ */ jsx19(CheckIcon, {}) : null
|
|
2473
2458
|
]
|
|
2474
2459
|
}
|
|
2475
2460
|
)
|
|
@@ -2484,7 +2469,7 @@ function ReceiveTokenDropdown({
|
|
|
2484
2469
|
}
|
|
2485
2470
|
function ReceiveTokenIconFallback() {
|
|
2486
2471
|
const theme = useTheme();
|
|
2487
|
-
return /* @__PURE__ */
|
|
2472
|
+
return /* @__PURE__ */ jsx19(
|
|
2488
2473
|
Box,
|
|
2489
2474
|
{
|
|
2490
2475
|
width: 24,
|
|
@@ -2495,7 +2480,7 @@ function ReceiveTokenIconFallback() {
|
|
|
2495
2480
|
);
|
|
2496
2481
|
}
|
|
2497
2482
|
function ChevronDownIcon() {
|
|
2498
|
-
return /* @__PURE__ */
|
|
2483
|
+
return /* @__PURE__ */ jsx19(FigmaChevronDownIcon, { size: 16 });
|
|
2499
2484
|
}
|
|
2500
2485
|
function AnimatedChevron({ open }) {
|
|
2501
2486
|
const rotation = useSharedValue(open ? 1 : 0);
|
|
@@ -2509,10 +2494,10 @@ function AnimatedChevron({ open }) {
|
|
|
2509
2494
|
"worklet";
|
|
2510
2495
|
return { transform: [{ rotate: `${rotation.value * 180}deg` }] };
|
|
2511
2496
|
});
|
|
2512
|
-
return /* @__PURE__ */
|
|
2497
|
+
return /* @__PURE__ */ jsx19(Reanimated.View, { style, children: /* @__PURE__ */ jsx19(FigmaChevronDownIcon, { size: 16 }) });
|
|
2513
2498
|
}
|
|
2514
2499
|
function CheckIcon() {
|
|
2515
|
-
return /* @__PURE__ */
|
|
2500
|
+
return /* @__PURE__ */ jsx19(FigmaCheckIcon, { size: 16 });
|
|
2516
2501
|
}
|
|
2517
2502
|
function SelectMethodLoading({
|
|
2518
2503
|
count,
|
|
@@ -2522,9 +2507,9 @@ function SelectMethodLoading({
|
|
|
2522
2507
|
const theme = useTheme();
|
|
2523
2508
|
const opacity = usePulse();
|
|
2524
2509
|
const rowCount = count ?? (showDropdown ? 5 : 6);
|
|
2525
|
-
return /* @__PURE__ */ jsxs7(
|
|
2510
|
+
return /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
2526
2511
|
showDropdown ? /* @__PURE__ */ jsxs7(Box, { style: depositSection, children: [
|
|
2527
|
-
/* @__PURE__ */
|
|
2512
|
+
/* @__PURE__ */ jsx19(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx19(
|
|
2528
2513
|
Text,
|
|
2529
2514
|
{
|
|
2530
2515
|
variant: "detail",
|
|
@@ -2549,7 +2534,7 @@ function SelectMethodLoading({
|
|
|
2549
2534
|
],
|
|
2550
2535
|
children: [
|
|
2551
2536
|
/* @__PURE__ */ jsxs7(Animated2.View, { style: [loadingSelectorLeft, { opacity }], children: [
|
|
2552
|
-
/* @__PURE__ */
|
|
2537
|
+
/* @__PURE__ */ jsx19(
|
|
2553
2538
|
Box,
|
|
2554
2539
|
{
|
|
2555
2540
|
width: 20,
|
|
@@ -2558,7 +2543,7 @@ function SelectMethodLoading({
|
|
|
2558
2543
|
style: { backgroundColor: theme.background.pill.pressed }
|
|
2559
2544
|
}
|
|
2560
2545
|
),
|
|
2561
|
-
/* @__PURE__ */
|
|
2546
|
+
/* @__PURE__ */ jsx19(
|
|
2562
2547
|
Box,
|
|
2563
2548
|
{
|
|
2564
2549
|
style: [
|
|
@@ -2568,13 +2553,13 @@ function SelectMethodLoading({
|
|
|
2568
2553
|
}
|
|
2569
2554
|
)
|
|
2570
2555
|
] }),
|
|
2571
|
-
/* @__PURE__ */
|
|
2556
|
+
/* @__PURE__ */ jsx19(ChevronDownIcon, {})
|
|
2572
2557
|
]
|
|
2573
2558
|
}
|
|
2574
2559
|
)
|
|
2575
2560
|
] }) : null,
|
|
2576
2561
|
showDropdown ? /* @__PURE__ */ jsxs7(Box, { style: payWithSection, children: [
|
|
2577
|
-
/* @__PURE__ */
|
|
2562
|
+
/* @__PURE__ */ jsx19(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx19(
|
|
2578
2563
|
Text,
|
|
2579
2564
|
{
|
|
2580
2565
|
variant: "detail",
|
|
@@ -2582,7 +2567,7 @@ function SelectMethodLoading({
|
|
|
2582
2567
|
children: t("selectMethod.payWith")
|
|
2583
2568
|
}
|
|
2584
2569
|
) }),
|
|
2585
|
-
/* @__PURE__ */
|
|
2570
|
+
/* @__PURE__ */ jsx19(
|
|
2586
2571
|
Box,
|
|
2587
2572
|
{
|
|
2588
2573
|
borderWidth: 1,
|
|
@@ -2594,22 +2579,22 @@ function SelectMethodLoading({
|
|
|
2594
2579
|
borderColor: theme.border.elements.default.color
|
|
2595
2580
|
}
|
|
2596
2581
|
],
|
|
2597
|
-
children: /* @__PURE__ */
|
|
2582
|
+
children: /* @__PURE__ */ jsx19(
|
|
2598
2583
|
Animated2.View,
|
|
2599
2584
|
{
|
|
2600
2585
|
style: { opacity },
|
|
2601
2586
|
accessibilityLabel: t("selectMethod.loadingMethods"),
|
|
2602
|
-
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */
|
|
2587
|
+
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */ jsx19(PaymentMethodRowSkeleton, {}, i))
|
|
2603
2588
|
}
|
|
2604
2589
|
)
|
|
2605
2590
|
}
|
|
2606
2591
|
)
|
|
2607
|
-
] }) : /* @__PURE__ */
|
|
2592
|
+
] }) : /* @__PURE__ */ jsx19(Box, { style: skeletonListContent, children: /* @__PURE__ */ jsx19(
|
|
2608
2593
|
Animated2.View,
|
|
2609
2594
|
{
|
|
2610
2595
|
style: { opacity },
|
|
2611
2596
|
accessibilityLabel: t("selectMethod.loadingMethods"),
|
|
2612
|
-
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */
|
|
2597
|
+
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */ jsx19(PaymentMethodRowSkeleton, {}, i))
|
|
2613
2598
|
}
|
|
2614
2599
|
) })
|
|
2615
2600
|
] });
|
|
@@ -2624,7 +2609,7 @@ function PaymentMethodRowSkeleton() {
|
|
|
2624
2609
|
gap: "elementsHorizontal",
|
|
2625
2610
|
style: skeletonRow,
|
|
2626
2611
|
children: [
|
|
2627
|
-
/* @__PURE__ */
|
|
2612
|
+
/* @__PURE__ */ jsx19(
|
|
2628
2613
|
Box,
|
|
2629
2614
|
{
|
|
2630
2615
|
width: 48,
|
|
@@ -2634,7 +2619,7 @@ function PaymentMethodRowSkeleton() {
|
|
|
2634
2619
|
}
|
|
2635
2620
|
),
|
|
2636
2621
|
/* @__PURE__ */ jsxs7(Box, { flex: 1, style: skeletonDetails, children: [
|
|
2637
|
-
/* @__PURE__ */
|
|
2622
|
+
/* @__PURE__ */ jsx19(
|
|
2638
2623
|
Box,
|
|
2639
2624
|
{
|
|
2640
2625
|
style: [
|
|
@@ -2643,7 +2628,7 @@ function PaymentMethodRowSkeleton() {
|
|
|
2643
2628
|
]
|
|
2644
2629
|
}
|
|
2645
2630
|
),
|
|
2646
|
-
/* @__PURE__ */
|
|
2631
|
+
/* @__PURE__ */ jsx19(
|
|
2647
2632
|
Box,
|
|
2648
2633
|
{
|
|
2649
2634
|
style: [
|
|
@@ -2748,7 +2733,7 @@ import { useSafeAreaInsets as useSafeAreaInsets3 } from "react-native-safe-area-
|
|
|
2748
2733
|
|
|
2749
2734
|
// src/components/SelectedChainRow.tsx
|
|
2750
2735
|
import { Pressable as Pressable5, StyleSheet as StyleSheet7 } from "react-native";
|
|
2751
|
-
import { jsx as
|
|
2736
|
+
import { jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2752
2737
|
function SelectedChainRow({
|
|
2753
2738
|
label,
|
|
2754
2739
|
name,
|
|
@@ -2757,7 +2742,7 @@ function SelectedChainRow({
|
|
|
2757
2742
|
onPress
|
|
2758
2743
|
}) {
|
|
2759
2744
|
const theme = useTheme();
|
|
2760
|
-
return /* @__PURE__ */
|
|
2745
|
+
return /* @__PURE__ */ jsx20(
|
|
2761
2746
|
Pressable5,
|
|
2762
2747
|
{
|
|
2763
2748
|
onPress,
|
|
@@ -2773,9 +2758,9 @@ function SelectedChainRow({
|
|
|
2773
2758
|
style: [styles7.card, { backgroundColor: theme.background.secondary }],
|
|
2774
2759
|
children: [
|
|
2775
2760
|
/* @__PURE__ */ jsxs8(Box, { flexDirection: "row", alignItems: "center", style: styles7.chain, children: [
|
|
2776
|
-
/* @__PURE__ */
|
|
2761
|
+
/* @__PURE__ */ jsx20(ChainAvatar, { uri: iconUri, size: 32 }),
|
|
2777
2762
|
/* @__PURE__ */ jsxs8(Box, { children: [
|
|
2778
|
-
/* @__PURE__ */
|
|
2763
|
+
/* @__PURE__ */ jsx20(
|
|
2779
2764
|
Text,
|
|
2780
2765
|
{
|
|
2781
2766
|
variant: "detail",
|
|
@@ -2783,7 +2768,7 @@ function SelectedChainRow({
|
|
|
2783
2768
|
children: label
|
|
2784
2769
|
}
|
|
2785
2770
|
),
|
|
2786
|
-
/* @__PURE__ */
|
|
2771
|
+
/* @__PURE__ */ jsx20(
|
|
2787
2772
|
Text,
|
|
2788
2773
|
{
|
|
2789
2774
|
variant: "bodyMedium",
|
|
@@ -2794,7 +2779,7 @@ function SelectedChainRow({
|
|
|
2794
2779
|
)
|
|
2795
2780
|
] })
|
|
2796
2781
|
] }),
|
|
2797
|
-
/* @__PURE__ */
|
|
2782
|
+
/* @__PURE__ */ jsx20(
|
|
2798
2783
|
FigmaChevronRightIcon,
|
|
2799
2784
|
{
|
|
2800
2785
|
size: 20,
|
|
@@ -2813,7 +2798,7 @@ var styles7 = StyleSheet7.create({
|
|
|
2813
2798
|
});
|
|
2814
2799
|
|
|
2815
2800
|
// src/screens/TransferCryptoScreen.tsx
|
|
2816
|
-
import { jsx as
|
|
2801
|
+
import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2817
2802
|
function TransferCryptoScreen(props) {
|
|
2818
2803
|
const { t } = useFunkitTranslation();
|
|
2819
2804
|
const {
|
|
@@ -2845,26 +2830,26 @@ function TransferCryptoScreen(props) {
|
|
|
2845
2830
|
style: { backgroundColor: theme.background.modal },
|
|
2846
2831
|
children: [
|
|
2847
2832
|
/* @__PURE__ */ jsxs9(Box, { flexDirection: "row", alignItems: "center", style: styles8.topBar, children: [
|
|
2848
|
-
/* @__PURE__ */
|
|
2849
|
-
/* @__PURE__ */
|
|
2833
|
+
/* @__PURE__ */ jsx21(Grabber, {}),
|
|
2834
|
+
/* @__PURE__ */ jsx21(
|
|
2850
2835
|
Pressable6,
|
|
2851
2836
|
{
|
|
2852
2837
|
onPress: onBack,
|
|
2853
2838
|
hitSlop: 12,
|
|
2854
2839
|
accessibilityRole: "button",
|
|
2855
2840
|
accessibilityLabel: t("common.back"),
|
|
2856
|
-
children: /* @__PURE__ */
|
|
2841
|
+
children: /* @__PURE__ */ jsx21(
|
|
2857
2842
|
Box,
|
|
2858
2843
|
{
|
|
2859
2844
|
alignItems: "center",
|
|
2860
2845
|
justifyContent: "center",
|
|
2861
2846
|
style: styles8.iconButton,
|
|
2862
|
-
children: /* @__PURE__ */
|
|
2847
|
+
children: /* @__PURE__ */ jsx21(FigmaChevronLeftIcon, {})
|
|
2863
2848
|
}
|
|
2864
2849
|
)
|
|
2865
2850
|
}
|
|
2866
2851
|
),
|
|
2867
|
-
/* @__PURE__ */
|
|
2852
|
+
/* @__PURE__ */ jsx21(Box, { flex: 1, alignItems: "center", children: /* @__PURE__ */ jsx21(
|
|
2868
2853
|
Text,
|
|
2869
2854
|
{
|
|
2870
2855
|
variant: "bodyMedium",
|
|
@@ -2872,27 +2857,27 @@ function TransferCryptoScreen(props) {
|
|
|
2872
2857
|
children: t("transferCrypto.title")
|
|
2873
2858
|
}
|
|
2874
2859
|
) }),
|
|
2875
|
-
/* @__PURE__ */
|
|
2860
|
+
/* @__PURE__ */ jsx21(
|
|
2876
2861
|
Pressable6,
|
|
2877
2862
|
{
|
|
2878
2863
|
onPress: onShowQrCode,
|
|
2879
2864
|
hitSlop: 12,
|
|
2880
2865
|
accessibilityRole: "button",
|
|
2881
2866
|
accessibilityLabel: t("transferCrypto.showQrCode"),
|
|
2882
|
-
children: /* @__PURE__ */
|
|
2867
|
+
children: /* @__PURE__ */ jsx21(
|
|
2883
2868
|
Box,
|
|
2884
2869
|
{
|
|
2885
2870
|
alignItems: "center",
|
|
2886
2871
|
justifyContent: "center",
|
|
2887
2872
|
style: styles8.iconButton,
|
|
2888
|
-
children: /* @__PURE__ */
|
|
2873
|
+
children: /* @__PURE__ */ jsx21(FigmaQrScanIcon, {})
|
|
2889
2874
|
}
|
|
2890
2875
|
)
|
|
2891
2876
|
}
|
|
2892
2877
|
)
|
|
2893
2878
|
] }),
|
|
2894
2879
|
/* @__PURE__ */ jsxs9(Box, { style: [styles8.content, { paddingBottom: insets.bottom + 16 }], children: [
|
|
2895
|
-
/* @__PURE__ */
|
|
2880
|
+
/* @__PURE__ */ jsx21(
|
|
2896
2881
|
SelectedChainRow,
|
|
2897
2882
|
{
|
|
2898
2883
|
label: t("transferCrypto.selectedChain"),
|
|
@@ -2903,7 +2888,7 @@ function TransferCryptoScreen(props) {
|
|
|
2903
2888
|
}
|
|
2904
2889
|
),
|
|
2905
2890
|
/* @__PURE__ */ jsxs9(Box, { alignItems: "center", style: styles8.addressRegion, children: [
|
|
2906
|
-
/* @__PURE__ */
|
|
2891
|
+
/* @__PURE__ */ jsx21(
|
|
2907
2892
|
Box,
|
|
2908
2893
|
{
|
|
2909
2894
|
alignItems: "center",
|
|
@@ -2919,7 +2904,7 @@ function TransferCryptoScreen(props) {
|
|
|
2919
2904
|
],
|
|
2920
2905
|
children: /* @__PURE__ */ jsxs9(Box, { alignItems: "center", style: styles8.addressColumn, children: [
|
|
2921
2906
|
/* @__PURE__ */ jsxs9(Box, { alignItems: "center", style: styles8.addressGroup, children: [
|
|
2922
|
-
/* @__PURE__ */
|
|
2907
|
+
/* @__PURE__ */ jsx21(
|
|
2923
2908
|
Text,
|
|
2924
2909
|
{
|
|
2925
2910
|
variant: "detail",
|
|
@@ -2927,7 +2912,7 @@ function TransferCryptoScreen(props) {
|
|
|
2927
2912
|
children: t("transferCrypto.depositAddressLabel")
|
|
2928
2913
|
}
|
|
2929
2914
|
),
|
|
2930
|
-
/* @__PURE__ */
|
|
2915
|
+
/* @__PURE__ */ jsx21(
|
|
2931
2916
|
Text,
|
|
2932
2917
|
{
|
|
2933
2918
|
variant: "bodyMedium",
|
|
@@ -2939,7 +2924,7 @@ function TransferCryptoScreen(props) {
|
|
|
2939
2924
|
}
|
|
2940
2925
|
)
|
|
2941
2926
|
] }),
|
|
2942
|
-
selectedChain.minLabel ? /* @__PURE__ */
|
|
2927
|
+
selectedChain.minLabel ? /* @__PURE__ */ jsx21(
|
|
2943
2928
|
Text,
|
|
2944
2929
|
{
|
|
2945
2930
|
variant: "body",
|
|
@@ -2951,21 +2936,21 @@ function TransferCryptoScreen(props) {
|
|
|
2951
2936
|
}
|
|
2952
2937
|
),
|
|
2953
2938
|
/* @__PURE__ */ jsxs9(Box, { flexDirection: "row", style: styles8.buttonsRow, children: [
|
|
2954
|
-
/* @__PURE__ */
|
|
2939
|
+
/* @__PURE__ */ jsx21(
|
|
2955
2940
|
PillButton,
|
|
2956
2941
|
{
|
|
2957
2942
|
label: copied ? t("common.copied") : t("common.copy"),
|
|
2958
2943
|
accessibilityLabel: copied ? t("common.addressCopied") : t("common.copyAddress"),
|
|
2959
|
-
icon: /* @__PURE__ */
|
|
2944
|
+
icon: /* @__PURE__ */ jsx21(FigmaCopyIcon, { color: theme.content.button.primary.default }),
|
|
2960
2945
|
onPress: handleCopy
|
|
2961
2946
|
}
|
|
2962
2947
|
),
|
|
2963
|
-
/* @__PURE__ */
|
|
2948
|
+
/* @__PURE__ */ jsx21(
|
|
2964
2949
|
PillButton,
|
|
2965
2950
|
{
|
|
2966
2951
|
label: t("transferCrypto.share"),
|
|
2967
2952
|
accessibilityLabel: t("transferCrypto.shareAddress"),
|
|
2968
|
-
icon: /* @__PURE__ */
|
|
2953
|
+
icon: /* @__PURE__ */ jsx21(FigmaShareIcon, { color: theme.content.button.primary.default }),
|
|
2969
2954
|
onPress: onShareAddress
|
|
2970
2955
|
}
|
|
2971
2956
|
)
|
|
@@ -2983,7 +2968,7 @@ function PillButton({
|
|
|
2983
2968
|
onPress
|
|
2984
2969
|
}) {
|
|
2985
2970
|
const theme = useTheme();
|
|
2986
|
-
return /* @__PURE__ */
|
|
2971
|
+
return /* @__PURE__ */ jsx21(
|
|
2987
2972
|
Pressable6,
|
|
2988
2973
|
{
|
|
2989
2974
|
onPress,
|
|
@@ -3003,7 +2988,7 @@ function PillButton({
|
|
|
3003
2988
|
],
|
|
3004
2989
|
children: [
|
|
3005
2990
|
icon,
|
|
3006
|
-
/* @__PURE__ */
|
|
2991
|
+
/* @__PURE__ */ jsx21(
|
|
3007
2992
|
Text,
|
|
3008
2993
|
{
|
|
3009
2994
|
variant: "bodyMedium",
|
|
@@ -3329,7 +3314,7 @@ function createWebViewSwappedTransport({
|
|
|
3329
3314
|
}
|
|
3330
3315
|
|
|
3331
3316
|
// src/swapped/SwappedWebView.tsx
|
|
3332
|
-
import { jsx as
|
|
3317
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
3333
3318
|
function SwappedWebView({ url, onMessage, style }) {
|
|
3334
3319
|
const webViewRef = useRef7(null);
|
|
3335
3320
|
const lastCommittedUrlRef = useRef7(url);
|
|
@@ -3378,11 +3363,11 @@ function SwappedWebView({ url, onMessage, style }) {
|
|
|
3378
3363
|
);
|
|
3379
3364
|
};
|
|
3380
3365
|
const renderLoading = useCallback3(
|
|
3381
|
-
() => /* @__PURE__ */
|
|
3366
|
+
() => /* @__PURE__ */ jsx22(
|
|
3382
3367
|
View3,
|
|
3383
3368
|
{
|
|
3384
3369
|
style: [loadingOverlay, { backgroundColor: theme.background.modal }],
|
|
3385
|
-
children: /* @__PURE__ */
|
|
3370
|
+
children: /* @__PURE__ */ jsx22(ActivityIndicator, { color: theme.content.elements.secondary })
|
|
3386
3371
|
}
|
|
3387
3372
|
),
|
|
3388
3373
|
[theme.background.modal, theme.content.elements.secondary]
|
|
@@ -3400,7 +3385,7 @@ function SwappedWebView({ url, onMessage, style }) {
|
|
|
3400
3385
|
url: event.nativeEvent.url
|
|
3401
3386
|
});
|
|
3402
3387
|
};
|
|
3403
|
-
return /* @__PURE__ */
|
|
3388
|
+
return /* @__PURE__ */ jsx22(
|
|
3404
3389
|
WebView,
|
|
3405
3390
|
{
|
|
3406
3391
|
ref: webViewRef,
|
|
@@ -3439,7 +3424,7 @@ var loadingOverlay = {
|
|
|
3439
3424
|
};
|
|
3440
3425
|
|
|
3441
3426
|
// src/swapped/SwappedScreenShell.tsx
|
|
3442
|
-
import { jsx as
|
|
3427
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
3443
3428
|
function SwappedScreenShell({
|
|
3444
3429
|
url,
|
|
3445
3430
|
onMessage
|
|
@@ -3471,13 +3456,13 @@ function SwappedScreenShell({
|
|
|
3471
3456
|
},
|
|
3472
3457
|
[onMessage]
|
|
3473
3458
|
);
|
|
3474
|
-
return /* @__PURE__ */
|
|
3459
|
+
return /* @__PURE__ */ jsx23(
|
|
3475
3460
|
Box,
|
|
3476
3461
|
{
|
|
3477
3462
|
borderTopLeftRadius: "modal",
|
|
3478
3463
|
borderTopRightRadius: "modal",
|
|
3479
3464
|
style: [sheet2, { backgroundColor: theme.background.modal }],
|
|
3480
|
-
children: /* @__PURE__ */
|
|
3465
|
+
children: /* @__PURE__ */ jsx23(SwappedWebView, { url, onMessage: handleMessage, style: fill })
|
|
3481
3466
|
}
|
|
3482
3467
|
);
|
|
3483
3468
|
}
|
|
@@ -3486,7 +3471,7 @@ var sheet2 = { height: SHEET_HEIGHT, overflow: "hidden" };
|
|
|
3486
3471
|
var fill = { flex: 1 };
|
|
3487
3472
|
|
|
3488
3473
|
// src/swapped/SwappedScreen.tsx
|
|
3489
|
-
import { jsx as
|
|
3474
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
3490
3475
|
function SwappedScreen({
|
|
3491
3476
|
url,
|
|
3492
3477
|
onClose,
|
|
@@ -3520,7 +3505,7 @@ function SwappedScreen({
|
|
|
3520
3505
|
},
|
|
3521
3506
|
[onBack, onClose, onSuccess]
|
|
3522
3507
|
);
|
|
3523
|
-
return /* @__PURE__ */
|
|
3508
|
+
return /* @__PURE__ */ jsx24(SwappedScreenShell, { url, onMessage: handleMessage });
|
|
3524
3509
|
}
|
|
3525
3510
|
|
|
3526
3511
|
// src/transfer/availableChains.ts
|
|
@@ -3813,7 +3798,8 @@ function useFops({
|
|
|
3813
3798
|
isFetching: input.isTransferInitFetching,
|
|
3814
3799
|
isError: query.isError,
|
|
3815
3800
|
refetch: () => void query.refetch(),
|
|
3816
|
-
isSwappedEnabled
|
|
3801
|
+
isSwappedEnabled,
|
|
3802
|
+
canRefetch: input.enabled
|
|
3817
3803
|
};
|
|
3818
3804
|
}
|
|
3819
3805
|
function useFopsQueryInput({
|
|
@@ -4063,7 +4049,11 @@ function useTokenTransfer({
|
|
|
4063
4049
|
});
|
|
4064
4050
|
const depositAddress = selectedChainId !== void 0 ? getDepositAddressForChain2(selectedChainId, transferInit) : void 0;
|
|
4065
4051
|
const blockchain = resolveBlockchain(selectedChainId);
|
|
4066
|
-
const qrCodeUri = depositAddress ? getTransferTokenQrCodeUri({
|
|
4052
|
+
const qrCodeUri = depositAddress ? getTransferTokenQrCodeUri({
|
|
4053
|
+
depositAddress,
|
|
4054
|
+
type: blockchain,
|
|
4055
|
+
chainId: selectedChainId
|
|
4056
|
+
}) : void 0;
|
|
4067
4057
|
return {
|
|
4068
4058
|
depositAddress,
|
|
4069
4059
|
transferInit,
|
|
@@ -4077,9 +4067,9 @@ function useTokenTransfer({
|
|
|
4077
4067
|
|
|
4078
4068
|
// src/transfer/QrCode.tsx
|
|
4079
4069
|
import QRCode from "react-native-qrcode-svg";
|
|
4080
|
-
import { jsx as
|
|
4070
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
4081
4071
|
function QrCode({ value, size = 220, ecl = "H" }) {
|
|
4082
|
-
return /* @__PURE__ */
|
|
4072
|
+
return /* @__PURE__ */ jsx25(
|
|
4083
4073
|
QRCode,
|
|
4084
4074
|
{
|
|
4085
4075
|
value,
|
|
@@ -4093,8 +4083,12 @@ function QrCode({ value, size = 220, ecl = "H" }) {
|
|
|
4093
4083
|
|
|
4094
4084
|
// src/flow/depositFlowConfig.ts
|
|
4095
4085
|
function getDefaultDynamicTargetAsset(candidates, dynamicRoutingId) {
|
|
4096
|
-
if (!candidates?.length)
|
|
4097
|
-
|
|
4086
|
+
if (!candidates?.length) {
|
|
4087
|
+
return void 0;
|
|
4088
|
+
}
|
|
4089
|
+
if (candidates.length === 1) {
|
|
4090
|
+
return candidates[0];
|
|
4091
|
+
}
|
|
4098
4092
|
const routingId = dynamicRoutingId ?? "";
|
|
4099
4093
|
return candidates.find((c) => c.dynamicRoutingId === routingId) ?? candidates.find((c) => c.isDefault) ?? candidates[0];
|
|
4100
4094
|
}
|
|
@@ -4102,7 +4096,7 @@ function getDefaultDynamicTargetAsset(candidates, dynamicRoutingId) {
|
|
|
4102
4096
|
// src/flow/FlowSheet.tsx
|
|
4103
4097
|
import {
|
|
4104
4098
|
useCallback as useCallback7,
|
|
4105
|
-
useEffect as
|
|
4099
|
+
useEffect as useEffect14,
|
|
4106
4100
|
useRef as useRef9
|
|
4107
4101
|
} from "react";
|
|
4108
4102
|
import { StyleSheet as StyleSheet9, View as View4 } from "react-native";
|
|
@@ -4110,17 +4104,30 @@ import {
|
|
|
4110
4104
|
BottomSheetBackdrop as BottomSheetBackdrop2,
|
|
4111
4105
|
BottomSheetModal,
|
|
4112
4106
|
BottomSheetModalProvider,
|
|
4107
|
+
BottomSheetView,
|
|
4113
4108
|
useBottomSheetTimingConfigs
|
|
4114
4109
|
} from "@gorhom/bottom-sheet";
|
|
4115
4110
|
import { Easing as Easing2 } from "react-native-reanimated";
|
|
4116
4111
|
import { useSafeAreaInsets as useSafeAreaInsets4 } from "react-native-safe-area-context";
|
|
4117
4112
|
|
|
4113
|
+
// src/flow/sheetSizing.ts
|
|
4114
|
+
import { useEffect as useEffect12 } from "react";
|
|
4115
|
+
var FULL_HEIGHT_DETENT = ["100%"];
|
|
4116
|
+
function sheetSizing({ fullHeight }) {
|
|
4117
|
+
return fullHeight ? { enableDynamicSizing: false, snapPoints: FULL_HEIGHT_DETENT } : { enableDynamicSizing: true };
|
|
4118
|
+
}
|
|
4119
|
+
var noop = () => {
|
|
4120
|
+
};
|
|
4121
|
+
function useInertScrollableFocus(_register) {
|
|
4122
|
+
useEffect12(noop);
|
|
4123
|
+
}
|
|
4124
|
+
|
|
4118
4125
|
// src/flow/useKeyboardHeight.ts
|
|
4119
|
-
import { useEffect as
|
|
4126
|
+
import { useEffect as useEffect13, useState as useState9 } from "react";
|
|
4120
4127
|
import { Keyboard, Platform } from "react-native";
|
|
4121
4128
|
function useKeyboardHeight(enabled) {
|
|
4122
4129
|
const [height, setHeight] = useState9(0);
|
|
4123
|
-
|
|
4130
|
+
useEffect13(() => {
|
|
4124
4131
|
if (!enabled) {
|
|
4125
4132
|
setHeight(0);
|
|
4126
4133
|
return;
|
|
@@ -4141,7 +4148,7 @@ function useKeyboardHeight(enabled) {
|
|
|
4141
4148
|
}
|
|
4142
4149
|
|
|
4143
4150
|
// src/flow/FlowSheet.tsx
|
|
4144
|
-
import { jsx as
|
|
4151
|
+
import { jsx as jsx26, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
4145
4152
|
function FlowSheet({
|
|
4146
4153
|
isOpen,
|
|
4147
4154
|
session,
|
|
@@ -4162,14 +4169,16 @@ function FlowSheet({
|
|
|
4162
4169
|
const theme = useTheme();
|
|
4163
4170
|
const hasPresented = useRef9(false);
|
|
4164
4171
|
const sheetSelfDismissed = useRef9(false);
|
|
4165
|
-
|
|
4172
|
+
useEffect14(() => {
|
|
4166
4173
|
if (isOpen) {
|
|
4167
4174
|
sheetSelfDismissed.current = false;
|
|
4168
4175
|
ref.current?.present();
|
|
4169
4176
|
hasPresented.current = true;
|
|
4170
4177
|
return;
|
|
4171
4178
|
}
|
|
4172
|
-
if (!hasPresented.current)
|
|
4179
|
+
if (!hasPresented.current) {
|
|
4180
|
+
return;
|
|
4181
|
+
}
|
|
4173
4182
|
hasPresented.current = false;
|
|
4174
4183
|
if (sheetSelfDismissed.current) {
|
|
4175
4184
|
sheetSelfDismissed.current = false;
|
|
@@ -4196,8 +4205,8 @@ function FlowSheet({
|
|
|
4196
4205
|
opacity: 1,
|
|
4197
4206
|
style: backdropContainer,
|
|
4198
4207
|
children: [
|
|
4199
|
-
renderBackdropBlur ? /* @__PURE__ */
|
|
4200
|
-
/* @__PURE__ */
|
|
4208
|
+
renderBackdropBlur ? /* @__PURE__ */ jsx26(View4, { style: StyleSheet9.absoluteFill, pointerEvents: "none", children: renderBackdropBlur() }) : null,
|
|
4209
|
+
/* @__PURE__ */ jsx26(
|
|
4201
4210
|
View4,
|
|
4202
4211
|
{
|
|
4203
4212
|
style: [scrim2, { backgroundColor: theme.background.overlay }],
|
|
@@ -4211,7 +4220,7 @@ function FlowSheet({
|
|
|
4211
4220
|
);
|
|
4212
4221
|
return /* @__PURE__ */ jsxs10(BottomSheetModalProvider, { children: [
|
|
4213
4222
|
children,
|
|
4214
|
-
/* @__PURE__ */
|
|
4223
|
+
/* @__PURE__ */ jsx26(
|
|
4215
4224
|
BottomSheetModal,
|
|
4216
4225
|
{
|
|
4217
4226
|
ref: setRef,
|
|
@@ -4225,10 +4234,16 @@ function FlowSheet({
|
|
|
4225
4234
|
backdropComponent: renderBackdrop,
|
|
4226
4235
|
handleComponent: null,
|
|
4227
4236
|
backgroundComponent: FlowSheetBackground,
|
|
4228
|
-
children: /* @__PURE__ */ jsxs10(
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4237
|
+
children: /* @__PURE__ */ jsxs10(
|
|
4238
|
+
BottomSheetView,
|
|
4239
|
+
{
|
|
4240
|
+
focusHook: fullHeight ? useInertScrollableFocus : void 0,
|
|
4241
|
+
children: [
|
|
4242
|
+
content2,
|
|
4243
|
+
keyboardHeight > 0 ? /* @__PURE__ */ jsx26(View4, { style: { height: keyboardHeight } }) : null
|
|
4244
|
+
]
|
|
4245
|
+
}
|
|
4246
|
+
)
|
|
4232
4247
|
}
|
|
4233
4248
|
)
|
|
4234
4249
|
] });
|
|
@@ -4247,7 +4262,7 @@ function FlowSheetBackground({
|
|
|
4247
4262
|
...bottomExtension,
|
|
4248
4263
|
backgroundColor: theme.background.modal
|
|
4249
4264
|
};
|
|
4250
|
-
return /* @__PURE__ */
|
|
4265
|
+
return /* @__PURE__ */ jsx26(View4, { pointerEvents, style: [style, surface], children: /* @__PURE__ */ jsx26(View4, { style: extension }) });
|
|
4251
4266
|
}
|
|
4252
4267
|
var backdropContainer = { backgroundColor: "transparent" };
|
|
4253
4268
|
var scrim2 = StyleSheet9.absoluteFill;
|
|
@@ -4284,7 +4299,7 @@ async function writeSelectedChainId(userId, chainId) {
|
|
|
4284
4299
|
}
|
|
4285
4300
|
|
|
4286
4301
|
// src/flow/DepositFlowContent.tsx
|
|
4287
|
-
import { Fragment as
|
|
4302
|
+
import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4288
4303
|
var FULL_HEIGHT_SCREENS = {
|
|
4289
4304
|
selectChain: true,
|
|
4290
4305
|
changeChain: true,
|
|
@@ -4301,7 +4316,7 @@ function FlowContent({
|
|
|
4301
4316
|
}) {
|
|
4302
4317
|
const { t } = useFunkitTranslation();
|
|
4303
4318
|
const insets = useSafeAreaInsets5();
|
|
4304
|
-
const { userId } = useFunkitIdentity();
|
|
4319
|
+
const { userId, hideCryptoDeposit } = useFunkitIdentity();
|
|
4305
4320
|
const { isGeoblocked, isLoadingGeoCheck } = useCheckoutBlocked({
|
|
4306
4321
|
onCheckoutBlocked: callbacks.onCheckoutBlocked
|
|
4307
4322
|
});
|
|
@@ -4341,7 +4356,7 @@ function FlowContent({
|
|
|
4341
4356
|
target: minDepositTarget
|
|
4342
4357
|
});
|
|
4343
4358
|
const selectedChain = allChains.find((chain) => chain.id === selectedChainId);
|
|
4344
|
-
|
|
4359
|
+
useEffect15(() => {
|
|
4345
4360
|
if (current === "transfer" && allChains.length && !selectedChain) {
|
|
4346
4361
|
nav.back();
|
|
4347
4362
|
}
|
|
@@ -4379,6 +4394,7 @@ function FlowContent({
|
|
|
4379
4394
|
selectedChain,
|
|
4380
4395
|
fops,
|
|
4381
4396
|
targetAsset,
|
|
4397
|
+
hideCryptoDeposit,
|
|
4382
4398
|
nav,
|
|
4383
4399
|
openNestedScreen,
|
|
4384
4400
|
openSwappedFlow
|
|
@@ -4387,7 +4403,10 @@ function FlowContent({
|
|
|
4387
4403
|
switch (current) {
|
|
4388
4404
|
case "addMoney": {
|
|
4389
4405
|
const isLoading = isLoadingGeoCheck || isAddressLoading || isStatsigLoading || isChainListLoading || fops.isSwappedEnabled && fops.isLoading;
|
|
4390
|
-
|
|
4406
|
+
const isFetchError = fops.isSwappedEnabled && fops.isError;
|
|
4407
|
+
const isEmpty = !isLoading && addMoneyMethods.methods.length === 0;
|
|
4408
|
+
const canRetry = fops.canRefetch;
|
|
4409
|
+
return /* @__PURE__ */ jsx27(
|
|
4391
4410
|
SelectMethodScreen,
|
|
4392
4411
|
{
|
|
4393
4412
|
...addMoneyMethods,
|
|
@@ -4395,13 +4414,13 @@ function FlowContent({
|
|
|
4395
4414
|
errorTitle: t("selectMethod.errorTitle"),
|
|
4396
4415
|
errorMessage: t("selectMethod.errorMessage"),
|
|
4397
4416
|
loading: isLoading,
|
|
4398
|
-
error:
|
|
4399
|
-
onRetry: fops.refetch
|
|
4417
|
+
error: isFetchError || isEmpty,
|
|
4418
|
+
onRetry: canRetry ? fops.refetch : void 0
|
|
4400
4419
|
}
|
|
4401
4420
|
);
|
|
4402
4421
|
}
|
|
4403
4422
|
case "transfer":
|
|
4404
|
-
return selectedChain ? /* @__PURE__ */
|
|
4423
|
+
return selectedChain ? /* @__PURE__ */ jsx27(
|
|
4405
4424
|
TransferCryptoScreen,
|
|
4406
4425
|
{
|
|
4407
4426
|
depositAddress: displayAddress,
|
|
@@ -4414,7 +4433,7 @@ function FlowContent({
|
|
|
4414
4433
|
}
|
|
4415
4434
|
) : null;
|
|
4416
4435
|
case "swapped":
|
|
4417
|
-
return selectedSwappedUrl ? /* @__PURE__ */
|
|
4436
|
+
return selectedSwappedUrl ? /* @__PURE__ */ jsx27(
|
|
4418
4437
|
SwappedScreen,
|
|
4419
4438
|
{
|
|
4420
4439
|
url: selectedSwappedUrl,
|
|
@@ -4427,11 +4446,11 @@ function FlowContent({
|
|
|
4427
4446
|
}
|
|
4428
4447
|
})();
|
|
4429
4448
|
if (isGeoblocked) {
|
|
4430
|
-
return /* @__PURE__ */
|
|
4449
|
+
return /* @__PURE__ */ jsx27(CheckoutBlockedScreen, {});
|
|
4431
4450
|
}
|
|
4432
|
-
return /* @__PURE__ */ jsxs11(
|
|
4451
|
+
return /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
4433
4452
|
screen,
|
|
4434
|
-
/* @__PURE__ */
|
|
4453
|
+
/* @__PURE__ */ jsx27(
|
|
4435
4454
|
BottomSheetModal2,
|
|
4436
4455
|
{
|
|
4437
4456
|
ref: nestedSheetRef,
|
|
@@ -4441,22 +4460,28 @@ function FlowContent({
|
|
|
4441
4460
|
backgroundComponent: FlowSheetBackground,
|
|
4442
4461
|
backdropComponent: renderNestedBackdrop,
|
|
4443
4462
|
onDismiss: () => setNestedScreen(null),
|
|
4444
|
-
children: /* @__PURE__ */
|
|
4445
|
-
|
|
4463
|
+
children: /* @__PURE__ */ jsx27(
|
|
4464
|
+
BottomSheetView2,
|
|
4446
4465
|
{
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4466
|
+
focusHook: isFullHeightScreen ? useInertScrollableFocus : void 0,
|
|
4467
|
+
children: /* @__PURE__ */ jsx27(
|
|
4468
|
+
DepositNestedSheet,
|
|
4469
|
+
{
|
|
4470
|
+
nestedScreen,
|
|
4471
|
+
allChains,
|
|
4472
|
+
selectedChain,
|
|
4473
|
+
isChainListLoading,
|
|
4474
|
+
selectChain,
|
|
4475
|
+
closeNestedScreen,
|
|
4476
|
+
nav,
|
|
4477
|
+
qrCode: config.qrCode,
|
|
4478
|
+
qrCodeUri,
|
|
4479
|
+
rawAddress,
|
|
4480
|
+
copyAddressAndToast
|
|
4481
|
+
}
|
|
4482
|
+
)
|
|
4458
4483
|
}
|
|
4459
|
-
)
|
|
4484
|
+
)
|
|
4460
4485
|
}
|
|
4461
4486
|
)
|
|
4462
4487
|
] });
|
|
@@ -4466,6 +4491,7 @@ function useAddMoneyMethods({
|
|
|
4466
4491
|
selectedChain,
|
|
4467
4492
|
fops,
|
|
4468
4493
|
targetAsset,
|
|
4494
|
+
hideCryptoDeposit,
|
|
4469
4495
|
nav,
|
|
4470
4496
|
openNestedScreen,
|
|
4471
4497
|
openSwappedFlow
|
|
@@ -4475,27 +4501,27 @@ function useAddMoneyMethods({
|
|
|
4475
4501
|
const { candidates, selectedCandidate, setSelectedCandidate } = targetAsset;
|
|
4476
4502
|
const { data: exchangeRates } = useFiatExchangeRates(isSwappedEnabled);
|
|
4477
4503
|
const cryptoSourceIcons = allChains.map((c) => c.iconUri);
|
|
4478
|
-
const cryptoMethod = [
|
|
4504
|
+
const cryptoMethod = hideCryptoDeposit ? [] : [
|
|
4479
4505
|
{
|
|
4480
4506
|
id: CRYPTO_METHOD_ID,
|
|
4481
4507
|
title: t("selectMethod.crypto"),
|
|
4482
4508
|
subtitle: t("selectMethod.noLimit"),
|
|
4483
|
-
icon: /* @__PURE__ */
|
|
4484
|
-
trailing: cryptoSourceIcons.length ? /* @__PURE__ */
|
|
4509
|
+
icon: /* @__PURE__ */ jsx27(CryptoBitcoinIcon, {}),
|
|
4510
|
+
trailing: cryptoSourceIcons.length ? /* @__PURE__ */ jsx27(SourceTokenCluster, { icons: cryptoSourceIcons, overflowMode: "plus" }) : void 0
|
|
4485
4511
|
}
|
|
4486
4512
|
];
|
|
4487
4513
|
const toCashRows = (fops2) => toFopRows(t, fops2, exchangeRates).map((row2, i) => ({
|
|
4488
4514
|
id: row2.id,
|
|
4489
4515
|
title: row2.name,
|
|
4490
4516
|
subtitle: row2.subtitle,
|
|
4491
|
-
icon: /* @__PURE__ */
|
|
4517
|
+
icon: /* @__PURE__ */ jsx27(PaymentMethodIcon, { fop: fops2[i] })
|
|
4492
4518
|
}));
|
|
4493
4519
|
const methods = isSwappedEnabled ? [...toCashRows(savedFops), ...cryptoMethod, ...toCashRows(genericFops)] : cryptoMethod;
|
|
4494
4520
|
const receiveTokens = candidates?.map(
|
|
4495
4521
|
(c, i) => ({
|
|
4496
4522
|
id: String(i),
|
|
4497
4523
|
label: c.badgeText ? `${c.tokenSymbol} (${c.badgeText})` : c.tokenSymbol,
|
|
4498
|
-
icon: /* @__PURE__ */
|
|
4524
|
+
icon: /* @__PURE__ */ jsx27(TokenChainIcon, { symbol: c.tokenSymbol, iconSrc: c.iconSrc })
|
|
4499
4525
|
})
|
|
4500
4526
|
);
|
|
4501
4527
|
const selectedReceiveTokenId = selectedCandidate && candidates ? String(candidates.indexOf(selectedCandidate)) : void 0;
|
|
@@ -4545,7 +4571,7 @@ function DepositNestedSheet({
|
|
|
4545
4571
|
}) {
|
|
4546
4572
|
switch (nestedScreen) {
|
|
4547
4573
|
case "selectChain":
|
|
4548
|
-
return /* @__PURE__ */
|
|
4574
|
+
return /* @__PURE__ */ jsx27(
|
|
4549
4575
|
SelectChainScreen,
|
|
4550
4576
|
{
|
|
4551
4577
|
chains: allChains,
|
|
@@ -4560,7 +4586,7 @@ function DepositNestedSheet({
|
|
|
4560
4586
|
}
|
|
4561
4587
|
);
|
|
4562
4588
|
case "changeChain":
|
|
4563
|
-
return /* @__PURE__ */
|
|
4589
|
+
return /* @__PURE__ */ jsx27(
|
|
4564
4590
|
ChangeChainScreen,
|
|
4565
4591
|
{
|
|
4566
4592
|
chains: allChains,
|
|
@@ -4573,11 +4599,11 @@ function DepositNestedSheet({
|
|
|
4573
4599
|
}
|
|
4574
4600
|
);
|
|
4575
4601
|
case "qrCode":
|
|
4576
|
-
return /* @__PURE__ */
|
|
4602
|
+
return /* @__PURE__ */ jsx27(
|
|
4577
4603
|
QrCodeScreen,
|
|
4578
4604
|
{
|
|
4579
|
-
qrCode: qrCode ?? (qrCodeUri ? /* @__PURE__ */
|
|
4580
|
-
centerIcon: /* @__PURE__ */
|
|
4605
|
+
qrCode: qrCode ?? (qrCodeUri ? /* @__PURE__ */ jsx27(QrCode, { value: qrCodeUri, size: 235 }) : null),
|
|
4606
|
+
centerIcon: /* @__PURE__ */ jsx27(
|
|
4581
4607
|
QrChainCluster,
|
|
4582
4608
|
{
|
|
4583
4609
|
iconKeys: selectedChain ? [selectedChain.iconUri] : []
|
|
@@ -4615,7 +4641,7 @@ function useDepositTargetAsset(config) {
|
|
|
4615
4641
|
}
|
|
4616
4642
|
function useRememberedChain(userId) {
|
|
4617
4643
|
const [selectedChainId, setSelectedChainId] = useState10();
|
|
4618
|
-
|
|
4644
|
+
useEffect15(() => {
|
|
4619
4645
|
let active = true;
|
|
4620
4646
|
setSelectedChainId(void 0);
|
|
4621
4647
|
void readSelectedChainId(userId).then((storedId) => {
|
|
@@ -4667,14 +4693,14 @@ function warn(name, error) {
|
|
|
4667
4693
|
}
|
|
4668
4694
|
|
|
4669
4695
|
// src/flow/useCopiedToast.tsx
|
|
4670
|
-
import { useCallback as useCallback9, useEffect as
|
|
4696
|
+
import { useCallback as useCallback9, useEffect as useEffect16, useRef as useRef10, useState as useState11 } from "react";
|
|
4671
4697
|
import { StyleSheet as StyleSheet11, View as View5 } from "react-native";
|
|
4672
4698
|
import { useSafeAreaInsets as useSafeAreaInsets6 } from "react-native-safe-area-context";
|
|
4673
4699
|
|
|
4674
4700
|
// src/flow/AddressCopiedToast.tsx
|
|
4675
4701
|
import { StyleSheet as StyleSheet10 } from "react-native";
|
|
4676
4702
|
import Animated3, { Easing as Easing3, FadeOutUp, Keyframe as Keyframe2 } from "react-native-reanimated";
|
|
4677
|
-
import { jsx as
|
|
4703
|
+
import { jsx as jsx28, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4678
4704
|
var enterAnimation = new Keyframe2({
|
|
4679
4705
|
0: {
|
|
4680
4706
|
opacity: 0,
|
|
@@ -4700,8 +4726,8 @@ function AddressCopiedToast() {
|
|
|
4700
4726
|
accessibilityRole: "alert",
|
|
4701
4727
|
accessibilityLabel: label,
|
|
4702
4728
|
children: [
|
|
4703
|
-
/* @__PURE__ */
|
|
4704
|
-
/* @__PURE__ */
|
|
4729
|
+
/* @__PURE__ */ jsx28(Text, { variant: "bodyMedium", children: label }),
|
|
4730
|
+
/* @__PURE__ */ jsx28(FigmaSuccessCheckIcon, { size: 16 })
|
|
4705
4731
|
]
|
|
4706
4732
|
}
|
|
4707
4733
|
);
|
|
@@ -4721,7 +4747,7 @@ var pill = {
|
|
|
4721
4747
|
var styles9 = StyleSheet10.create({ pill });
|
|
4722
4748
|
|
|
4723
4749
|
// src/flow/useCopiedToast.tsx
|
|
4724
|
-
import { jsx as
|
|
4750
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4725
4751
|
var TOAST_VISIBLE_MS = 1800;
|
|
4726
4752
|
var TOAST_EXIT_MS = 350;
|
|
4727
4753
|
var TOAST_INSET_OFFSET = 20;
|
|
@@ -4741,14 +4767,22 @@ function useCopiedToast() {
|
|
|
4741
4767
|
void 0
|
|
4742
4768
|
);
|
|
4743
4769
|
const clearToast = useCallback9(() => {
|
|
4744
|
-
if (hideTimerRef.current)
|
|
4745
|
-
|
|
4770
|
+
if (hideTimerRef.current) {
|
|
4771
|
+
clearTimeout(hideTimerRef.current);
|
|
4772
|
+
}
|
|
4773
|
+
if (unmountTimerRef.current) {
|
|
4774
|
+
clearTimeout(unmountTimerRef.current);
|
|
4775
|
+
}
|
|
4746
4776
|
setCopiedToastShown(false);
|
|
4747
4777
|
setToastMounted(false);
|
|
4748
4778
|
}, []);
|
|
4749
4779
|
const showCopiedToast = useCallback9(() => {
|
|
4750
|
-
if (hideTimerRef.current)
|
|
4751
|
-
|
|
4780
|
+
if (hideTimerRef.current) {
|
|
4781
|
+
clearTimeout(hideTimerRef.current);
|
|
4782
|
+
}
|
|
4783
|
+
if (unmountTimerRef.current) {
|
|
4784
|
+
clearTimeout(unmountTimerRef.current);
|
|
4785
|
+
}
|
|
4752
4786
|
setToastMounted(true);
|
|
4753
4787
|
setCopiedToastShown(true);
|
|
4754
4788
|
hideTimerRef.current = setTimeout(() => {
|
|
@@ -4759,13 +4793,13 @@ function useCopiedToast() {
|
|
|
4759
4793
|
);
|
|
4760
4794
|
}, TOAST_VISIBLE_MS);
|
|
4761
4795
|
}, []);
|
|
4762
|
-
|
|
4763
|
-
const toast = toastMounted ? /* @__PURE__ */
|
|
4796
|
+
useEffect16(() => () => clearToast(), [clearToast]);
|
|
4797
|
+
const toast = toastMounted ? /* @__PURE__ */ jsx29(
|
|
4764
4798
|
View5,
|
|
4765
4799
|
{
|
|
4766
4800
|
style: [toastOverlay, { paddingTop: insets.top + TOAST_INSET_OFFSET }],
|
|
4767
4801
|
pointerEvents: "none",
|
|
4768
|
-
children: copiedToastShown ? /* @__PURE__ */
|
|
4802
|
+
children: copiedToastShown ? /* @__PURE__ */ jsx29(AddressCopiedToast, {}) : null
|
|
4769
4803
|
}
|
|
4770
4804
|
) : null;
|
|
4771
4805
|
return { toast, showCopiedToast, clearToast };
|
|
@@ -4776,7 +4810,7 @@ import { useQueryClient } from "@tanstack/react-query";
|
|
|
4776
4810
|
import { useCallback as useCallback16, useState as useState20 } from "react";
|
|
4777
4811
|
|
|
4778
4812
|
// src/screens/WithdrawCryptoComplete.tsx
|
|
4779
|
-
import { useEffect as
|
|
4813
|
+
import { useEffect as useEffect17, useRef as useRef12 } from "react";
|
|
4780
4814
|
|
|
4781
4815
|
// src/withdrawal/useWithdrawalStatus.ts
|
|
4782
4816
|
import {
|
|
@@ -4799,7 +4833,9 @@ function shouldKeepPollingStatus({
|
|
|
4799
4833
|
hasRecord,
|
|
4800
4834
|
notFoundFetches
|
|
4801
4835
|
}) {
|
|
4802
|
-
if (isTerminalRelayStatus(status))
|
|
4836
|
+
if (isTerminalRelayStatus(status)) {
|
|
4837
|
+
return false;
|
|
4838
|
+
}
|
|
4803
4839
|
return hasRecord || notFoundFetches < MAX_FETCHES_WITHOUT_RECORD;
|
|
4804
4840
|
}
|
|
4805
4841
|
function useWithdrawalStatus(txHash) {
|
|
@@ -4817,7 +4853,9 @@ function useWithdrawalStatus(txHash) {
|
|
|
4817
4853
|
notFoundFetches.current = 0;
|
|
4818
4854
|
return record;
|
|
4819
4855
|
} catch (error) {
|
|
4820
|
-
if (isDirectExecutionNotFound(error))
|
|
4856
|
+
if (isDirectExecutionNotFound(error)) {
|
|
4857
|
+
notFoundFetches.current += 1;
|
|
4858
|
+
}
|
|
4821
4859
|
throw error;
|
|
4822
4860
|
}
|
|
4823
4861
|
},
|
|
@@ -4829,7 +4867,9 @@ function useWithdrawalStatus(txHash) {
|
|
|
4829
4867
|
hasRecord,
|
|
4830
4868
|
notFoundFetches: notFoundFetches.current
|
|
4831
4869
|
});
|
|
4832
|
-
if (keepPolling)
|
|
4870
|
+
if (keepPolling) {
|
|
4871
|
+
return POLL_INTERVAL_MS;
|
|
4872
|
+
}
|
|
4833
4873
|
if (!hasRecord) {
|
|
4834
4874
|
logger.warn("connect-rn:crypto-withdrawal:status_record_never_appeared");
|
|
4835
4875
|
}
|
|
@@ -4858,7 +4898,7 @@ import { useSafeAreaInsets as useSafeAreaInsets7 } from "react-native-safe-area-
|
|
|
4858
4898
|
|
|
4859
4899
|
// src/components/PillButton.tsx
|
|
4860
4900
|
import { Pressable as Pressable7, StyleSheet as StyleSheet12 } from "react-native";
|
|
4861
|
-
import { jsx as
|
|
4901
|
+
import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4862
4902
|
function PillButton2({
|
|
4863
4903
|
label,
|
|
4864
4904
|
onPress,
|
|
@@ -4872,7 +4912,7 @@ function PillButton2({
|
|
|
4872
4912
|
const theme = useTheme();
|
|
4873
4913
|
const surface = theme.background.button[variant];
|
|
4874
4914
|
const labelColor = theme.content.button[variant].default;
|
|
4875
|
-
return /* @__PURE__ */
|
|
4915
|
+
return /* @__PURE__ */ jsx30(
|
|
4876
4916
|
Pressable7,
|
|
4877
4917
|
{
|
|
4878
4918
|
onPress,
|
|
@@ -4880,7 +4920,7 @@ function PillButton2({
|
|
|
4880
4920
|
accessibilityRole: "button",
|
|
4881
4921
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
4882
4922
|
accessibilityState: { disabled },
|
|
4883
|
-
children: /* @__PURE__ */
|
|
4923
|
+
children: /* @__PURE__ */ jsx30(
|
|
4884
4924
|
Box,
|
|
4885
4925
|
{
|
|
4886
4926
|
borderRadius: radius,
|
|
@@ -4903,7 +4943,7 @@ function PillButton2({
|
|
|
4903
4943
|
],
|
|
4904
4944
|
children: [
|
|
4905
4945
|
icon,
|
|
4906
|
-
/* @__PURE__ */
|
|
4946
|
+
/* @__PURE__ */ jsx30(
|
|
4907
4947
|
Text,
|
|
4908
4948
|
{
|
|
4909
4949
|
variant: "bodyMedium",
|
|
@@ -4929,10 +4969,15 @@ var styles10 = StyleSheet12.create({
|
|
|
4929
4969
|
|
|
4930
4970
|
// src/components/ReceiveAmountSummary.tsx
|
|
4931
4971
|
import { Pressable as Pressable8, StyleSheet as StyleSheet13 } from "react-native";
|
|
4972
|
+
import Animated5, {
|
|
4973
|
+
Easing as Easing4,
|
|
4974
|
+
FadeIn,
|
|
4975
|
+
LinearTransition
|
|
4976
|
+
} from "react-native-reanimated";
|
|
4932
4977
|
|
|
4933
4978
|
// src/components/SkeletonBar.tsx
|
|
4934
4979
|
import { Animated as Animated4 } from "react-native";
|
|
4935
|
-
import { jsx as
|
|
4980
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4936
4981
|
function SkeletonBar({
|
|
4937
4982
|
width,
|
|
4938
4983
|
height,
|
|
@@ -4940,7 +4985,7 @@ function SkeletonBar({
|
|
|
4940
4985
|
}) {
|
|
4941
4986
|
const theme = useTheme();
|
|
4942
4987
|
const opacity = usePulse();
|
|
4943
|
-
return /* @__PURE__ */
|
|
4988
|
+
return /* @__PURE__ */ jsx31(
|
|
4944
4989
|
Animated4.View,
|
|
4945
4990
|
{
|
|
4946
4991
|
accessibilityRole: "progressbar",
|
|
@@ -4956,7 +5001,12 @@ function SkeletonBar({
|
|
|
4956
5001
|
}
|
|
4957
5002
|
|
|
4958
5003
|
// src/components/ReceiveAmountSummary.tsx
|
|
4959
|
-
import { jsx as
|
|
5004
|
+
import { jsx as jsx32, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5005
|
+
var AnimatedBox = Animated5.createAnimatedComponent(Box);
|
|
5006
|
+
var ICON_ENTERING = FadeIn.duration(420);
|
|
5007
|
+
var DISPLACED_TRANSITION = LinearTransition.duration(420).easing(
|
|
5008
|
+
Easing4.bezier(0.34, 1.56, 0.64, 1)
|
|
5009
|
+
);
|
|
4960
5010
|
var AMOUNT_FONT_SIZE = 64;
|
|
4961
5011
|
var LETTER_SPACING_RATIO = -0.96 / 64;
|
|
4962
5012
|
var LINE_HEIGHT_RATIO = 1.25;
|
|
@@ -4975,71 +5025,100 @@ function ReceiveAmountSummary({
|
|
|
4975
5025
|
}) {
|
|
4976
5026
|
const { t } = useFunkitTranslation();
|
|
4977
5027
|
const theme = useTheme();
|
|
4978
|
-
return /* @__PURE__ */ jsxs14(
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
children:
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5028
|
+
return /* @__PURE__ */ jsxs14(
|
|
5029
|
+
AnimatedBox,
|
|
5030
|
+
{
|
|
5031
|
+
alignItems: "center",
|
|
5032
|
+
justifyContent: "center",
|
|
5033
|
+
layout: DISPLACED_TRANSITION,
|
|
5034
|
+
style: styles11.root,
|
|
5035
|
+
children: [
|
|
5036
|
+
icon ? /* @__PURE__ */ jsx32(AnimatedBox, { entering: ICON_ENTERING, children: icon }) : null,
|
|
5037
|
+
/* @__PURE__ */ jsxs14(
|
|
5038
|
+
AnimatedBox,
|
|
5039
|
+
{
|
|
5040
|
+
alignItems: "center",
|
|
5041
|
+
alignSelf: "stretch",
|
|
5042
|
+
layout: DISPLACED_TRANSITION,
|
|
5043
|
+
style: styles11.figure,
|
|
5044
|
+
children: [
|
|
5045
|
+
/* @__PURE__ */ jsx32(
|
|
5046
|
+
Text,
|
|
5047
|
+
{
|
|
5048
|
+
variant: "detail",
|
|
5049
|
+
weight: "medium",
|
|
5050
|
+
style: { color: theme.content.elements.secondary },
|
|
5051
|
+
children: label
|
|
5052
|
+
}
|
|
5053
|
+
),
|
|
5054
|
+
usdLabel === void 0 ? null : /* @__PURE__ */ jsx32(
|
|
5055
|
+
Text,
|
|
5056
|
+
{
|
|
5057
|
+
weight: "medium",
|
|
5058
|
+
numberOfLines: 1,
|
|
5059
|
+
style: [styles11.amount, { color: theme.content.elements.primary }],
|
|
5060
|
+
children: usdLabel
|
|
5061
|
+
}
|
|
5062
|
+
),
|
|
5063
|
+
usdLabel === void 0 && isQuotePending ? /* @__PURE__ */ jsx32(
|
|
5064
|
+
SkeletonBar,
|
|
5065
|
+
{
|
|
5066
|
+
width: AMOUNT_SKELETON_WIDTH,
|
|
5067
|
+
height: AMOUNT_FONT_SIZE * CAP_BOX_RATIO,
|
|
5068
|
+
borderRadius: theme.borderRadii.element
|
|
5069
|
+
}
|
|
5070
|
+
) : null,
|
|
5071
|
+
tokenLabel === void 0 && isQuotePending ? /* @__PURE__ */ jsx32(
|
|
5072
|
+
SkeletonBar,
|
|
5073
|
+
{
|
|
5074
|
+
width: TOKEN_SKELETON_WIDTH,
|
|
5075
|
+
height: theme.textVariants.bodyMedium.lineHeight
|
|
5076
|
+
}
|
|
5077
|
+
) : null,
|
|
5078
|
+
tokenLabel === void 0 ? null : /* @__PURE__ */ jsx32(
|
|
5079
|
+
Pressable8,
|
|
5080
|
+
{
|
|
5081
|
+
onPress: onPressBreakdown,
|
|
5082
|
+
disabled: !onPressBreakdown,
|
|
5083
|
+
accessibilityRole: onPressBreakdown ? "button" : void 0,
|
|
5084
|
+
accessibilityLabel: onPressBreakdown ? t("withdrawAddress.breakdownTitle") : tokenLabel,
|
|
5085
|
+
children: /* @__PURE__ */ jsxs14(
|
|
5086
|
+
Box,
|
|
5087
|
+
{
|
|
5088
|
+
flexDirection: "row",
|
|
5089
|
+
alignItems: "center",
|
|
5090
|
+
style: styles11.tokenRow,
|
|
5091
|
+
children: [
|
|
5092
|
+
/* @__PURE__ */ jsx32(
|
|
5093
|
+
Text,
|
|
5094
|
+
{
|
|
5095
|
+
variant: "bodyMedium",
|
|
5096
|
+
style: { color: theme.content.elements.secondary },
|
|
5097
|
+
children: tokenLabel
|
|
5098
|
+
}
|
|
5099
|
+
),
|
|
5100
|
+
onPressBreakdown ? /* @__PURE__ */ jsx32(
|
|
5101
|
+
FigmaInfoCircleIcon,
|
|
5102
|
+
{
|
|
5103
|
+
size: 16,
|
|
5104
|
+
color: theme.content.elements.secondary
|
|
5105
|
+
}
|
|
5106
|
+
) : null
|
|
5107
|
+
]
|
|
5108
|
+
}
|
|
5109
|
+
)
|
|
5110
|
+
}
|
|
5111
|
+
)
|
|
5112
|
+
]
|
|
5113
|
+
}
|
|
5114
|
+
)
|
|
5115
|
+
]
|
|
5116
|
+
}
|
|
5117
|
+
);
|
|
5040
5118
|
}
|
|
5041
5119
|
var styles11 = StyleSheet13.create({
|
|
5042
5120
|
root: { gap: 24 },
|
|
5121
|
+
figure: { gap: 24 },
|
|
5043
5122
|
amount: {
|
|
5044
5123
|
fontSize: AMOUNT_FONT_SIZE,
|
|
5045
5124
|
lineHeight: AMOUNT_LINE_HEIGHT,
|
|
@@ -5057,7 +5136,7 @@ function footerBottomMargin(bottomInset2) {
|
|
|
5057
5136
|
}
|
|
5058
5137
|
|
|
5059
5138
|
// src/screens/WithdrawCompleteScreen.tsx
|
|
5060
|
-
import { jsx as
|
|
5139
|
+
import { jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5061
5140
|
var OUTCOME_ICON_SIZE = 46;
|
|
5062
5141
|
function WithdrawCompleteScreen({
|
|
5063
5142
|
isPending,
|
|
@@ -5084,7 +5163,7 @@ function WithdrawCompleteScreen({
|
|
|
5084
5163
|
},
|
|
5085
5164
|
children: [
|
|
5086
5165
|
/* @__PURE__ */ jsxs15(Box, { flex: 1, justifyContent: "center", style: styles12.summary, children: [
|
|
5087
|
-
/* @__PURE__ */
|
|
5166
|
+
/* @__PURE__ */ jsx33(
|
|
5088
5167
|
ReceiveAmountSummary,
|
|
5089
5168
|
{
|
|
5090
5169
|
icon: resolveIcon({ theme, isPending, isFailed }),
|
|
@@ -5094,7 +5173,7 @@ function WithdrawCompleteScreen({
|
|
|
5094
5173
|
isQuotePending: false
|
|
5095
5174
|
}
|
|
5096
5175
|
),
|
|
5097
|
-
isFailed ? /* @__PURE__ */
|
|
5176
|
+
isFailed ? /* @__PURE__ */ jsx33(
|
|
5098
5177
|
Text,
|
|
5099
5178
|
{
|
|
5100
5179
|
variant: "detail",
|
|
@@ -5103,18 +5182,18 @@ function WithdrawCompleteScreen({
|
|
|
5103
5182
|
}
|
|
5104
5183
|
) : null
|
|
5105
5184
|
] }),
|
|
5106
|
-
/* @__PURE__ */
|
|
5185
|
+
/* @__PURE__ */ jsx33(
|
|
5107
5186
|
Box,
|
|
5108
5187
|
{
|
|
5109
5188
|
style: [
|
|
5110
5189
|
styles12.footer,
|
|
5111
5190
|
{ marginBottom: footerBottomMargin(insets.bottom) }
|
|
5112
5191
|
],
|
|
5113
|
-
children: isPending ? /* @__PURE__ */
|
|
5192
|
+
children: isPending ? /* @__PURE__ */ jsx33(
|
|
5114
5193
|
PillButton2,
|
|
5115
5194
|
{
|
|
5116
5195
|
label: t("withdrawAddress.withdrawing"),
|
|
5117
|
-
icon: /* @__PURE__ */
|
|
5196
|
+
icon: /* @__PURE__ */ jsx33(
|
|
5118
5197
|
ActivityIndicator2,
|
|
5119
5198
|
{
|
|
5120
5199
|
size: "small",
|
|
@@ -5124,7 +5203,7 @@ function WithdrawCompleteScreen({
|
|
|
5124
5203
|
disabled: true,
|
|
5125
5204
|
onPress: onDone
|
|
5126
5205
|
}
|
|
5127
|
-
) : /* @__PURE__ */
|
|
5206
|
+
) : /* @__PURE__ */ jsx33(PillButton2, { label: t("common.close"), onPress: onDone })
|
|
5128
5207
|
}
|
|
5129
5208
|
)
|
|
5130
5209
|
]
|
|
@@ -5137,7 +5216,7 @@ function resolveIcon({
|
|
|
5137
5216
|
isFailed
|
|
5138
5217
|
}) {
|
|
5139
5218
|
if (isFailed) {
|
|
5140
|
-
return /* @__PURE__ */
|
|
5219
|
+
return /* @__PURE__ */ jsx33(
|
|
5141
5220
|
FigmaAlertCircleIcon,
|
|
5142
5221
|
{
|
|
5143
5222
|
size: OUTCOME_ICON_SIZE,
|
|
@@ -5148,15 +5227,19 @@ function resolveIcon({
|
|
|
5148
5227
|
if (isPending) {
|
|
5149
5228
|
return void 0;
|
|
5150
5229
|
}
|
|
5151
|
-
return /* @__PURE__ */
|
|
5230
|
+
return /* @__PURE__ */ jsx33(FigmaSuccessCheckIcon, { size: OUTCOME_ICON_SIZE });
|
|
5152
5231
|
}
|
|
5153
5232
|
function resolveLabel({
|
|
5154
5233
|
t,
|
|
5155
5234
|
isPending,
|
|
5156
5235
|
isFailed
|
|
5157
5236
|
}) {
|
|
5158
|
-
if (isFailed)
|
|
5159
|
-
|
|
5237
|
+
if (isFailed) {
|
|
5238
|
+
return t("withdrawCrypto.failedTitle");
|
|
5239
|
+
}
|
|
5240
|
+
if (isPending) {
|
|
5241
|
+
return t("withdrawAddress.youllReceive");
|
|
5242
|
+
}
|
|
5160
5243
|
return t("withdrawAddress.withdrew");
|
|
5161
5244
|
}
|
|
5162
5245
|
var styles12 = StyleSheet14.create({
|
|
@@ -5168,7 +5251,7 @@ var styles12 = StyleSheet14.create({
|
|
|
5168
5251
|
});
|
|
5169
5252
|
|
|
5170
5253
|
// src/screens/WithdrawCryptoComplete.tsx
|
|
5171
|
-
import { jsx as
|
|
5254
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
5172
5255
|
function WithdrawCryptoComplete({
|
|
5173
5256
|
txHash,
|
|
5174
5257
|
amountLabel,
|
|
@@ -5179,8 +5262,10 @@ function WithdrawCryptoComplete({
|
|
|
5179
5262
|
}) {
|
|
5180
5263
|
const { isCompleted, isFailed, isRefunded } = useWithdrawalStatus(txHash);
|
|
5181
5264
|
const notifiedRef = useRef12(false);
|
|
5182
|
-
|
|
5183
|
-
if (notifiedRef.current)
|
|
5265
|
+
useEffect17(() => {
|
|
5266
|
+
if (notifiedRef.current) {
|
|
5267
|
+
return;
|
|
5268
|
+
}
|
|
5184
5269
|
if (isCompleted) {
|
|
5185
5270
|
notifiedRef.current = true;
|
|
5186
5271
|
callbacks.onWithdrawalSuccess?.({ txHash });
|
|
@@ -5193,14 +5278,16 @@ function WithdrawCryptoComplete({
|
|
|
5193
5278
|
});
|
|
5194
5279
|
}
|
|
5195
5280
|
}, [isCompleted, isFailed, isRefunded, callbacks, txHash]);
|
|
5196
|
-
|
|
5281
|
+
useEffect17(
|
|
5197
5282
|
() => () => {
|
|
5198
|
-
if (notifiedRef.current)
|
|
5283
|
+
if (notifiedRef.current) {
|
|
5284
|
+
return;
|
|
5285
|
+
}
|
|
5199
5286
|
logger.warn("connect-rn:crypto-withdrawal:outcome_unreported", { txHash });
|
|
5200
5287
|
},
|
|
5201
5288
|
[txHash]
|
|
5202
5289
|
);
|
|
5203
|
-
return /* @__PURE__ */
|
|
5290
|
+
return /* @__PURE__ */ jsx34(
|
|
5204
5291
|
WithdrawCompleteScreen,
|
|
5205
5292
|
{
|
|
5206
5293
|
isPending: !isCompleted && !isFailed,
|
|
@@ -5215,7 +5302,7 @@ function WithdrawCryptoComplete({
|
|
|
5215
5302
|
}
|
|
5216
5303
|
|
|
5217
5304
|
// src/screens/WithdrawCryptoSteps.tsx
|
|
5218
|
-
import { BottomSheetModal as BottomSheetModal4, BottomSheetView as
|
|
5305
|
+
import { BottomSheetModal as BottomSheetModal4, BottomSheetView as BottomSheetView4 } from "@gorhom/bottom-sheet";
|
|
5219
5306
|
import { useFeatureGate as useFeatureGate2 } from "@funkit/connect-core";
|
|
5220
5307
|
import { useState as useState19 } from "react";
|
|
5221
5308
|
import { useSafeAreaInsets as useSafeAreaInsets14 } from "react-native-safe-area-context";
|
|
@@ -5467,7 +5554,9 @@ function isNoOpSelfWithdrawal({
|
|
|
5467
5554
|
sourceToken,
|
|
5468
5555
|
destinationToken
|
|
5469
5556
|
}) {
|
|
5470
|
-
if (!destinationToken)
|
|
5557
|
+
if (!destinationToken) {
|
|
5558
|
+
return false;
|
|
5559
|
+
}
|
|
5471
5560
|
return recipientAddress.toLowerCase() === walletAddress.toLowerCase() && sourceToken.chainId === destinationToken.chainId && sourceToken.address.toLowerCase() === destinationToken.address.toLowerCase();
|
|
5472
5561
|
}
|
|
5473
5562
|
function getWithdrawCtaBlocker({
|
|
@@ -5478,12 +5567,24 @@ function getWithdrawCtaBlocker({
|
|
|
5478
5567
|
amountValidation,
|
|
5479
5568
|
destinationToken
|
|
5480
5569
|
}) {
|
|
5481
|
-
if (!isWithdrawalAddressSupported(recipientAddress))
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
if (
|
|
5485
|
-
|
|
5486
|
-
|
|
5570
|
+
if (!isWithdrawalAddressSupported(recipientAddress)) {
|
|
5571
|
+
return "enter-recipient";
|
|
5572
|
+
}
|
|
5573
|
+
if (isRecipientBlacklisted) {
|
|
5574
|
+
return "unsupported-recipient";
|
|
5575
|
+
}
|
|
5576
|
+
if (isRecipientSameAsSource) {
|
|
5577
|
+
return "recipient-same-as-source";
|
|
5578
|
+
}
|
|
5579
|
+
if (amountValidation.isWithdrawAmountTooHigh) {
|
|
5580
|
+
return "max-exceeded";
|
|
5581
|
+
}
|
|
5582
|
+
if (!amount || !amountValidation.isWithdrawAmountValid) {
|
|
5583
|
+
return "enter-amount";
|
|
5584
|
+
}
|
|
5585
|
+
if (!destinationToken) {
|
|
5586
|
+
return "select-destination";
|
|
5587
|
+
}
|
|
5487
5588
|
if (!isAddressCompatibleWithChain(
|
|
5488
5589
|
recipientAddress,
|
|
5489
5590
|
Number(destinationToken.chainId)
|
|
@@ -5497,10 +5598,16 @@ function isAmountBelowQuoteFee({
|
|
|
5497
5598
|
feeTokenAmount,
|
|
5498
5599
|
decimals
|
|
5499
5600
|
}) {
|
|
5500
|
-
if (feeTokenAmount <= 0 || !amount)
|
|
5601
|
+
if (feeTokenAmount <= 0 || !amount) {
|
|
5602
|
+
return false;
|
|
5603
|
+
}
|
|
5501
5604
|
const net = deductFlatFee(amount, feeTokenAmount);
|
|
5502
|
-
if (Number(net) <= 0)
|
|
5503
|
-
|
|
5605
|
+
if (Number(net) <= 0) {
|
|
5606
|
+
return true;
|
|
5607
|
+
}
|
|
5608
|
+
if (decimals == null) {
|
|
5609
|
+
return false;
|
|
5610
|
+
}
|
|
5504
5611
|
try {
|
|
5505
5612
|
return toWithdrawalAmountBaseUnit2(net, decimals) <= 0n;
|
|
5506
5613
|
} catch {
|
|
@@ -5662,7 +5769,9 @@ function useWithdrawalDestinationTokens({
|
|
|
5662
5769
|
staleTime: Number.POSITIVE_INFINITY
|
|
5663
5770
|
});
|
|
5664
5771
|
const resolved = useMemo8(() => {
|
|
5665
|
-
if (!supportedAssets)
|
|
5772
|
+
if (!supportedAssets) {
|
|
5773
|
+
return void 0;
|
|
5774
|
+
}
|
|
5666
5775
|
return resolveTokenTransferConfig2({
|
|
5667
5776
|
chainConfigs: withdrawalConfig.chains ?? [],
|
|
5668
5777
|
priorityTokens: withdrawalConfig.priorityTokens ?? [],
|
|
@@ -5672,7 +5781,9 @@ function useWithdrawalDestinationTokens({
|
|
|
5672
5781
|
});
|
|
5673
5782
|
}, [supportedAssets, withdrawalConfig, disabledChainAssets]);
|
|
5674
5783
|
const chains = useMemo8(() => {
|
|
5675
|
-
if (!resolved)
|
|
5784
|
+
if (!resolved) {
|
|
5785
|
+
return [];
|
|
5786
|
+
}
|
|
5676
5787
|
return resolved.chainIdSortOrder.map((chainId) => ({
|
|
5677
5788
|
chainId,
|
|
5678
5789
|
symbols: resolved.symbolsByChainId[chainId] ?? []
|
|
@@ -5680,7 +5791,9 @@ function useWithdrawalDestinationTokens({
|
|
|
5680
5791
|
}, [resolved]);
|
|
5681
5792
|
const [picked, setPicked] = useState13();
|
|
5682
5793
|
const destinationToken = useMemo8(() => {
|
|
5683
|
-
if (!resolved)
|
|
5794
|
+
if (!resolved) {
|
|
5795
|
+
return void 0;
|
|
5796
|
+
}
|
|
5684
5797
|
const candidates = picked ? [picked] : [
|
|
5685
5798
|
...defaultReceiveToken ? chains.map((c) => ({
|
|
5686
5799
|
chainId: c.chainId,
|
|
@@ -5760,7 +5873,8 @@ var RECIPIENT_BLOCKERS = /* @__PURE__ */ new Set([
|
|
|
5760
5873
|
]);
|
|
5761
5874
|
function useCryptoWithdrawalForm({
|
|
5762
5875
|
config,
|
|
5763
|
-
quoteInputFeeTokens
|
|
5876
|
+
quoteInputFeeTokens,
|
|
5877
|
+
quoteInputFeeSettled = true
|
|
5764
5878
|
}) {
|
|
5765
5879
|
const { t } = useFunkitTranslation();
|
|
5766
5880
|
const [amount, setAmount] = useState14("");
|
|
@@ -5826,8 +5940,10 @@ function useCryptoWithdrawalForm({
|
|
|
5826
5940
|
amount: quoteAmount,
|
|
5827
5941
|
walletAddress: config.withdrawalWallet.address(),
|
|
5828
5942
|
// Everything the form already knows is wrong, plus the async verdict:
|
|
5829
|
-
// `isRisky === false` is required, so in-flight and errored both hold.
|
|
5830
|
-
|
|
5943
|
+
// `isRisky === false` is required, so in-flight and errored both hold. A
|
|
5944
|
+
// venue fee that hasn't settled yet would move `quoteAmount` underneath
|
|
5945
|
+
// this query, so it holds too.
|
|
5946
|
+
enabled: !ctaBlocker && !isAmountBelowFee && isSettled && risk.isRisky === false && quoteInputFeeSettled
|
|
5831
5947
|
});
|
|
5832
5948
|
const destinationPrice = useSourceTokenUsdPrice(
|
|
5833
5949
|
destinationToken ?? sourceToken
|
|
@@ -5894,7 +6010,7 @@ function useCryptoWithdrawalForm({
|
|
|
5894
6010
|
* and only while the quote on screen is the one for what the field says —
|
|
5895
6011
|
* mid-edit the query is disabled and `quote` still holds the last price.
|
|
5896
6012
|
*/
|
|
5897
|
-
canSubmit: !ctaBlocker && !isAmountBelowFee && isSettled && risk.isRisky === false && !!quote,
|
|
6013
|
+
canSubmit: !ctaBlocker && !isAmountBelowFee && isSettled && risk.isRisky === false && quoteInputFeeSettled && !!quote,
|
|
5898
6014
|
quote,
|
|
5899
6015
|
quoteAmount,
|
|
5900
6016
|
/** Destination-token units, absent until the quote matches what is typed. */
|
|
@@ -5944,7 +6060,9 @@ function resolveAmountErrorText({
|
|
|
5944
6060
|
isAmountBelowFee,
|
|
5945
6061
|
quoteInputFeeTokens
|
|
5946
6062
|
}) {
|
|
5947
|
-
if (!amount)
|
|
6063
|
+
if (!amount) {
|
|
6064
|
+
return void 0;
|
|
6065
|
+
}
|
|
5948
6066
|
if (amountValidation.isWithdrawAmountTooLow) {
|
|
5949
6067
|
const min = amountValidation.minWithdrawalDisplayValue;
|
|
5950
6068
|
return t("withdrawCrypto.belowMinimum", {
|
|
@@ -5964,7 +6082,7 @@ function resolveAmountErrorText({
|
|
|
5964
6082
|
|
|
5965
6083
|
// src/withdrawal/useCryptoWithdrawalSubmit.ts
|
|
5966
6084
|
import { useEffectEvent as useEffectEvent2 } from "@funkit/connect-core";
|
|
5967
|
-
import { useEffect as
|
|
6085
|
+
import { useEffect as useEffect18, useRef as useRef14 } from "react";
|
|
5968
6086
|
|
|
5969
6087
|
// src/utils/executionErrorMessage.ts
|
|
5970
6088
|
var MAX_ERROR_DETAIL_CHARS = 160;
|
|
@@ -5976,7 +6094,9 @@ function executionErrorMessage(t, code, message) {
|
|
|
5976
6094
|
return t("withdrawCrypto.errorSwitchChain");
|
|
5977
6095
|
}
|
|
5978
6096
|
const detail = message?.trim();
|
|
5979
|
-
if (!detail)
|
|
6097
|
+
if (!detail) {
|
|
6098
|
+
return t("withdrawCrypto.errorGeneric");
|
|
6099
|
+
}
|
|
5980
6100
|
return detail.length > MAX_ERROR_DETAIL_CHARS ? `${detail.slice(0, MAX_ERROR_DETAIL_CHARS)}\u2026` : detail;
|
|
5981
6101
|
}
|
|
5982
6102
|
|
|
@@ -6122,8 +6242,10 @@ function useCryptoWithdrawalSubmit({
|
|
|
6122
6242
|
tokenLabel: void 0
|
|
6123
6243
|
});
|
|
6124
6244
|
const onSubmittedEvent = useEffectEvent2(onSubmitted);
|
|
6125
|
-
|
|
6126
|
-
if (submission.status !== "submitted" || handedOffRef.current)
|
|
6245
|
+
useEffect18(() => {
|
|
6246
|
+
if (submission.status !== "submitted" || handedOffRef.current) {
|
|
6247
|
+
return;
|
|
6248
|
+
}
|
|
6127
6249
|
handedOffRef.current = true;
|
|
6128
6250
|
onSubmittedEvent({
|
|
6129
6251
|
txHash: submission.txHash,
|
|
@@ -6131,15 +6253,18 @@ function useCryptoWithdrawalSubmit({
|
|
|
6131
6253
|
...submittedFigures.current
|
|
6132
6254
|
});
|
|
6133
6255
|
}, [submission, form.sourceLabel]);
|
|
6256
|
+
const isInFlight = submission.status === "submitting" || submission.status === "submitted";
|
|
6134
6257
|
return {
|
|
6135
|
-
isSubmitting:
|
|
6258
|
+
isSubmitting: isInFlight,
|
|
6136
6259
|
/** The button holds for the price and the screening too, not only the signature. */
|
|
6137
|
-
isBusy: form.isQuoteLoading || form.risk.isChecking ||
|
|
6260
|
+
isBusy: form.isQuoteLoading || form.risk.isChecking || isInFlight,
|
|
6138
6261
|
/** An unrecoverable failure from the last attempt, in the user's words. */
|
|
6139
6262
|
executionErrorText: submission.status === "failed" ? executionErrorMessage(t, submission.code, submission.message) : void 0,
|
|
6140
6263
|
/** Executes the quote on screen. `form.canSubmit` is what gates the press. */
|
|
6141
6264
|
submit: () => {
|
|
6142
|
-
if (!form.quote)
|
|
6265
|
+
if (!form.quote) {
|
|
6266
|
+
return;
|
|
6267
|
+
}
|
|
6143
6268
|
logger.info("connect-rn:withdrawal:crypto_submit", {
|
|
6144
6269
|
fromChainId: form.sourceToken.chainId,
|
|
6145
6270
|
fromToken: form.sourceToken.address,
|
|
@@ -6158,7 +6283,11 @@ function useCryptoWithdrawalSubmit({
|
|
|
6158
6283
|
}
|
|
6159
6284
|
|
|
6160
6285
|
// src/screens/SelectReceiveTokenAndChainScreen.tsx
|
|
6161
|
-
import {
|
|
6286
|
+
import {
|
|
6287
|
+
BottomSheetModal as BottomSheetModal3,
|
|
6288
|
+
BottomSheetScrollView as BottomSheetScrollView3,
|
|
6289
|
+
BottomSheetView as BottomSheetView3
|
|
6290
|
+
} from "@gorhom/bottom-sheet";
|
|
6162
6291
|
import { useMemo as useMemo9, useState as useState18 } from "react";
|
|
6163
6292
|
import { StyleSheet as StyleSheet20, View as View7, useWindowDimensions as useWindowDimensions4 } from "react-native";
|
|
6164
6293
|
import { useSafeAreaInsets as useSafeAreaInsets9 } from "react-native-safe-area-context";
|
|
@@ -6193,26 +6322,26 @@ function chunk(items, size) {
|
|
|
6193
6322
|
}
|
|
6194
6323
|
|
|
6195
6324
|
// src/components/AssetGrid.tsx
|
|
6196
|
-
import { Fragment as
|
|
6325
|
+
import { Fragment as Fragment3, jsx as jsx35, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6197
6326
|
function AssetGrid({ title, items, overflow }) {
|
|
6198
6327
|
const theme = useTheme();
|
|
6199
6328
|
return /* @__PURE__ */ jsxs16(Box, { style: styles13.section, children: [
|
|
6200
|
-
/* @__PURE__ */
|
|
6201
|
-
/* @__PURE__ */
|
|
6202
|
-
row2.map((item) => /* @__PURE__ */
|
|
6329
|
+
/* @__PURE__ */ jsx35(Text, { variant: "bodyMedium", numberOfLines: 1, style: styles13.title, children: title }),
|
|
6330
|
+
/* @__PURE__ */ jsx35(Box, { style: styles13.grid, children: chunk(items, ASSET_GRID_COLUMNS).map((row2, rowIndex) => /* @__PURE__ */ jsxs16(Box, { flexDirection: "row", style: styles13.row, children: [
|
|
6331
|
+
row2.map((item) => /* @__PURE__ */ jsx35(AssetGridItem, { ...item }, item.id)),
|
|
6203
6332
|
Array.from(
|
|
6204
6333
|
{ length: ASSET_GRID_COLUMNS - row2.length },
|
|
6205
|
-
(_, slot) => /* @__PURE__ */
|
|
6334
|
+
(_, slot) => /* @__PURE__ */ jsx35(Box, { style: styles13.filler }, `filler-${slot}`)
|
|
6206
6335
|
)
|
|
6207
6336
|
] }, rowIndex)) }),
|
|
6208
|
-
overflow ? /* @__PURE__ */
|
|
6337
|
+
overflow ? /* @__PURE__ */ jsx35(
|
|
6209
6338
|
Pressable9,
|
|
6210
6339
|
{
|
|
6211
6340
|
onPress: overflow.onPress,
|
|
6212
6341
|
accessibilityRole: "button",
|
|
6213
6342
|
accessibilityLabel: overflow.accessibilityLabel,
|
|
6214
6343
|
children: /* @__PURE__ */ jsxs16(Box, { flexDirection: "row", alignItems: "center", style: styles13.overflow, children: [
|
|
6215
|
-
/* @__PURE__ */
|
|
6344
|
+
/* @__PURE__ */ jsx35(Box, { flex: 1, children: /* @__PURE__ */ jsx35(
|
|
6216
6345
|
Text,
|
|
6217
6346
|
{
|
|
6218
6347
|
variant: "bodyMedium",
|
|
@@ -6221,7 +6350,7 @@ function AssetGrid({ title, items, overflow }) {
|
|
|
6221
6350
|
children: overflow.label
|
|
6222
6351
|
}
|
|
6223
6352
|
) }),
|
|
6224
|
-
/* @__PURE__ */
|
|
6353
|
+
/* @__PURE__ */ jsx35(
|
|
6225
6354
|
FigmaChevronRightIcon,
|
|
6226
6355
|
{
|
|
6227
6356
|
size: 20,
|
|
@@ -6243,7 +6372,7 @@ function AssetGridItem({
|
|
|
6243
6372
|
}) {
|
|
6244
6373
|
const theme = useTheme();
|
|
6245
6374
|
const isMarked = selected && !unsupported;
|
|
6246
|
-
return /* @__PURE__ */
|
|
6375
|
+
return /* @__PURE__ */ jsx35(
|
|
6247
6376
|
Pressable9,
|
|
6248
6377
|
{
|
|
6249
6378
|
onPress,
|
|
@@ -6254,15 +6383,15 @@ function AssetGridItem({
|
|
|
6254
6383
|
style: styles13.cell,
|
|
6255
6384
|
children: /* @__PURE__ */ jsxs16(Box, { alignItems: "center", style: styles13.stack, children: [
|
|
6256
6385
|
/* @__PURE__ */ jsxs16(Box, { style: styles13.avatar, children: [
|
|
6257
|
-
/* @__PURE__ */
|
|
6386
|
+
/* @__PURE__ */ jsx35(
|
|
6258
6387
|
Box,
|
|
6259
6388
|
{
|
|
6260
6389
|
style: unsupported ? { opacity: theme.opacity.disabled / 100 } : void 0,
|
|
6261
6390
|
children: icon
|
|
6262
6391
|
}
|
|
6263
6392
|
),
|
|
6264
|
-
isMarked ? /* @__PURE__ */ jsxs16(
|
|
6265
|
-
/* @__PURE__ */
|
|
6393
|
+
isMarked ? /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
6394
|
+
/* @__PURE__ */ jsx35(
|
|
6266
6395
|
Box,
|
|
6267
6396
|
{
|
|
6268
6397
|
pointerEvents: "none",
|
|
@@ -6272,7 +6401,7 @@ function AssetGridItem({
|
|
|
6272
6401
|
]
|
|
6273
6402
|
}
|
|
6274
6403
|
),
|
|
6275
|
-
/* @__PURE__ */
|
|
6404
|
+
/* @__PURE__ */ jsx35(
|
|
6276
6405
|
Box,
|
|
6277
6406
|
{
|
|
6278
6407
|
pointerEvents: "none",
|
|
@@ -6282,7 +6411,7 @@ function AssetGridItem({
|
|
|
6282
6411
|
]
|
|
6283
6412
|
}
|
|
6284
6413
|
),
|
|
6285
|
-
/* @__PURE__ */
|
|
6414
|
+
/* @__PURE__ */ jsx35(
|
|
6286
6415
|
Box,
|
|
6287
6416
|
{
|
|
6288
6417
|
alignItems: "center",
|
|
@@ -6294,7 +6423,7 @@ function AssetGridItem({
|
|
|
6294
6423
|
borderColor: theme.background.modal
|
|
6295
6424
|
}
|
|
6296
6425
|
],
|
|
6297
|
-
children: /* @__PURE__ */
|
|
6426
|
+
children: /* @__PURE__ */ jsx35(
|
|
6298
6427
|
FigmaCheckIcon,
|
|
6299
6428
|
{
|
|
6300
6429
|
size: 12,
|
|
@@ -6305,7 +6434,7 @@ function AssetGridItem({
|
|
|
6305
6434
|
)
|
|
6306
6435
|
] }) : null
|
|
6307
6436
|
] }),
|
|
6308
|
-
/* @__PURE__ */
|
|
6437
|
+
/* @__PURE__ */ jsx35(
|
|
6309
6438
|
Text,
|
|
6310
6439
|
{
|
|
6311
6440
|
variant: "detail",
|
|
@@ -6363,18 +6492,18 @@ var styles13 = StyleSheet15.create({
|
|
|
6363
6492
|
|
|
6364
6493
|
// src/components/TopBar.tsx
|
|
6365
6494
|
import { Pressable as Pressable10, StyleSheet as StyleSheet16 } from "react-native";
|
|
6366
|
-
import { jsx as
|
|
6495
|
+
import { jsx as jsx36, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
6367
6496
|
var ICON_SIZE = 20;
|
|
6368
6497
|
function TopBar({ title, onBack, onClose }) {
|
|
6369
6498
|
const { t } = useFunkitTranslation();
|
|
6370
6499
|
const theme = useTheme();
|
|
6371
6500
|
return /* @__PURE__ */ jsxs17(Box, { flexDirection: "row", alignItems: "center", style: styles14.bar, children: [
|
|
6372
|
-
/* @__PURE__ */
|
|
6501
|
+
/* @__PURE__ */ jsx36(
|
|
6373
6502
|
IconSlot,
|
|
6374
6503
|
{
|
|
6375
6504
|
onPress: onBack,
|
|
6376
6505
|
label: t("common.back"),
|
|
6377
|
-
icon: /* @__PURE__ */
|
|
6506
|
+
icon: /* @__PURE__ */ jsx36(
|
|
6378
6507
|
FigmaChevronLeftIcon,
|
|
6379
6508
|
{
|
|
6380
6509
|
size: ICON_SIZE,
|
|
@@ -6383,7 +6512,7 @@ function TopBar({ title, onBack, onClose }) {
|
|
|
6383
6512
|
)
|
|
6384
6513
|
}
|
|
6385
6514
|
),
|
|
6386
|
-
/* @__PURE__ */
|
|
6515
|
+
/* @__PURE__ */ jsx36(
|
|
6387
6516
|
Text,
|
|
6388
6517
|
{
|
|
6389
6518
|
variant: "headerTitle",
|
|
@@ -6395,12 +6524,12 @@ function TopBar({ title, onBack, onClose }) {
|
|
|
6395
6524
|
children: title
|
|
6396
6525
|
}
|
|
6397
6526
|
),
|
|
6398
|
-
/* @__PURE__ */
|
|
6527
|
+
/* @__PURE__ */ jsx36(
|
|
6399
6528
|
IconSlot,
|
|
6400
6529
|
{
|
|
6401
6530
|
onPress: onClose,
|
|
6402
6531
|
label: t("common.close"),
|
|
6403
|
-
icon: /* @__PURE__ */
|
|
6532
|
+
icon: /* @__PURE__ */ jsx36(
|
|
6404
6533
|
FigmaCloseIcon,
|
|
6405
6534
|
{
|
|
6406
6535
|
size: ICON_SIZE,
|
|
@@ -6417,9 +6546,9 @@ function IconSlot({
|
|
|
6417
6546
|
icon
|
|
6418
6547
|
}) {
|
|
6419
6548
|
if (!onPress) {
|
|
6420
|
-
return /* @__PURE__ */
|
|
6549
|
+
return /* @__PURE__ */ jsx36(Box, { style: styles14.slot });
|
|
6421
6550
|
}
|
|
6422
|
-
return /* @__PURE__ */
|
|
6551
|
+
return /* @__PURE__ */ jsx36(
|
|
6423
6552
|
Pressable10,
|
|
6424
6553
|
{
|
|
6425
6554
|
onPress,
|
|
@@ -6448,7 +6577,9 @@ function chainCarries(chain, token) {
|
|
|
6448
6577
|
}
|
|
6449
6578
|
function chainForToken(chains, token, preferredChainId) {
|
|
6450
6579
|
const preferred = chains.find((chain) => chain.chainId === preferredChainId);
|
|
6451
|
-
if (preferred?.symbols.includes(token))
|
|
6580
|
+
if (preferred?.symbols.includes(token)) {
|
|
6581
|
+
return preferred.chainId;
|
|
6582
|
+
}
|
|
6452
6583
|
return chains.find((chain) => chain.symbols.includes(token))?.chainId;
|
|
6453
6584
|
}
|
|
6454
6585
|
function receivableTokens(chains) {
|
|
@@ -6465,7 +6596,7 @@ import { useSafeAreaInsets as useSafeAreaInsets8 } from "react-native-safe-area-
|
|
|
6465
6596
|
import { BottomSheetTextInput } from "@gorhom/bottom-sheet";
|
|
6466
6597
|
import { useState as useState16 } from "react";
|
|
6467
6598
|
import { StyleSheet as StyleSheet17 } from "react-native";
|
|
6468
|
-
import { jsx as
|
|
6599
|
+
import { jsx as jsx37, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
6469
6600
|
function SearchInput({
|
|
6470
6601
|
value,
|
|
6471
6602
|
onChangeValue,
|
|
@@ -6489,8 +6620,8 @@ function SearchInput({
|
|
|
6489
6620
|
}
|
|
6490
6621
|
],
|
|
6491
6622
|
children: [
|
|
6492
|
-
/* @__PURE__ */
|
|
6493
|
-
/* @__PURE__ */
|
|
6623
|
+
/* @__PURE__ */ jsx37(FigmaSearchIcon, { size: 16, color: theme.content.elements.secondary }),
|
|
6624
|
+
/* @__PURE__ */ jsx37(
|
|
6494
6625
|
BottomSheetTextInput,
|
|
6495
6626
|
{
|
|
6496
6627
|
value,
|
|
@@ -6523,7 +6654,7 @@ var styles15 = StyleSheet17.create({
|
|
|
6523
6654
|
|
|
6524
6655
|
// src/components/SelectableAssetRow.tsx
|
|
6525
6656
|
import { Pressable as Pressable11, StyleSheet as StyleSheet18 } from "react-native";
|
|
6526
|
-
import { jsx as
|
|
6657
|
+
import { jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
6527
6658
|
function SelectableAssetRow({
|
|
6528
6659
|
name,
|
|
6529
6660
|
icon,
|
|
@@ -6533,7 +6664,7 @@ function SelectableAssetRow({
|
|
|
6533
6664
|
accessibilityLabel
|
|
6534
6665
|
}) {
|
|
6535
6666
|
const theme = useTheme();
|
|
6536
|
-
return /* @__PURE__ */
|
|
6667
|
+
return /* @__PURE__ */ jsx38(
|
|
6537
6668
|
Pressable11,
|
|
6538
6669
|
{
|
|
6539
6670
|
onPress,
|
|
@@ -6554,7 +6685,7 @@ function SelectableAssetRow({
|
|
|
6554
6685
|
],
|
|
6555
6686
|
children: [
|
|
6556
6687
|
icon,
|
|
6557
|
-
/* @__PURE__ */
|
|
6688
|
+
/* @__PURE__ */ jsx38(Box, { flex: 1, children: /* @__PURE__ */ jsx38(
|
|
6558
6689
|
Text,
|
|
6559
6690
|
{
|
|
6560
6691
|
variant: "bodyMedium",
|
|
@@ -6563,7 +6694,7 @@ function SelectableAssetRow({
|
|
|
6563
6694
|
children: name
|
|
6564
6695
|
}
|
|
6565
6696
|
) }),
|
|
6566
|
-
selected ? /* @__PURE__ */
|
|
6697
|
+
selected ? /* @__PURE__ */ jsx38(FigmaCheckIcon, { size: 20, color: theme.content.elements.secondary }) : null
|
|
6567
6698
|
]
|
|
6568
6699
|
}
|
|
6569
6700
|
)
|
|
@@ -6575,7 +6706,7 @@ var styles16 = StyleSheet18.create({
|
|
|
6575
6706
|
});
|
|
6576
6707
|
|
|
6577
6708
|
// src/screens/SelectReceiveTokenScreen.tsx
|
|
6578
|
-
import { jsx as
|
|
6709
|
+
import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
6579
6710
|
var ROW_AVATAR_SIZE = 36;
|
|
6580
6711
|
function SelectReceiveTokenScreen({
|
|
6581
6712
|
tokens,
|
|
@@ -6605,14 +6736,14 @@ function SelectReceiveTokenScreen({
|
|
|
6605
6736
|
backgroundColor: theme.background.modal
|
|
6606
6737
|
},
|
|
6607
6738
|
children: [
|
|
6608
|
-
/* @__PURE__ */
|
|
6739
|
+
/* @__PURE__ */ jsx39(
|
|
6609
6740
|
TopBar,
|
|
6610
6741
|
{
|
|
6611
6742
|
title: t("selectReceiveToken.availableTokens"),
|
|
6612
6743
|
onClose
|
|
6613
6744
|
}
|
|
6614
6745
|
),
|
|
6615
|
-
/* @__PURE__ */
|
|
6746
|
+
/* @__PURE__ */ jsx39(Box, { style: styles17.search, children: /* @__PURE__ */ jsx39(
|
|
6616
6747
|
SearchInput,
|
|
6617
6748
|
{
|
|
6618
6749
|
value: query,
|
|
@@ -6622,7 +6753,7 @@ function SelectReceiveTokenScreen({
|
|
|
6622
6753
|
}
|
|
6623
6754
|
) }),
|
|
6624
6755
|
/* @__PURE__ */ jsxs20(View6, { style: styles17.scrollArea, children: [
|
|
6625
|
-
/* @__PURE__ */
|
|
6756
|
+
/* @__PURE__ */ jsx39(
|
|
6626
6757
|
BottomSheetScrollView2,
|
|
6627
6758
|
{
|
|
6628
6759
|
style: styles17.scroll,
|
|
@@ -6633,11 +6764,11 @@ function SelectReceiveTokenScreen({
|
|
|
6633
6764
|
showsVerticalScrollIndicator: false,
|
|
6634
6765
|
keyboardShouldPersistTaps: "handled",
|
|
6635
6766
|
...scrollProps,
|
|
6636
|
-
children: matches.map((token) => /* @__PURE__ */
|
|
6767
|
+
children: matches.map((token) => /* @__PURE__ */ jsx39(
|
|
6637
6768
|
SelectableAssetRow,
|
|
6638
6769
|
{
|
|
6639
6770
|
name: token,
|
|
6640
|
-
icon: /* @__PURE__ */
|
|
6771
|
+
icon: /* @__PURE__ */ jsx39(TokenChainIcon, { symbol: token, size: ROW_AVATAR_SIZE }),
|
|
6641
6772
|
selected: token === selectedToken,
|
|
6642
6773
|
onPress: () => onSelectToken(token),
|
|
6643
6774
|
accessibilityLabel: token
|
|
@@ -6646,7 +6777,7 @@ function SelectReceiveTokenScreen({
|
|
|
6646
6777
|
))
|
|
6647
6778
|
}
|
|
6648
6779
|
),
|
|
6649
|
-
showTopFade ? /* @__PURE__ */
|
|
6780
|
+
showTopFade ? /* @__PURE__ */ jsx39(
|
|
6650
6781
|
ScrollFade,
|
|
6651
6782
|
{
|
|
6652
6783
|
edge: "top",
|
|
@@ -6654,7 +6785,7 @@ function SelectReceiveTokenScreen({
|
|
|
6654
6785
|
id: "receive-token-list"
|
|
6655
6786
|
}
|
|
6656
6787
|
) : null,
|
|
6657
|
-
showBottomFade ? /* @__PURE__ */
|
|
6788
|
+
showBottomFade ? /* @__PURE__ */ jsx39(
|
|
6658
6789
|
ScrollFade,
|
|
6659
6790
|
{
|
|
6660
6791
|
edge: "bottom",
|
|
@@ -6676,7 +6807,7 @@ var styles17 = StyleSheet19.create({
|
|
|
6676
6807
|
});
|
|
6677
6808
|
|
|
6678
6809
|
// src/screens/SelectReceiveTokenAndChainScreen.tsx
|
|
6679
|
-
import { jsx as
|
|
6810
|
+
import { jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6680
6811
|
function SelectReceiveTokenAndChainScreen({
|
|
6681
6812
|
chains,
|
|
6682
6813
|
committed,
|
|
@@ -6721,7 +6852,7 @@ function SelectReceiveTokenAndChainScreen({
|
|
|
6721
6852
|
backgroundColor: theme.background.modal
|
|
6722
6853
|
},
|
|
6723
6854
|
children: [
|
|
6724
|
-
/* @__PURE__ */
|
|
6855
|
+
/* @__PURE__ */ jsx40(TopBar, { title: t("selectReceiveToken.title"), onBack }),
|
|
6725
6856
|
/* @__PURE__ */ jsxs21(View7, { style: styles18.scrollArea, children: [
|
|
6726
6857
|
/* @__PURE__ */ jsxs21(
|
|
6727
6858
|
BottomSheetScrollView3,
|
|
@@ -6736,14 +6867,14 @@ function SelectReceiveTokenAndChainScreen({
|
|
|
6736
6867
|
showsVerticalScrollIndicator: false,
|
|
6737
6868
|
...scrollProps,
|
|
6738
6869
|
children: [
|
|
6739
|
-
/* @__PURE__ */
|
|
6870
|
+
/* @__PURE__ */ jsx40(
|
|
6740
6871
|
AssetGrid,
|
|
6741
6872
|
{
|
|
6742
6873
|
title: t("selectReceiveToken.selectToken"),
|
|
6743
6874
|
items: cells.map((symbol) => ({
|
|
6744
6875
|
id: symbol,
|
|
6745
6876
|
label: symbol,
|
|
6746
|
-
icon: /* @__PURE__ */
|
|
6877
|
+
icon: /* @__PURE__ */ jsx40(TokenChainIcon, { symbol, size: ASSET_GRID_AVATAR_SIZE }),
|
|
6747
6878
|
selected: symbol === token,
|
|
6748
6879
|
onPress: () => draftToken(symbol)
|
|
6749
6880
|
})),
|
|
@@ -6754,14 +6885,14 @@ function SelectReceiveTokenAndChainScreen({
|
|
|
6754
6885
|
} : void 0
|
|
6755
6886
|
}
|
|
6756
6887
|
),
|
|
6757
|
-
/* @__PURE__ */
|
|
6888
|
+
/* @__PURE__ */ jsx40(
|
|
6758
6889
|
AssetGrid,
|
|
6759
6890
|
{
|
|
6760
6891
|
title: t("selectReceiveToken.selectChain"),
|
|
6761
6892
|
items: chains.map((chain) => ({
|
|
6762
6893
|
id: String(chain.chainId),
|
|
6763
6894
|
label: chainLabel(chain),
|
|
6764
|
-
icon: /* @__PURE__ */
|
|
6895
|
+
icon: /* @__PURE__ */ jsx40(
|
|
6765
6896
|
ChainAvatar,
|
|
6766
6897
|
{
|
|
6767
6898
|
uri: chainIconUri2(chain.chainId),
|
|
@@ -6777,7 +6908,7 @@ function SelectReceiveTokenAndChainScreen({
|
|
|
6777
6908
|
]
|
|
6778
6909
|
}
|
|
6779
6910
|
),
|
|
6780
|
-
showTopFade ? /* @__PURE__ */
|
|
6911
|
+
showTopFade ? /* @__PURE__ */ jsx40(
|
|
6781
6912
|
ScrollFade,
|
|
6782
6913
|
{
|
|
6783
6914
|
edge: "top",
|
|
@@ -6785,7 +6916,7 @@ function SelectReceiveTokenAndChainScreen({
|
|
|
6785
6916
|
id: "receive-token-chain-grid"
|
|
6786
6917
|
}
|
|
6787
6918
|
) : null,
|
|
6788
|
-
showBottomFade ? /* @__PURE__ */
|
|
6919
|
+
showBottomFade ? /* @__PURE__ */ jsx40(
|
|
6789
6920
|
ScrollFade,
|
|
6790
6921
|
{
|
|
6791
6922
|
edge: "bottom",
|
|
@@ -6793,7 +6924,7 @@ function SelectReceiveTokenAndChainScreen({
|
|
|
6793
6924
|
id: "receive-token-chain-grid"
|
|
6794
6925
|
}
|
|
6795
6926
|
) : null,
|
|
6796
|
-
/* @__PURE__ */
|
|
6927
|
+
/* @__PURE__ */ jsx40(Box, { style: [styles18.footer, { bottom: footerBottom }], children: /* @__PURE__ */ jsx40(
|
|
6797
6928
|
PillButton2,
|
|
6798
6929
|
{
|
|
6799
6930
|
label: t("common.confirm"),
|
|
@@ -6806,7 +6937,7 @@ function SelectReceiveTokenAndChainScreen({
|
|
|
6806
6937
|
}
|
|
6807
6938
|
) })
|
|
6808
6939
|
] }),
|
|
6809
|
-
/* @__PURE__ */
|
|
6940
|
+
/* @__PURE__ */ jsx40(
|
|
6810
6941
|
BottomSheetModal3,
|
|
6811
6942
|
{
|
|
6812
6943
|
ref: nestedSheetRef,
|
|
@@ -6817,7 +6948,7 @@ function SelectReceiveTokenAndChainScreen({
|
|
|
6817
6948
|
backgroundComponent: FlowSheetBackground,
|
|
6818
6949
|
backdropComponent: renderNestedBackdrop,
|
|
6819
6950
|
onDismiss: () => setNestedScreen(null),
|
|
6820
|
-
children: /* @__PURE__ */
|
|
6951
|
+
children: /* @__PURE__ */ jsx40(BottomSheetView3, { focusHook: useInertScrollableFocus, children: nestedScreen === "availableTokens" ? /* @__PURE__ */ jsx40(
|
|
6821
6952
|
SelectReceiveTokenScreen,
|
|
6822
6953
|
{
|
|
6823
6954
|
tokens,
|
|
@@ -6849,7 +6980,7 @@ var styles18 = StyleSheet20.create({
|
|
|
6849
6980
|
import { BottomSheetScrollView as BottomSheetScrollView4 } from "@gorhom/bottom-sheet";
|
|
6850
6981
|
import { Pressable as Pressable12, StyleSheet as StyleSheet21, View as View8, useWindowDimensions as useWindowDimensions5 } from "react-native";
|
|
6851
6982
|
import { useSafeAreaInsets as useSafeAreaInsets10 } from "react-native-safe-area-context";
|
|
6852
|
-
import { jsx as
|
|
6983
|
+
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6853
6984
|
function SelectSourceTokenScreen({
|
|
6854
6985
|
options,
|
|
6855
6986
|
selectedIndex,
|
|
@@ -6865,7 +6996,7 @@ function SelectSourceTokenScreen({
|
|
|
6865
6996
|
// A full window tall, like the step it replaces — the flow sheet is pinned
|
|
6866
6997
|
// to a fixed detent while a crypto withdrawal step is up (see sheetSizing).
|
|
6867
6998
|
/* @__PURE__ */ jsxs22(Box, { style: { height, paddingTop: insets.top }, children: [
|
|
6868
|
-
/* @__PURE__ */
|
|
6999
|
+
/* @__PURE__ */ jsx41(Grabber, {}),
|
|
6869
7000
|
/* @__PURE__ */ jsxs22(
|
|
6870
7001
|
Box,
|
|
6871
7002
|
{
|
|
@@ -6873,23 +7004,23 @@ function SelectSourceTokenScreen({
|
|
|
6873
7004
|
alignItems: "center",
|
|
6874
7005
|
style: [styles19.topBar, { height: theme.sizes.topBar }],
|
|
6875
7006
|
children: [
|
|
6876
|
-
/* @__PURE__ */
|
|
7007
|
+
/* @__PURE__ */ jsx41(
|
|
6877
7008
|
Pressable12,
|
|
6878
7009
|
{
|
|
6879
7010
|
onPress: onBack,
|
|
6880
7011
|
accessibilityRole: "button",
|
|
6881
7012
|
accessibilityLabel: t("common.back"),
|
|
6882
7013
|
hitSlop: 8,
|
|
6883
|
-
children: /* @__PURE__ */
|
|
7014
|
+
children: /* @__PURE__ */ jsx41(Text, { variant: "bodyMedium", children: t("common.back") })
|
|
6884
7015
|
}
|
|
6885
7016
|
),
|
|
6886
|
-
/* @__PURE__ */
|
|
6887
|
-
/* @__PURE__ */
|
|
7017
|
+
/* @__PURE__ */ jsx41(Text, { variant: "headerTitle", style: styles19.title, children: t("withdrawCrypto.selectSource") }),
|
|
7018
|
+
/* @__PURE__ */ jsx41(Box, { style: styles19.spacer })
|
|
6888
7019
|
]
|
|
6889
7020
|
}
|
|
6890
7021
|
),
|
|
6891
7022
|
/* @__PURE__ */ jsxs22(View8, { style: styles19.scrollArea, children: [
|
|
6892
|
-
/* @__PURE__ */
|
|
7023
|
+
/* @__PURE__ */ jsx41(
|
|
6893
7024
|
BottomSheetScrollView4,
|
|
6894
7025
|
{
|
|
6895
7026
|
style: styles19.scroll,
|
|
@@ -6902,7 +7033,7 @@ function SelectSourceTokenScreen({
|
|
|
6902
7033
|
children: options.map((option, index) => {
|
|
6903
7034
|
const label = option.label ?? option.token.symbol;
|
|
6904
7035
|
const isSelected = index === selectedIndex;
|
|
6905
|
-
return /* @__PURE__ */
|
|
7036
|
+
return /* @__PURE__ */ jsx41(
|
|
6906
7037
|
Pressable12,
|
|
6907
7038
|
{
|
|
6908
7039
|
onPress: () => onSelect(index),
|
|
@@ -6928,14 +7059,14 @@ function SelectSourceTokenScreen({
|
|
|
6928
7059
|
alignItems: "center",
|
|
6929
7060
|
style: styles19.token,
|
|
6930
7061
|
children: [
|
|
6931
|
-
/* @__PURE__ */
|
|
7062
|
+
/* @__PURE__ */ jsx41(
|
|
6932
7063
|
TokenChainIcon,
|
|
6933
7064
|
{
|
|
6934
7065
|
symbol: option.token.symbol,
|
|
6935
7066
|
iconSrc: option.iconSrc
|
|
6936
7067
|
}
|
|
6937
7068
|
),
|
|
6938
|
-
/* @__PURE__ */
|
|
7069
|
+
/* @__PURE__ */ jsx41(
|
|
6939
7070
|
Text,
|
|
6940
7071
|
{
|
|
6941
7072
|
variant: "bodyMedium",
|
|
@@ -6946,7 +7077,7 @@ function SelectSourceTokenScreen({
|
|
|
6946
7077
|
]
|
|
6947
7078
|
}
|
|
6948
7079
|
),
|
|
6949
|
-
isSelected ? /* @__PURE__ */
|
|
7080
|
+
isSelected ? /* @__PURE__ */ jsx41(FigmaSuccessCheckIcon, { size: 16 }) : null
|
|
6950
7081
|
]
|
|
6951
7082
|
}
|
|
6952
7083
|
)
|
|
@@ -6956,7 +7087,7 @@ function SelectSourceTokenScreen({
|
|
|
6956
7087
|
})
|
|
6957
7088
|
}
|
|
6958
7089
|
),
|
|
6959
|
-
showTopFade ? /* @__PURE__ */
|
|
7090
|
+
showTopFade ? /* @__PURE__ */ jsx41(
|
|
6960
7091
|
ScrollFade,
|
|
6961
7092
|
{
|
|
6962
7093
|
edge: "top",
|
|
@@ -6964,7 +7095,7 @@ function SelectSourceTokenScreen({
|
|
|
6964
7095
|
id: "source-token-list"
|
|
6965
7096
|
}
|
|
6966
7097
|
) : null,
|
|
6967
|
-
showBottomFade ? /* @__PURE__ */
|
|
7098
|
+
showBottomFade ? /* @__PURE__ */ jsx41(
|
|
6968
7099
|
ScrollFade,
|
|
6969
7100
|
{
|
|
6970
7101
|
edge: "bottom",
|
|
@@ -6991,7 +7122,7 @@ var styles19 = StyleSheet21.create({
|
|
|
6991
7122
|
// src/screens/TransactionBreakdownScreen.tsx
|
|
6992
7123
|
import { StyleSheet as StyleSheet22 } from "react-native";
|
|
6993
7124
|
import { useSafeAreaInsets as useSafeAreaInsets11 } from "react-native-safe-area-context";
|
|
6994
|
-
import { jsx as
|
|
7125
|
+
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6995
7126
|
function TransactionBreakdownScreen({
|
|
6996
7127
|
usdLabel,
|
|
6997
7128
|
floorLabel
|
|
@@ -7000,13 +7131,13 @@ function TransactionBreakdownScreen({
|
|
|
7000
7131
|
const theme = useTheme();
|
|
7001
7132
|
const insets = useSafeAreaInsets11();
|
|
7002
7133
|
return /* @__PURE__ */ jsxs23(Box, { children: [
|
|
7003
|
-
/* @__PURE__ */
|
|
7004
|
-
/* @__PURE__ */
|
|
7005
|
-
/* @__PURE__ */
|
|
7134
|
+
/* @__PURE__ */ jsx42(Grabber, {}),
|
|
7135
|
+
/* @__PURE__ */ jsx42(TopBar, { title: t("withdrawAddress.breakdownTitle") }),
|
|
7136
|
+
/* @__PURE__ */ jsx42(
|
|
7006
7137
|
Box,
|
|
7007
7138
|
{
|
|
7008
7139
|
style: [styles20.body, { paddingBottom: BODY_PADDING + insets.bottom }],
|
|
7009
|
-
children: /* @__PURE__ */
|
|
7140
|
+
children: /* @__PURE__ */ jsx42(
|
|
7010
7141
|
Text,
|
|
7011
7142
|
{
|
|
7012
7143
|
variant: "detail",
|
|
@@ -7034,7 +7165,7 @@ function emphasise(sentence, values, color) {
|
|
|
7034
7165
|
(part, index) => values.includes(part) ? (
|
|
7035
7166
|
// Index-keyed: a figure can legitimately appear twice, so the value is
|
|
7036
7167
|
// not a key.
|
|
7037
|
-
/* @__PURE__ */
|
|
7168
|
+
/* @__PURE__ */ jsx42(Text, { variant: "detail", weight: "medium", style: { color }, children: part }, index)
|
|
7038
7169
|
) : part
|
|
7039
7170
|
);
|
|
7040
7171
|
}
|
|
@@ -7047,17 +7178,23 @@ var styles20 = StyleSheet22.create({
|
|
|
7047
7178
|
// src/screens/WithdrawAddressScreen.tsx
|
|
7048
7179
|
import {
|
|
7049
7180
|
ActivityIndicator as ActivityIndicator3,
|
|
7181
|
+
Keyboard as Keyboard2,
|
|
7050
7182
|
StyleSheet as StyleSheet24,
|
|
7051
7183
|
useWindowDimensions as useWindowDimensions6
|
|
7052
7184
|
} from "react-native";
|
|
7185
|
+
import Animated6, {
|
|
7186
|
+
Easing as Easing5,
|
|
7187
|
+
Keyframe as Keyframe3,
|
|
7188
|
+
LinearTransition as LinearTransition2
|
|
7189
|
+
} from "react-native-reanimated";
|
|
7053
7190
|
import { useSafeAreaInsets as useSafeAreaInsets12 } from "react-native-safe-area-context";
|
|
7054
7191
|
|
|
7055
7192
|
// src/components/ReceiveAsRow.tsx
|
|
7056
|
-
import { jsx as
|
|
7193
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
7057
7194
|
function ReceiveAsRow({ destinationToken, onPress }) {
|
|
7058
7195
|
const { t } = useFunkitTranslation();
|
|
7059
7196
|
const label = t("withdrawCrypto.receiveAs");
|
|
7060
|
-
return /* @__PURE__ */
|
|
7197
|
+
return /* @__PURE__ */ jsx43(
|
|
7061
7198
|
SelectedChainRow,
|
|
7062
7199
|
{
|
|
7063
7200
|
label,
|
|
@@ -7076,7 +7213,7 @@ function ReceiveAsRow({ destinationToken, onPress }) {
|
|
|
7076
7213
|
// src/components/WalletAddressInput.tsx
|
|
7077
7214
|
import { BottomSheetTextInput as BottomSheetTextInput2 } from "@gorhom/bottom-sheet";
|
|
7078
7215
|
import { StyleSheet as StyleSheet23 } from "react-native";
|
|
7079
|
-
import { jsx as
|
|
7216
|
+
import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
7080
7217
|
var STATUS_ICON_SIZE = 16;
|
|
7081
7218
|
function WalletAddressInput({
|
|
7082
7219
|
value,
|
|
@@ -7102,7 +7239,7 @@ function WalletAddressInput({
|
|
|
7102
7239
|
justifyContent: "space-between",
|
|
7103
7240
|
style: styles21.header,
|
|
7104
7241
|
children: [
|
|
7105
|
-
/* @__PURE__ */
|
|
7242
|
+
/* @__PURE__ */ jsx44(
|
|
7106
7243
|
Text,
|
|
7107
7244
|
{
|
|
7108
7245
|
variant: "detail",
|
|
@@ -7113,14 +7250,14 @@ function WalletAddressInput({
|
|
|
7113
7250
|
}
|
|
7114
7251
|
),
|
|
7115
7252
|
isAddress === void 0 ? null : /* @__PURE__ */ jsxs24(Box, { flexDirection: "row", alignItems: "center", style: styles21.status, children: [
|
|
7116
|
-
isAddress ? /* @__PURE__ */
|
|
7253
|
+
isAddress ? /* @__PURE__ */ jsx44(FigmaSuccessCheckIcon, { size: STATUS_ICON_SIZE }) : /* @__PURE__ */ jsx44(
|
|
7117
7254
|
FigmaAlertCircleIcon,
|
|
7118
7255
|
{
|
|
7119
7256
|
size: STATUS_ICON_SIZE,
|
|
7120
7257
|
color: theme.content.elements.error
|
|
7121
7258
|
}
|
|
7122
7259
|
),
|
|
7123
|
-
/* @__PURE__ */
|
|
7260
|
+
/* @__PURE__ */ jsx44(
|
|
7124
7261
|
Text,
|
|
7125
7262
|
{
|
|
7126
7263
|
variant: "detail",
|
|
@@ -7135,7 +7272,7 @@ function WalletAddressInput({
|
|
|
7135
7272
|
]
|
|
7136
7273
|
}
|
|
7137
7274
|
),
|
|
7138
|
-
/* @__PURE__ */
|
|
7275
|
+
/* @__PURE__ */ jsx44(
|
|
7139
7276
|
Box,
|
|
7140
7277
|
{
|
|
7141
7278
|
borderRadius: "element",
|
|
@@ -7148,7 +7285,7 @@ function WalletAddressInput({
|
|
|
7148
7285
|
backgroundColor: theme.background.modal
|
|
7149
7286
|
}
|
|
7150
7287
|
],
|
|
7151
|
-
children: /* @__PURE__ */
|
|
7288
|
+
children: /* @__PURE__ */ jsx44(
|
|
7152
7289
|
BottomSheetTextInput2,
|
|
7153
7290
|
{
|
|
7154
7291
|
value,
|
|
@@ -7169,7 +7306,7 @@ function WalletAddressInput({
|
|
|
7169
7306
|
}
|
|
7170
7307
|
),
|
|
7171
7308
|
/* @__PURE__ */ jsxs24(Box, { flexDirection: "row", style: styles21.buttonRow, children: [
|
|
7172
|
-
/* @__PURE__ */
|
|
7309
|
+
/* @__PURE__ */ jsx44(Box, { style: styles21.button, children: /* @__PURE__ */ jsx44(
|
|
7173
7310
|
PillButton2,
|
|
7174
7311
|
{
|
|
7175
7312
|
label: t("withdrawAddress.paste"),
|
|
@@ -7179,7 +7316,7 @@ function WalletAddressInput({
|
|
|
7179
7316
|
disabled: isPasting
|
|
7180
7317
|
}
|
|
7181
7318
|
) }),
|
|
7182
|
-
/* @__PURE__ */
|
|
7319
|
+
/* @__PURE__ */ jsx44(Box, { style: styles21.button, children: isEmpty ? onUseConnected ? /* @__PURE__ */ jsx44(
|
|
7183
7320
|
PillButton2,
|
|
7184
7321
|
{
|
|
7185
7322
|
label: t("withdrawAddress.useConnected"),
|
|
@@ -7187,7 +7324,7 @@ function WalletAddressInput({
|
|
|
7187
7324
|
variant: "secondary",
|
|
7188
7325
|
onPress: onUseConnected
|
|
7189
7326
|
}
|
|
7190
|
-
) : null : /* @__PURE__ */
|
|
7327
|
+
) : null : /* @__PURE__ */ jsx44(
|
|
7191
7328
|
PillButton2,
|
|
7192
7329
|
{
|
|
7193
7330
|
label: t("withdrawAddress.clear"),
|
|
@@ -7197,7 +7334,7 @@ function WalletAddressInput({
|
|
|
7197
7334
|
}
|
|
7198
7335
|
) })
|
|
7199
7336
|
] }),
|
|
7200
|
-
helperText ? /* @__PURE__ */
|
|
7337
|
+
helperText ? /* @__PURE__ */ jsx44(
|
|
7201
7338
|
Text,
|
|
7202
7339
|
{
|
|
7203
7340
|
variant: "detail",
|
|
@@ -7225,7 +7362,22 @@ var styles21 = StyleSheet23.create({
|
|
|
7225
7362
|
});
|
|
7226
7363
|
|
|
7227
7364
|
// src/screens/WithdrawAddressScreen.tsx
|
|
7228
|
-
import {
|
|
7365
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
7366
|
+
var AnimatedBox2 = Animated6.createAnimatedComponent(Box);
|
|
7367
|
+
var SUBMIT_TRANSITION_DURATION = 380;
|
|
7368
|
+
var SUBMIT_TRANSITION_EASING = Easing5.bezier(0.16, 1, 0.3, 1);
|
|
7369
|
+
var SUBMIT_TRAVEL = 24;
|
|
7370
|
+
var FADE_SLIDE_UP_EXITING = new Keyframe3({
|
|
7371
|
+
0: { opacity: 1, transform: [{ translateY: 0 }] },
|
|
7372
|
+
100: {
|
|
7373
|
+
opacity: 0,
|
|
7374
|
+
transform: [{ translateY: -SUBMIT_TRAVEL }],
|
|
7375
|
+
easing: SUBMIT_TRANSITION_EASING
|
|
7376
|
+
}
|
|
7377
|
+
}).duration(SUBMIT_TRANSITION_DURATION);
|
|
7378
|
+
var SUBMIT_TRANSITION = LinearTransition2.duration(
|
|
7379
|
+
SUBMIT_TRANSITION_DURATION
|
|
7380
|
+
).easing(SUBMIT_TRANSITION_EASING);
|
|
7229
7381
|
function WithdrawAddressScreen({
|
|
7230
7382
|
title,
|
|
7231
7383
|
recipient,
|
|
@@ -7265,16 +7417,16 @@ function WithdrawAddressScreen({
|
|
|
7265
7417
|
backgroundColor: theme.background.modal
|
|
7266
7418
|
},
|
|
7267
7419
|
children: [
|
|
7268
|
-
/* @__PURE__ */
|
|
7269
|
-
/* @__PURE__ */ jsxs25(
|
|
7270
|
-
/* @__PURE__ */
|
|
7420
|
+
isSubmitting ? null : /* @__PURE__ */ jsx45(AnimatedBox2, { exiting: FADE_SLIDE_UP_EXITING, children: /* @__PURE__ */ jsx45(TopBar, { title, onBack, onClose }) }),
|
|
7421
|
+
isSubmitting ? null : /* @__PURE__ */ jsxs25(AnimatedBox2, { exiting: FADE_SLIDE_UP_EXITING, style: styles22.body, children: [
|
|
7422
|
+
/* @__PURE__ */ jsx45(
|
|
7271
7423
|
ReceiveAsRow,
|
|
7272
7424
|
{
|
|
7273
7425
|
destinationToken,
|
|
7274
7426
|
onPress: onPressReceive
|
|
7275
7427
|
}
|
|
7276
7428
|
),
|
|
7277
|
-
/* @__PURE__ */
|
|
7429
|
+
/* @__PURE__ */ jsx45(
|
|
7278
7430
|
WalletAddressInput,
|
|
7279
7431
|
{
|
|
7280
7432
|
value: recipient,
|
|
@@ -7288,26 +7440,39 @@ function WithdrawAddressScreen({
|
|
|
7288
7440
|
}
|
|
7289
7441
|
)
|
|
7290
7442
|
] }),
|
|
7291
|
-
/* @__PURE__ */
|
|
7292
|
-
|
|
7443
|
+
/* @__PURE__ */ jsx45(
|
|
7444
|
+
AnimatedBox2,
|
|
7293
7445
|
{
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7446
|
+
layout: SUBMIT_TRANSITION,
|
|
7447
|
+
flex: 1,
|
|
7448
|
+
justifyContent: "center",
|
|
7449
|
+
style: styles22.summary,
|
|
7450
|
+
children: isAddress ? /* @__PURE__ */ jsx45(AnimatedBox2, { layout: SUBMIT_TRANSITION, children: /* @__PURE__ */ jsx45(
|
|
7451
|
+
ReceiveAmountSummary,
|
|
7452
|
+
{
|
|
7453
|
+
label: t("withdrawAddress.youllReceive"),
|
|
7454
|
+
usdLabel,
|
|
7455
|
+
tokenLabel,
|
|
7456
|
+
onPressBreakdown: usdLabel ? onPressBreakdown : void 0
|
|
7457
|
+
}
|
|
7458
|
+
) }) : null
|
|
7298
7459
|
}
|
|
7299
|
-
)
|
|
7300
|
-
recipient === "" ? null : /* @__PURE__ */
|
|
7301
|
-
|
|
7460
|
+
),
|
|
7461
|
+
recipient === "" ? null : /* @__PURE__ */ jsxs25(
|
|
7462
|
+
AnimatedBox2,
|
|
7302
7463
|
{
|
|
7464
|
+
layout: SUBMIT_TRANSITION,
|
|
7303
7465
|
style: [
|
|
7304
7466
|
styles22.footer,
|
|
7305
7467
|
{
|
|
7306
|
-
|
|
7468
|
+
// Withdrawing drops the keyboard, so stop clearing it in the same
|
|
7469
|
+
// commit that frees the space above: waiting for the hide event
|
|
7470
|
+
// would relayout the column a second time, mid-transition.
|
|
7471
|
+
marginBottom: keyboardHeight > 0 && !isSubmitting ? keyboardHeight + FOOTER_KEYBOARD_GAP : footerBottomMargin(insets.bottom)
|
|
7307
7472
|
}
|
|
7308
7473
|
],
|
|
7309
7474
|
children: [
|
|
7310
|
-
footerErrorText ? /* @__PURE__ */
|
|
7475
|
+
footerErrorText ? /* @__PURE__ */ jsx45(
|
|
7311
7476
|
Text,
|
|
7312
7477
|
{
|
|
7313
7478
|
variant: "detail",
|
|
@@ -7318,11 +7483,11 @@ function WithdrawAddressScreen({
|
|
|
7318
7483
|
children: footerErrorText
|
|
7319
7484
|
}
|
|
7320
7485
|
) : null,
|
|
7321
|
-
/* @__PURE__ */
|
|
7486
|
+
/* @__PURE__ */ jsx45(
|
|
7322
7487
|
PillButton2,
|
|
7323
7488
|
{
|
|
7324
7489
|
label: isSubmitting ? t("withdrawAddress.withdrawing") : t("withdrawAddress.withdrawNow"),
|
|
7325
|
-
icon: isSubmitting ? /* @__PURE__ */
|
|
7490
|
+
icon: isSubmitting ? /* @__PURE__ */ jsx45(
|
|
7326
7491
|
ActivityIndicator3,
|
|
7327
7492
|
{
|
|
7328
7493
|
size: "small",
|
|
@@ -7330,12 +7495,15 @@ function WithdrawAddressScreen({
|
|
|
7330
7495
|
}
|
|
7331
7496
|
) : void 0,
|
|
7332
7497
|
disabled: !canSubmit || isBusy,
|
|
7333
|
-
onPress:
|
|
7498
|
+
onPress: () => {
|
|
7499
|
+
Keyboard2.dismiss();
|
|
7500
|
+
onSubmit();
|
|
7501
|
+
}
|
|
7334
7502
|
}
|
|
7335
7503
|
)
|
|
7336
7504
|
]
|
|
7337
7505
|
}
|
|
7338
|
-
)
|
|
7506
|
+
)
|
|
7339
7507
|
]
|
|
7340
7508
|
}
|
|
7341
7509
|
);
|
|
@@ -7356,15 +7524,15 @@ var styles22 = StyleSheet24.create({
|
|
|
7356
7524
|
// src/screens/WithdrawAmountScreen.tsx
|
|
7357
7525
|
import { USD_DECIMALS, percentOfAmount } from "@funkit/connect-core";
|
|
7358
7526
|
import { Pressable as Pressable15, StyleSheet as StyleSheet28, useWindowDimensions as useWindowDimensions8 } from "react-native";
|
|
7359
|
-
import
|
|
7527
|
+
import Animated9, { Keyframe as Keyframe5, LinearTransition as LinearTransition5 } from "react-native-reanimated";
|
|
7360
7528
|
import { useSafeAreaInsets as useSafeAreaInsets13 } from "react-native-safe-area-context";
|
|
7361
7529
|
|
|
7362
7530
|
// src/components/AmountDisplay.tsx
|
|
7363
7531
|
import { useMemo as useMemo10 } from "react";
|
|
7364
7532
|
import { StyleSheet as StyleSheet25, useWindowDimensions as useWindowDimensions7 } from "react-native";
|
|
7365
|
-
import
|
|
7366
|
-
Keyframe as
|
|
7367
|
-
LinearTransition,
|
|
7533
|
+
import Animated7, {
|
|
7534
|
+
Keyframe as Keyframe4,
|
|
7535
|
+
LinearTransition as LinearTransition3,
|
|
7368
7536
|
useAnimatedStyle as useAnimatedStyle2,
|
|
7369
7537
|
withTiming as withTiming2
|
|
7370
7538
|
} from "react-native-reanimated";
|
|
@@ -7372,7 +7540,9 @@ import Animated5, {
|
|
|
7372
7540
|
// src/utils/amountGlyphs.ts
|
|
7373
7541
|
function amountGlyphs(value, prefix) {
|
|
7374
7542
|
const glyphs = [];
|
|
7375
|
-
if (prefix)
|
|
7543
|
+
if (prefix) {
|
|
7544
|
+
glyphs.push({ key: "prefix", char: prefix, kind: "prefix" });
|
|
7545
|
+
}
|
|
7376
7546
|
if (value === "") {
|
|
7377
7547
|
glyphs.push({ key: "placeholder", char: "0", kind: "placeholder" });
|
|
7378
7548
|
return glyphs;
|
|
@@ -7384,12 +7554,12 @@ function amountGlyphs(value, prefix) {
|
|
|
7384
7554
|
}
|
|
7385
7555
|
|
|
7386
7556
|
// src/utils/motion.ts
|
|
7387
|
-
import { Easing as
|
|
7557
|
+
import { Easing as Easing6 } from "react-native-reanimated";
|
|
7388
7558
|
var MOTION_DURATION = 180;
|
|
7389
|
-
var MOTION_EASING =
|
|
7559
|
+
var MOTION_EASING = Easing6.bezier(0.33, 1, 0.68, 1);
|
|
7390
7560
|
|
|
7391
7561
|
// src/components/AmountDisplay.tsx
|
|
7392
|
-
import { jsx as
|
|
7562
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
7393
7563
|
var AMOUNT_FONT_SIZE2 = 96;
|
|
7394
7564
|
var PLACEHOLDER_OPACITY = 0.2;
|
|
7395
7565
|
var LINE_HEIGHT_RATIO2 = 1.25;
|
|
@@ -7398,9 +7568,9 @@ var CAP_BOX_RATIO2 = 68 / 96;
|
|
|
7398
7568
|
var CHARACTER_ADVANCE_RATIO = 0.6;
|
|
7399
7569
|
var HORIZONTAL_INSET = 16;
|
|
7400
7570
|
var MIN_FONT_SIZE = 40;
|
|
7401
|
-
var
|
|
7402
|
-
var AnimatedText =
|
|
7403
|
-
var GLYPH_LAYOUT =
|
|
7571
|
+
var AnimatedBox3 = Animated7.createAnimatedComponent(Box);
|
|
7572
|
+
var AnimatedText = Animated7.createAnimatedComponent(Text);
|
|
7573
|
+
var GLYPH_LAYOUT = LinearTransition3.duration(MOTION_DURATION).easing(MOTION_EASING);
|
|
7404
7574
|
function AmountDisplay({
|
|
7405
7575
|
value,
|
|
7406
7576
|
prefix = "$",
|
|
@@ -7434,20 +7604,20 @@ function AmountDisplay({
|
|
|
7434
7604
|
return (
|
|
7435
7605
|
// The window the characters slide through. What it clips is the dead space
|
|
7436
7606
|
// the margin takes back, never the glyphs.
|
|
7437
|
-
/* @__PURE__ */
|
|
7607
|
+
/* @__PURE__ */ jsx46(
|
|
7438
7608
|
Box,
|
|
7439
7609
|
{
|
|
7440
7610
|
accessible: true,
|
|
7441
7611
|
accessibilityLabel,
|
|
7442
7612
|
accessibilityValue: { text },
|
|
7443
7613
|
style: [styles23.row, { marginVertical: -overhang }],
|
|
7444
|
-
children: glyphs.map(({ key, char, kind }) => /* @__PURE__ */
|
|
7445
|
-
|
|
7614
|
+
children: glyphs.map(({ key, char, kind }) => /* @__PURE__ */ jsx46(
|
|
7615
|
+
AnimatedBox3,
|
|
7446
7616
|
{
|
|
7447
7617
|
entering: slides[glyphSide(kind, isEmpty)].entering,
|
|
7448
7618
|
exiting: slides[glyphSide(kind, isEmpty)].exiting,
|
|
7449
7619
|
layout: GLYPH_LAYOUT,
|
|
7450
|
-
children: /* @__PURE__ */
|
|
7620
|
+
children: /* @__PURE__ */ jsx46(
|
|
7451
7621
|
AnimatedText,
|
|
7452
7622
|
{
|
|
7453
7623
|
weight: "medium",
|
|
@@ -7473,17 +7643,21 @@ function AmountDisplay({
|
|
|
7473
7643
|
);
|
|
7474
7644
|
}
|
|
7475
7645
|
function glyphSide(kind, isEmpty) {
|
|
7476
|
-
if (kind === "placeholder")
|
|
7477
|
-
|
|
7646
|
+
if (kind === "placeholder") {
|
|
7647
|
+
return "above";
|
|
7648
|
+
}
|
|
7649
|
+
if (kind === "prefix" && isEmpty) {
|
|
7650
|
+
return "above";
|
|
7651
|
+
}
|
|
7478
7652
|
return "below";
|
|
7479
7653
|
}
|
|
7480
7654
|
function slideKeyframes(offset) {
|
|
7481
7655
|
return {
|
|
7482
|
-
entering: new
|
|
7656
|
+
entering: new Keyframe4({
|
|
7483
7657
|
0: { transform: [{ translateY: offset }] },
|
|
7484
7658
|
100: { transform: [{ translateY: 0 }], easing: MOTION_EASING }
|
|
7485
7659
|
}).duration(MOTION_DURATION),
|
|
7486
|
-
exiting: new
|
|
7660
|
+
exiting: new Keyframe4({
|
|
7487
7661
|
0: { transform: [{ translateY: 0 }] },
|
|
7488
7662
|
100: { transform: [{ translateY: offset }], easing: MOTION_EASING }
|
|
7489
7663
|
}).duration(MOTION_DURATION)
|
|
@@ -7529,20 +7703,22 @@ async function loadTap() {
|
|
|
7529
7703
|
}
|
|
7530
7704
|
|
|
7531
7705
|
// src/haptics/HapticsContext.tsx
|
|
7532
|
-
import { jsx as
|
|
7706
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
7533
7707
|
var HapticsContext = createContext2(hapticTap);
|
|
7534
7708
|
function FunkitHapticsProvider({
|
|
7535
7709
|
hapticFeedback = hapticTap,
|
|
7536
7710
|
children
|
|
7537
7711
|
}) {
|
|
7538
|
-
return /* @__PURE__ */
|
|
7712
|
+
return /* @__PURE__ */ jsx47(HapticsContext.Provider, { value: hapticFeedback, children });
|
|
7539
7713
|
}
|
|
7540
7714
|
var hasWarned = false;
|
|
7541
7715
|
function useHapticFeedback() {
|
|
7542
7716
|
const haptic = useContext2(HapticsContext);
|
|
7543
7717
|
return useCallback13(() => {
|
|
7544
7718
|
const warn2 = (error) => {
|
|
7545
|
-
if (hasWarned)
|
|
7719
|
+
if (hasWarned) {
|
|
7720
|
+
return;
|
|
7721
|
+
}
|
|
7546
7722
|
hasWarned = true;
|
|
7547
7723
|
logger.warn("connect-rn: haptic feedback failed; taps will be silent", {
|
|
7548
7724
|
error: error instanceof Error ? error.message : String(error)
|
|
@@ -7557,7 +7733,7 @@ function useHapticFeedback() {
|
|
|
7557
7733
|
}
|
|
7558
7734
|
|
|
7559
7735
|
// src/components/NumPad.tsx
|
|
7560
|
-
import { jsx as
|
|
7736
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
7561
7737
|
var KEY_FONT_SIZE = 24;
|
|
7562
7738
|
var COLUMN_ALIGNMENT = ["flex-start", "center", "flex-end"];
|
|
7563
7739
|
var ROWS = [
|
|
@@ -7572,7 +7748,7 @@ function NumPad({
|
|
|
7572
7748
|
}) {
|
|
7573
7749
|
const theme = useTheme();
|
|
7574
7750
|
const haptic = useHapticFeedback();
|
|
7575
|
-
return /* @__PURE__ */
|
|
7751
|
+
return /* @__PURE__ */ jsx48(Box, { flex: 1, children: ROWS.map((row2) => /* @__PURE__ */ jsx48(Box, { flexDirection: "row", flex: 1, children: row2.map((key, column) => /* @__PURE__ */ jsx48(
|
|
7576
7752
|
Pressable13,
|
|
7577
7753
|
{
|
|
7578
7754
|
onPress: () => {
|
|
@@ -7582,13 +7758,13 @@ function NumPad({
|
|
|
7582
7758
|
accessibilityRole: "button",
|
|
7583
7759
|
accessibilityLabel: key === "backspace" ? backspaceAccessibilityLabel : key,
|
|
7584
7760
|
style: [styles24.key, { alignItems: COLUMN_ALIGNMENT[column] }],
|
|
7585
|
-
children: key === "backspace" ? /* @__PURE__ */
|
|
7761
|
+
children: key === "backspace" ? /* @__PURE__ */ jsx48(
|
|
7586
7762
|
FigmaChevronLeftIcon,
|
|
7587
7763
|
{
|
|
7588
7764
|
size: KEY_FONT_SIZE,
|
|
7589
7765
|
color: theme.content.elements.primary
|
|
7590
7766
|
}
|
|
7591
|
-
) : /* @__PURE__ */
|
|
7767
|
+
) : /* @__PURE__ */ jsx48(
|
|
7592
7768
|
Text,
|
|
7593
7769
|
{
|
|
7594
7770
|
weight: "medium",
|
|
@@ -7621,10 +7797,10 @@ var styles24 = StyleSheet26.create({
|
|
|
7621
7797
|
|
|
7622
7798
|
// src/components/WithdrawSourceCard.tsx
|
|
7623
7799
|
import { Pressable as Pressable14, StyleSheet as StyleSheet27 } from "react-native";
|
|
7624
|
-
import
|
|
7625
|
-
import { jsx as
|
|
7626
|
-
var
|
|
7627
|
-
var FOOT_TRANSITION =
|
|
7800
|
+
import Animated8, { LinearTransition as LinearTransition4 } from "react-native-reanimated";
|
|
7801
|
+
import { jsx as jsx49, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
7802
|
+
var AnimatedBox4 = Animated8.createAnimatedComponent(Box);
|
|
7803
|
+
var FOOT_TRANSITION = LinearTransition4.duration(MOTION_DURATION).easing(MOTION_EASING);
|
|
7628
7804
|
var HORIZONTAL_PADDING = 12;
|
|
7629
7805
|
var VERTICAL_PADDING = 13;
|
|
7630
7806
|
var ATTACHED_BOTTOM_PADDING = 40;
|
|
@@ -7640,7 +7816,7 @@ function WithdrawSourceCard({
|
|
|
7640
7816
|
}) {
|
|
7641
7817
|
const theme = useTheme();
|
|
7642
7818
|
const card2 = /* @__PURE__ */ jsxs26(
|
|
7643
|
-
|
|
7819
|
+
AnimatedBox4,
|
|
7644
7820
|
{
|
|
7645
7821
|
flexDirection: "row",
|
|
7646
7822
|
alignItems: "center",
|
|
@@ -7667,8 +7843,8 @@ function WithdrawSourceCard({
|
|
|
7667
7843
|
children: [
|
|
7668
7844
|
icon,
|
|
7669
7845
|
/* @__PURE__ */ jsxs26(Box, { flex: 1, style: styles25.details, children: [
|
|
7670
|
-
/* @__PURE__ */
|
|
7671
|
-
subtitle ? /* @__PURE__ */
|
|
7846
|
+
/* @__PURE__ */ jsx49(Text, { variant: "bodyMedium", numberOfLines: 1, children: title }),
|
|
7847
|
+
subtitle ? /* @__PURE__ */ jsx49(
|
|
7672
7848
|
Text,
|
|
7673
7849
|
{
|
|
7674
7850
|
variant: "detail",
|
|
@@ -7681,13 +7857,13 @@ function WithdrawSourceCard({
|
|
|
7681
7857
|
]
|
|
7682
7858
|
}
|
|
7683
7859
|
),
|
|
7684
|
-
onUseMax ? /* @__PURE__ */
|
|
7860
|
+
onUseMax ? /* @__PURE__ */ jsx49(
|
|
7685
7861
|
Pressable14,
|
|
7686
7862
|
{
|
|
7687
7863
|
onPress: onUseMax,
|
|
7688
7864
|
accessibilityRole: "button",
|
|
7689
7865
|
accessibilityLabel: useMaxLabel,
|
|
7690
|
-
children: /* @__PURE__ */
|
|
7866
|
+
children: /* @__PURE__ */ jsx49(
|
|
7691
7867
|
Box,
|
|
7692
7868
|
{
|
|
7693
7869
|
borderRadius: "button",
|
|
@@ -7700,7 +7876,7 @@ function WithdrawSourceCard({
|
|
|
7700
7876
|
backgroundColor: theme.border.elements.default.color
|
|
7701
7877
|
}
|
|
7702
7878
|
],
|
|
7703
|
-
children: /* @__PURE__ */
|
|
7879
|
+
children: /* @__PURE__ */ jsx49(
|
|
7704
7880
|
Text,
|
|
7705
7881
|
{
|
|
7706
7882
|
variant: "bodyMedium",
|
|
@@ -7713,7 +7889,7 @@ function WithdrawSourceCard({
|
|
|
7713
7889
|
)
|
|
7714
7890
|
}
|
|
7715
7891
|
) : null,
|
|
7716
|
-
onPress ? /* @__PURE__ */
|
|
7892
|
+
onPress ? /* @__PURE__ */ jsx49(
|
|
7717
7893
|
FigmaChevronRightIcon,
|
|
7718
7894
|
{
|
|
7719
7895
|
size: 16,
|
|
@@ -7723,8 +7899,10 @@ function WithdrawSourceCard({
|
|
|
7723
7899
|
]
|
|
7724
7900
|
}
|
|
7725
7901
|
);
|
|
7726
|
-
if (!onPress)
|
|
7727
|
-
|
|
7902
|
+
if (!onPress) {
|
|
7903
|
+
return card2;
|
|
7904
|
+
}
|
|
7905
|
+
return /* @__PURE__ */ jsx49(
|
|
7728
7906
|
Pressable14,
|
|
7729
7907
|
{
|
|
7730
7908
|
onPress,
|
|
@@ -7748,31 +7926,37 @@ var styles25 = StyleSheet27.create({
|
|
|
7748
7926
|
// src/utils/numpadInput.ts
|
|
7749
7927
|
var DECIMAL_POINT = ".";
|
|
7750
7928
|
function applyNumpadKey(value, key, maxDecimals) {
|
|
7751
|
-
if (key === "backspace")
|
|
7929
|
+
if (key === "backspace") {
|
|
7930
|
+
return value.slice(0, -1);
|
|
7931
|
+
}
|
|
7752
7932
|
if (key === DECIMAL_POINT) {
|
|
7753
|
-
if (value.includes(DECIMAL_POINT) || maxDecimals === 0)
|
|
7933
|
+
if (value.includes(DECIMAL_POINT) || maxDecimals === 0) {
|
|
7934
|
+
return value;
|
|
7935
|
+
}
|
|
7754
7936
|
return value === "" ? `0${DECIMAL_POINT}` : `${value}${DECIMAL_POINT}`;
|
|
7755
7937
|
}
|
|
7756
7938
|
const fraction = value.split(DECIMAL_POINT)[1];
|
|
7757
7939
|
if (fraction !== void 0 && maxDecimals !== void 0 && fraction.length >= maxDecimals) {
|
|
7758
7940
|
return value;
|
|
7759
7941
|
}
|
|
7760
|
-
if (value === "0")
|
|
7942
|
+
if (value === "0") {
|
|
7943
|
+
return key === "0" ? value : key;
|
|
7944
|
+
}
|
|
7761
7945
|
return `${value}${key}`;
|
|
7762
7946
|
}
|
|
7763
7947
|
|
|
7764
7948
|
// src/screens/WithdrawAmountScreen.tsx
|
|
7765
|
-
import { jsx as
|
|
7949
|
+
import { jsx as jsx50, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7766
7950
|
var NUMPAD_BOTTOM_MARGIN = 25;
|
|
7767
7951
|
var NUMPAD_MIN_BOTTOM_MARGIN = 40;
|
|
7768
|
-
var
|
|
7769
|
-
var CARD_TRANSITION =
|
|
7952
|
+
var AnimatedBox5 = Animated9.createAnimatedComponent(Box);
|
|
7953
|
+
var CARD_TRANSITION = LinearTransition5.duration(MOTION_DURATION).easing(MOTION_EASING);
|
|
7770
7954
|
var BUTTON_TRAVEL = 24;
|
|
7771
|
-
var BUTTON_ENTERING = new
|
|
7955
|
+
var BUTTON_ENTERING = new Keyframe5({
|
|
7772
7956
|
0: { opacity: 0, transform: [{ translateY: BUTTON_TRAVEL }] },
|
|
7773
7957
|
100: { opacity: 1, transform: [{ translateY: 0 }], easing: MOTION_EASING }
|
|
7774
7958
|
}).duration(MOTION_DURATION);
|
|
7775
|
-
var BUTTON_EXITING = new
|
|
7959
|
+
var BUTTON_EXITING = new Keyframe5({
|
|
7776
7960
|
0: { opacity: 1, transform: [{ translateY: 0 }] },
|
|
7777
7961
|
100: {
|
|
7778
7962
|
opacity: 0,
|
|
@@ -7808,7 +7992,7 @@ function WithdrawAmountScreen({
|
|
|
7808
7992
|
const convertedLabel = inUsd ? tokenLabel : usdLabel ?? tokenLabel;
|
|
7809
7993
|
const canSwap = !!onSwapDenomination && !errorText2;
|
|
7810
7994
|
const convertedLine = /* @__PURE__ */ jsxs27(Box, { flexDirection: "row", alignItems: "center", style: styles26.convertedRow, children: [
|
|
7811
|
-
/* @__PURE__ */
|
|
7995
|
+
/* @__PURE__ */ jsx50(
|
|
7812
7996
|
Text,
|
|
7813
7997
|
{
|
|
7814
7998
|
variant: "bodyMedium",
|
|
@@ -7820,7 +8004,7 @@ function WithdrawAmountScreen({
|
|
|
7820
8004
|
children: errorText2 ?? convertedLabel
|
|
7821
8005
|
}
|
|
7822
8006
|
),
|
|
7823
|
-
canSwap ? /* @__PURE__ */
|
|
8007
|
+
canSwap ? /* @__PURE__ */ jsx50(FigmaSwapIcon, { size: 16, color: theme.content.elements.secondary }) : null
|
|
7824
8008
|
] });
|
|
7825
8009
|
return /* @__PURE__ */ jsxs27(
|
|
7826
8010
|
Box,
|
|
@@ -7831,9 +8015,9 @@ function WithdrawAmountScreen({
|
|
|
7831
8015
|
backgroundColor: theme.background.modal
|
|
7832
8016
|
},
|
|
7833
8017
|
children: [
|
|
7834
|
-
/* @__PURE__ */
|
|
8018
|
+
/* @__PURE__ */ jsx50(TopBar, { title, onBack, onClose }),
|
|
7835
8019
|
/* @__PURE__ */ jsxs27(Box, { style: styles26.amount, children: [
|
|
7836
|
-
/* @__PURE__ */
|
|
8020
|
+
/* @__PURE__ */ jsx50(
|
|
7837
8021
|
AmountDisplay,
|
|
7838
8022
|
{
|
|
7839
8023
|
value: groupThousands(input),
|
|
@@ -7842,7 +8026,7 @@ function WithdrawAmountScreen({
|
|
|
7842
8026
|
accessibilityLabel: t("withdrawAmount.amountLabel")
|
|
7843
8027
|
}
|
|
7844
8028
|
),
|
|
7845
|
-
/* @__PURE__ */
|
|
8029
|
+
/* @__PURE__ */ jsx50(Box, { style: styles26.converted, children: canSwap ? /* @__PURE__ */ jsx50(
|
|
7846
8030
|
Pressable15,
|
|
7847
8031
|
{
|
|
7848
8032
|
onPress: onSwapDenomination,
|
|
@@ -7853,12 +8037,12 @@ function WithdrawAmountScreen({
|
|
|
7853
8037
|
}
|
|
7854
8038
|
) : convertedLine })
|
|
7855
8039
|
] }),
|
|
7856
|
-
/* @__PURE__ */
|
|
7857
|
-
/* @__PURE__ */ jsxs27(
|
|
7858
|
-
/* @__PURE__ */
|
|
8040
|
+
/* @__PURE__ */ jsx50(Box, { flex: 1 }),
|
|
8041
|
+
/* @__PURE__ */ jsxs27(AnimatedBox5, { layout: CARD_TRANSITION, style: styles26.card, children: [
|
|
8042
|
+
/* @__PURE__ */ jsx50(
|
|
7859
8043
|
WithdrawSourceCard,
|
|
7860
8044
|
{
|
|
7861
|
-
icon: /* @__PURE__ */
|
|
8045
|
+
icon: /* @__PURE__ */ jsx50(
|
|
7862
8046
|
TokenChainIcon,
|
|
7863
8047
|
{
|
|
7864
8048
|
symbol: source.symbol,
|
|
@@ -7876,12 +8060,12 @@ function WithdrawAmountScreen({
|
|
|
7876
8060
|
attachedToButton: !showUseMax
|
|
7877
8061
|
}
|
|
7878
8062
|
),
|
|
7879
|
-
/* @__PURE__ */
|
|
7880
|
-
|
|
8063
|
+
/* @__PURE__ */ jsx50(
|
|
8064
|
+
AnimatedBox5,
|
|
7881
8065
|
{
|
|
7882
8066
|
layout: CARD_TRANSITION,
|
|
7883
8067
|
style: [styles26.buttonClip, showUseMax ? null : styles26.buttonSlot],
|
|
7884
|
-
children: showUseMax ? null : /* @__PURE__ */
|
|
8068
|
+
children: showUseMax ? null : /* @__PURE__ */ jsx50(AnimatedBox5, { entering: BUTTON_ENTERING, exiting: BUTTON_EXITING, children: /* @__PURE__ */ jsx50(
|
|
7885
8069
|
PillButton2,
|
|
7886
8070
|
{
|
|
7887
8071
|
label: t("common.continue"),
|
|
@@ -7893,7 +8077,7 @@ function WithdrawAmountScreen({
|
|
|
7893
8077
|
}
|
|
7894
8078
|
)
|
|
7895
8079
|
] }),
|
|
7896
|
-
/* @__PURE__ */
|
|
8080
|
+
/* @__PURE__ */ jsx50(
|
|
7897
8081
|
Box,
|
|
7898
8082
|
{
|
|
7899
8083
|
style: [
|
|
@@ -7905,7 +8089,7 @@ function WithdrawAmountScreen({
|
|
|
7905
8089
|
)
|
|
7906
8090
|
}
|
|
7907
8091
|
],
|
|
7908
|
-
children: /* @__PURE__ */
|
|
8092
|
+
children: /* @__PURE__ */ jsx50(
|
|
7909
8093
|
NumPad,
|
|
7910
8094
|
{
|
|
7911
8095
|
backspaceAccessibilityLabel: t("withdrawAmount.delete"),
|
|
@@ -7937,20 +8121,22 @@ var styles26 = StyleSheet28.create({
|
|
|
7937
8121
|
});
|
|
7938
8122
|
|
|
7939
8123
|
// src/screens/WithdrawCryptoSteps.tsx
|
|
7940
|
-
import { Fragment as
|
|
8124
|
+
import { Fragment as Fragment4, jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7941
8125
|
function WithdrawCryptoSteps({
|
|
7942
8126
|
config,
|
|
7943
8127
|
callbacks,
|
|
7944
8128
|
current,
|
|
7945
8129
|
nav,
|
|
7946
8130
|
quoteInputFeeTokens,
|
|
8131
|
+
quoteInputFeeSettled = true,
|
|
7947
8132
|
extraSourceGasUsd,
|
|
7948
8133
|
pasteFromClipboard: pasteFromClipboard2,
|
|
7949
8134
|
onSubmitted
|
|
7950
8135
|
}) {
|
|
7951
8136
|
const { t } = useFunkitTranslation();
|
|
7952
8137
|
const insets = useSafeAreaInsets14();
|
|
7953
|
-
const
|
|
8138
|
+
const formOptions = { config, quoteInputFeeTokens, quoteInputFeeSettled };
|
|
8139
|
+
const form = useCryptoWithdrawalForm(formOptions);
|
|
7954
8140
|
const {
|
|
7955
8141
|
nestedSheetRef,
|
|
7956
8142
|
nestedScreen,
|
|
@@ -7980,7 +8166,7 @@ function WithdrawCryptoSteps({
|
|
|
7980
8166
|
const [isPickingSource, setIsPickingSource] = useState19(false);
|
|
7981
8167
|
const [isPasting, setIsPasting] = useState19(false);
|
|
7982
8168
|
if (isPickingSource) {
|
|
7983
|
-
return /* @__PURE__ */
|
|
8169
|
+
return /* @__PURE__ */ jsx51(
|
|
7984
8170
|
SelectSourceTokenScreen,
|
|
7985
8171
|
{
|
|
7986
8172
|
options: form.sourceOptions,
|
|
@@ -7996,7 +8182,7 @@ function WithdrawCryptoSteps({
|
|
|
7996
8182
|
);
|
|
7997
8183
|
}
|
|
7998
8184
|
if (current === "withdrawReceiveToken") {
|
|
7999
|
-
return /* @__PURE__ */
|
|
8185
|
+
return /* @__PURE__ */ jsx51(
|
|
8000
8186
|
SelectReceiveTokenAndChainScreen,
|
|
8001
8187
|
{
|
|
8002
8188
|
chains: form.destinationChains,
|
|
@@ -8014,7 +8200,7 @@ function WithdrawCryptoSteps({
|
|
|
8014
8200
|
);
|
|
8015
8201
|
}
|
|
8016
8202
|
if (current === "withdrawAmount") {
|
|
8017
|
-
return /* @__PURE__ */
|
|
8203
|
+
return /* @__PURE__ */ jsx51(
|
|
8018
8204
|
WithdrawAmountScreen,
|
|
8019
8205
|
{
|
|
8020
8206
|
title: t("withdrawCrypto.title"),
|
|
@@ -8050,8 +8236,8 @@ function WithdrawCryptoSteps({
|
|
|
8050
8236
|
}
|
|
8051
8237
|
);
|
|
8052
8238
|
}
|
|
8053
|
-
return /* @__PURE__ */ jsxs28(
|
|
8054
|
-
/* @__PURE__ */
|
|
8239
|
+
return /* @__PURE__ */ jsxs28(Fragment4, { children: [
|
|
8240
|
+
/* @__PURE__ */ jsx51(
|
|
8055
8241
|
WithdrawAddressScreen,
|
|
8056
8242
|
{
|
|
8057
8243
|
title: t("withdrawAddress.title", {
|
|
@@ -8090,7 +8276,7 @@ function WithdrawCryptoSteps({
|
|
|
8090
8276
|
onClose: nav.closeFlow
|
|
8091
8277
|
}
|
|
8092
8278
|
),
|
|
8093
|
-
/* @__PURE__ */
|
|
8279
|
+
/* @__PURE__ */ jsx51(
|
|
8094
8280
|
BottomSheetModal4,
|
|
8095
8281
|
{
|
|
8096
8282
|
ref: nestedSheetRef,
|
|
@@ -8100,7 +8286,7 @@ function WithdrawCryptoSteps({
|
|
|
8100
8286
|
backgroundComponent: FlowSheetBackground,
|
|
8101
8287
|
backdropComponent: renderNestedBackdrop,
|
|
8102
8288
|
onDismiss: () => setNestedScreen(null),
|
|
8103
|
-
children: /* @__PURE__ */
|
|
8289
|
+
children: /* @__PURE__ */ jsx51(BottomSheetView4, { children: nestedScreen === "transactionBreakdown" ? /* @__PURE__ */ jsx51(
|
|
8104
8290
|
TransactionBreakdownScreen,
|
|
8105
8291
|
{
|
|
8106
8292
|
usdLabel: receiveUsdLabel ?? "",
|
|
@@ -8120,7 +8306,7 @@ function useConnectedRecipientAddress(config) {
|
|
|
8120
8306
|
}
|
|
8121
8307
|
|
|
8122
8308
|
// src/screens/WithdrawMethodScreen.tsx
|
|
8123
|
-
import { jsx as
|
|
8309
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
8124
8310
|
function getTerminalError(t, isBelowMinimum, isEmpty) {
|
|
8125
8311
|
if (isBelowMinimum) {
|
|
8126
8312
|
return {
|
|
@@ -8151,7 +8337,7 @@ function WithdrawMethodScreen(props) {
|
|
|
8151
8337
|
} = props;
|
|
8152
8338
|
const terminalError = getTerminalError(t, isBelowMinimum, isEmpty);
|
|
8153
8339
|
if (terminalError && !hasError && !loading2) {
|
|
8154
|
-
return /* @__PURE__ */
|
|
8340
|
+
return /* @__PURE__ */ jsx52(
|
|
8155
8341
|
SelectMethodScreen,
|
|
8156
8342
|
{
|
|
8157
8343
|
title,
|
|
@@ -8163,7 +8349,7 @@ function WithdrawMethodScreen(props) {
|
|
|
8163
8349
|
}
|
|
8164
8350
|
);
|
|
8165
8351
|
}
|
|
8166
|
-
return /* @__PURE__ */
|
|
8352
|
+
return /* @__PURE__ */ jsx52(
|
|
8167
8353
|
SelectMethodScreen,
|
|
8168
8354
|
{
|
|
8169
8355
|
title,
|
|
@@ -8184,7 +8370,7 @@ import {
|
|
|
8184
8370
|
isValidOrderData
|
|
8185
8371
|
} from "@funkit/connect-core";
|
|
8186
8372
|
import { useCallback as useCallback14 } from "react";
|
|
8187
|
-
import { jsx as
|
|
8373
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
8188
8374
|
function SwappedWithdrawScreen({
|
|
8189
8375
|
url,
|
|
8190
8376
|
onClose,
|
|
@@ -8230,7 +8416,7 @@ function SwappedWithdrawScreen({
|
|
|
8230
8416
|
},
|
|
8231
8417
|
[onBack, onClose, onNewWithdrawal, onWithdrawalSuccess, onOrderData]
|
|
8232
8418
|
);
|
|
8233
|
-
return /* @__PURE__ */
|
|
8419
|
+
return /* @__PURE__ */ jsx53(SwappedScreenShell, { url, onMessage: handleMessage });
|
|
8234
8420
|
}
|
|
8235
8421
|
|
|
8236
8422
|
// src/transfer/hooks/useWithdrawalFops.ts
|
|
@@ -8446,7 +8632,9 @@ function useWithdrawalFops({
|
|
|
8446
8632
|
// Respect the enabled gate — refetch() would otherwise force a fetch even
|
|
8447
8633
|
// when disabled (e.g. no resolved country).
|
|
8448
8634
|
refetch: () => {
|
|
8449
|
-
if (isEnabled)
|
|
8635
|
+
if (isEnabled) {
|
|
8636
|
+
void query.refetch();
|
|
8637
|
+
}
|
|
8450
8638
|
},
|
|
8451
8639
|
isWithdrawalEnabled,
|
|
8452
8640
|
route
|
|
@@ -8547,7 +8735,7 @@ function useWithdrawalExecution({
|
|
|
8547
8735
|
}
|
|
8548
8736
|
|
|
8549
8737
|
// src/flow/WithdrawalFlowContent.tsx
|
|
8550
|
-
import { jsx as
|
|
8738
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
8551
8739
|
var CRYPTO_WITHDRAWAL_METHOD_ID = "crypto-withdrawal";
|
|
8552
8740
|
var HOST_METHOD_ID_PREFIX = "method:";
|
|
8553
8741
|
function WithdrawalFlowContent({
|
|
@@ -8582,7 +8770,7 @@ function WithdrawalFlowContent({
|
|
|
8582
8770
|
void queryClient.invalidateQueries({ queryKey: [WITHDRAW_FOPS_QUERY_KEY] });
|
|
8583
8771
|
}, [queryClient]);
|
|
8584
8772
|
if (hasExecutionError) {
|
|
8585
|
-
return /* @__PURE__ */
|
|
8773
|
+
return /* @__PURE__ */ jsx54(
|
|
8586
8774
|
WithdrawMethodScreen,
|
|
8587
8775
|
{
|
|
8588
8776
|
title: config.title ?? t("withdraw.title"),
|
|
@@ -8604,7 +8792,7 @@ function WithdrawalFlowContent({
|
|
|
8604
8792
|
id: String(i),
|
|
8605
8793
|
title: row2.name,
|
|
8606
8794
|
subtitle: row2.subtitle,
|
|
8607
|
-
icon: /* @__PURE__ */
|
|
8795
|
+
icon: /* @__PURE__ */ jsx54(PaymentMethodIcon, { fop: fops[i] })
|
|
8608
8796
|
})
|
|
8609
8797
|
);
|
|
8610
8798
|
const showCashList = isLoading || cashMethods.length > 0;
|
|
@@ -8612,13 +8800,13 @@ function WithdrawalFlowContent({
|
|
|
8612
8800
|
id: CRYPTO_WITHDRAWAL_METHOD_ID,
|
|
8613
8801
|
title: t("withdrawCrypto.methodTitle"),
|
|
8614
8802
|
subtitle: t("withdrawCrypto.methodSubtitle"),
|
|
8615
|
-
icon: /* @__PURE__ */
|
|
8803
|
+
icon: /* @__PURE__ */ jsx54(CryptoBitcoinIcon, {})
|
|
8616
8804
|
};
|
|
8617
8805
|
const cryptoMethods = methodOptions.length ? methodOptions.map((method) => ({
|
|
8618
8806
|
id: `${HOST_METHOD_ID_PREFIX}${method.id}`,
|
|
8619
8807
|
title: method.title,
|
|
8620
8808
|
subtitle: method.subtitle,
|
|
8621
|
-
icon: method.icon ?? /* @__PURE__ */
|
|
8809
|
+
icon: method.icon ?? /* @__PURE__ */ jsx54(CryptoBitcoinIcon, {})
|
|
8622
8810
|
})) : [genericCryptoRow];
|
|
8623
8811
|
const methods = [
|
|
8624
8812
|
...cryptoMethods,
|
|
@@ -8630,7 +8818,7 @@ function WithdrawalFlowContent({
|
|
|
8630
8818
|
})) : []
|
|
8631
8819
|
];
|
|
8632
8820
|
const cashNote = showCashList ? void 0 : isError ? t("withdraw.cashMethodsError") : t("withdraw.noCashMethods");
|
|
8633
|
-
return /* @__PURE__ */
|
|
8821
|
+
return /* @__PURE__ */ jsx54(
|
|
8634
8822
|
WithdrawMethodScreen,
|
|
8635
8823
|
{
|
|
8636
8824
|
title: config.title ?? t("withdraw.title"),
|
|
@@ -8648,7 +8836,9 @@ function WithdrawalFlowContent({
|
|
|
8648
8836
|
return;
|
|
8649
8837
|
}
|
|
8650
8838
|
const fop = fops[Number(id)];
|
|
8651
|
-
if (!fop?.embeddedFlowUrl)
|
|
8839
|
+
if (!fop?.embeddedFlowUrl) {
|
|
8840
|
+
return;
|
|
8841
|
+
}
|
|
8652
8842
|
logger.info("connect-rn:withdrawal:method_selected", {
|
|
8653
8843
|
fopType: fop.fopType,
|
|
8654
8844
|
fopName: fop.name
|
|
@@ -8662,7 +8852,7 @@ function WithdrawalFlowContent({
|
|
|
8662
8852
|
case "withdrawAmount":
|
|
8663
8853
|
case "withdrawAddress":
|
|
8664
8854
|
case "withdrawReceiveToken":
|
|
8665
|
-
return /* @__PURE__ */
|
|
8855
|
+
return /* @__PURE__ */ jsx54(
|
|
8666
8856
|
WithdrawCryptoSteps,
|
|
8667
8857
|
{
|
|
8668
8858
|
config: selectedMethodConfig ?? config,
|
|
@@ -8671,6 +8861,7 @@ function WithdrawalFlowContent({
|
|
|
8671
8861
|
nav,
|
|
8672
8862
|
pasteFromClipboard: pasteFromClipboard2,
|
|
8673
8863
|
quoteInputFeeTokens: (selectedMethodConfig ?? config).quoteInputFeeTokens ?? 0,
|
|
8864
|
+
quoteInputFeeSettled: (selectedMethodConfig ?? config).quoteInputFeeSettled ?? true,
|
|
8674
8865
|
extraSourceGasUsd: (selectedMethodConfig ?? config).extraSourceGasUsd ?? 0,
|
|
8675
8866
|
onSubmitted: (result) => {
|
|
8676
8867
|
setSubmittedWithdrawal(result);
|
|
@@ -8679,7 +8870,7 @@ function WithdrawalFlowContent({
|
|
|
8679
8870
|
}
|
|
8680
8871
|
);
|
|
8681
8872
|
case "withdrawComplete":
|
|
8682
|
-
return submittedWithdrawal ? /* @__PURE__ */
|
|
8873
|
+
return submittedWithdrawal ? /* @__PURE__ */ jsx54(
|
|
8683
8874
|
WithdrawCryptoComplete,
|
|
8684
8875
|
{
|
|
8685
8876
|
txHash: submittedWithdrawal.txHash,
|
|
@@ -8691,7 +8882,7 @@ function WithdrawalFlowContent({
|
|
|
8691
8882
|
}
|
|
8692
8883
|
) : null;
|
|
8693
8884
|
case "swapped":
|
|
8694
|
-
return selectedFop?.embeddedFlowUrl ? /* @__PURE__ */
|
|
8885
|
+
return selectedFop?.embeddedFlowUrl ? /* @__PURE__ */ jsx54(
|
|
8695
8886
|
SwappedWithdrawScreen,
|
|
8696
8887
|
{
|
|
8697
8888
|
url: selectedFop.embeddedFlowUrl,
|
|
@@ -8730,7 +8921,7 @@ function WithdrawalFlowContent({
|
|
|
8730
8921
|
}
|
|
8731
8922
|
|
|
8732
8923
|
// src/flow/FunkitFlowProvider.tsx
|
|
8733
|
-
import { jsx as
|
|
8924
|
+
import { jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
8734
8925
|
var CRYPTO_WITHDRAWAL_STEPS = /* @__PURE__ */ new Set([
|
|
8735
8926
|
"withdrawAmount",
|
|
8736
8927
|
"withdrawAddress",
|
|
@@ -8751,13 +8942,14 @@ function FunkitFlowProvider({
|
|
|
8751
8942
|
renderBackdropBlur
|
|
8752
8943
|
}) {
|
|
8753
8944
|
const [state, setState] = useState21(CLOSED);
|
|
8945
|
+
const { hideCryptoDeposit } = useFunkitIdentity();
|
|
8754
8946
|
const readClipboard = useMemo12(
|
|
8755
8947
|
() => guardClipboardReader(pasteFromClipboard2),
|
|
8756
8948
|
[pasteFromClipboard2]
|
|
8757
8949
|
);
|
|
8758
8950
|
const beginDeposit = useCallback17(
|
|
8759
8951
|
(config, hostCallbacks = {}) => {
|
|
8760
|
-
logger.info("beginDeposit", config);
|
|
8952
|
+
logger.info("beginDeposit", { ...config, hideCryptoDeposit });
|
|
8761
8953
|
const callbacks = guardHostCallbacks(hostCallbacks);
|
|
8762
8954
|
callbacks.onOpen?.();
|
|
8763
8955
|
setState((prev) => ({
|
|
@@ -8767,7 +8959,7 @@ function FunkitFlowProvider({
|
|
|
8767
8959
|
session: prev.session + 1
|
|
8768
8960
|
}));
|
|
8769
8961
|
},
|
|
8770
|
-
[]
|
|
8962
|
+
[hideCryptoDeposit]
|
|
8771
8963
|
);
|
|
8772
8964
|
const beginWithdrawal = useCallback17(
|
|
8773
8965
|
(config, hostCallbacks = {}) => {
|
|
@@ -8786,7 +8978,9 @@ function FunkitFlowProvider({
|
|
|
8786
8978
|
const { toast, showCopiedToast, clearToast } = useCopiedToast();
|
|
8787
8979
|
const closeFlow = useCallback17(() => {
|
|
8788
8980
|
setState((prev) => {
|
|
8789
|
-
if (!prev.isOpen)
|
|
8981
|
+
if (!prev.isOpen) {
|
|
8982
|
+
return prev;
|
|
8983
|
+
}
|
|
8790
8984
|
prev.flow?.callbacks.onClose?.();
|
|
8791
8985
|
return CLOSED;
|
|
8792
8986
|
});
|
|
@@ -8801,13 +8995,17 @@ function FunkitFlowProvider({
|
|
|
8801
8995
|
const popTo = useCallback17((screen) => {
|
|
8802
8996
|
setState((prev) => {
|
|
8803
8997
|
const index = prev.stack.lastIndexOf(screen);
|
|
8804
|
-
if (!prev.isOpen || index < 0)
|
|
8998
|
+
if (!prev.isOpen || index < 0) {
|
|
8999
|
+
return prev;
|
|
9000
|
+
}
|
|
8805
9001
|
return { ...prev, stack: prev.stack.slice(0, index + 1) };
|
|
8806
9002
|
});
|
|
8807
9003
|
}, []);
|
|
8808
9004
|
const back = useCallback17(() => {
|
|
8809
9005
|
setState((prev) => {
|
|
8810
|
-
if (!prev.isOpen)
|
|
9006
|
+
if (!prev.isOpen) {
|
|
9007
|
+
return prev;
|
|
9008
|
+
}
|
|
8811
9009
|
if (prev.stack.length <= 1) {
|
|
8812
9010
|
prev.flow?.callbacks.onClose?.();
|
|
8813
9011
|
return CLOSED;
|
|
@@ -8826,8 +9024,8 @@ function FunkitFlowProvider({
|
|
|
8826
9024
|
() => ({ navigate, back, reset, popTo, closeFlow }),
|
|
8827
9025
|
[navigate, back, reset, popTo, closeFlow]
|
|
8828
9026
|
);
|
|
8829
|
-
return /* @__PURE__ */
|
|
8830
|
-
/* @__PURE__ */
|
|
9027
|
+
return /* @__PURE__ */ jsx55(FunkitFlowContext.Provider, { value, children: /* @__PURE__ */ jsxs29(View9, { style: rootContainer, children: [
|
|
9028
|
+
/* @__PURE__ */ jsx55(
|
|
8831
9029
|
FlowSheet,
|
|
8832
9030
|
{
|
|
8833
9031
|
isOpen: state.isOpen,
|
|
@@ -8839,7 +9037,7 @@ function FunkitFlowProvider({
|
|
|
8839
9037
|
renderBackdropBlur,
|
|
8840
9038
|
content: (
|
|
8841
9039
|
// Mounted only while open so the flow queries run only then.
|
|
8842
|
-
state.isOpen && state.flow ? state.flow.mode === "deposit" ? /* @__PURE__ */
|
|
9040
|
+
state.isOpen && state.flow ? state.flow.mode === "deposit" ? /* @__PURE__ */ jsx55(
|
|
8843
9041
|
FlowContent,
|
|
8844
9042
|
{
|
|
8845
9043
|
config: state.flow.config,
|
|
@@ -8849,7 +9047,7 @@ function FunkitFlowProvider({
|
|
|
8849
9047
|
onCopySuccess: showCopiedToast,
|
|
8850
9048
|
callbacks: state.flow.callbacks
|
|
8851
9049
|
}
|
|
8852
|
-
) : /* @__PURE__ */
|
|
9050
|
+
) : /* @__PURE__ */ jsx55(
|
|
8853
9051
|
WithdrawalFlowContent,
|
|
8854
9052
|
{
|
|
8855
9053
|
config: state.flow.config,
|
|
@@ -8876,7 +9074,7 @@ function useFunkitFlow() {
|
|
|
8876
9074
|
}
|
|
8877
9075
|
|
|
8878
9076
|
// src/version.ts
|
|
8879
|
-
var CONNECT_RN_VERSION = true ? "3.
|
|
9077
|
+
var CONNECT_RN_VERSION = true ? "3.8.0" : "0.0.0-dev";
|
|
8880
9078
|
|
|
8881
9079
|
// src/providers/FunkitStatsigProvider.tsx
|
|
8882
9080
|
import {
|
|
@@ -8884,7 +9082,7 @@ import {
|
|
|
8884
9082
|
LogLevel,
|
|
8885
9083
|
StatsigProvider
|
|
8886
9084
|
} from "@statsig/react-bindings";
|
|
8887
|
-
import { useMemo as useMemo13 } from "react";
|
|
9085
|
+
import { useEffect as useEffect19, useMemo as useMemo13 } from "react";
|
|
8888
9086
|
|
|
8889
9087
|
// src/statsig/useClientAsyncInitRN.ts
|
|
8890
9088
|
import {
|
|
@@ -9069,7 +9267,7 @@ function useClientAsyncInitRN(sdkKey, initialUser, statsigOptions = null) {
|
|
|
9069
9267
|
}
|
|
9070
9268
|
|
|
9071
9269
|
// src/providers/FunkitStatsigProvider.tsx
|
|
9072
|
-
import { jsx as
|
|
9270
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
9073
9271
|
var STATSIG_API = "https://data-api.fun.xyz/v1";
|
|
9074
9272
|
var STATSIG_CLIENT_KEY = "client-UmFd8WIJljA7cLmZuDqs3X25M8sKd5WIQP4BSC2bRbM";
|
|
9075
9273
|
var STATSIG_SDK_TYPE = "react-native";
|
|
@@ -9090,7 +9288,7 @@ function FunkitStatsigProvider({
|
|
|
9090
9288
|
() => buildFunkitStatsigUser(userId, apiKey),
|
|
9091
9289
|
[userId, apiKey]
|
|
9092
9290
|
);
|
|
9093
|
-
const { client } = useClientAsyncInitRN(STATSIG_CLIENT_KEY, user, {
|
|
9291
|
+
const { client, isLoading } = useClientAsyncInitRN(STATSIG_CLIENT_KEY, user, {
|
|
9094
9292
|
networkConfig: {
|
|
9095
9293
|
api: STATSIG_API,
|
|
9096
9294
|
// default timeout (10s) is too large; statsig usually responds <200ms
|
|
@@ -9105,11 +9303,23 @@ function FunkitStatsigProvider({
|
|
|
9105
9303
|
tier: isDevelopment ? "development" : "production"
|
|
9106
9304
|
}
|
|
9107
9305
|
});
|
|
9108
|
-
|
|
9306
|
+
useEffect19(() => {
|
|
9307
|
+
if (isLoading) {
|
|
9308
|
+
return;
|
|
9309
|
+
}
|
|
9310
|
+
const { user: currentUser } = client.getContext();
|
|
9311
|
+
const apiKeyChanged = currentUser.customIDs?.apiKey !== apiKey;
|
|
9312
|
+
const userIdChanged = currentUser.userID !== userId;
|
|
9313
|
+
if (apiKeyChanged || userIdChanged) {
|
|
9314
|
+
logger.info("statsig:updateUser", { apiKey, userId });
|
|
9315
|
+
client.updateUserAsync(user).catch((error) => logger.error("statsig:updateUser:error", error));
|
|
9316
|
+
}
|
|
9317
|
+
}, [client, isLoading, user, apiKey, userId]);
|
|
9318
|
+
return /* @__PURE__ */ jsx56(StatsigProvider, { client, children });
|
|
9109
9319
|
}
|
|
9110
9320
|
|
|
9111
9321
|
// src/providers/FunkitProvider.tsx
|
|
9112
|
-
import { jsx as
|
|
9322
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
9113
9323
|
var ANONYMOUS_CONFIG = { apiKey: "" };
|
|
9114
9324
|
var IS_DEV_BUILD = typeof __DEV__ !== "undefined" && !!__DEV__;
|
|
9115
9325
|
function createFallbackQueryClient() {
|
|
@@ -9142,13 +9352,13 @@ function FunkitProvider({
|
|
|
9142
9352
|
() => resolveFunkitIdentity(config ?? ANONYMOUS_CONFIG, walletAddress),
|
|
9143
9353
|
[config, walletAddress]
|
|
9144
9354
|
);
|
|
9145
|
-
|
|
9355
|
+
useEffect20(() => {
|
|
9146
9356
|
if (!config?.apiKey) {
|
|
9147
9357
|
return;
|
|
9148
9358
|
}
|
|
9149
9359
|
logger.configure(config.apiKey, debug, CONNECT_RN_VERSION);
|
|
9150
9360
|
}, [config?.apiKey, debug]);
|
|
9151
|
-
|
|
9361
|
+
useEffect20(() => {
|
|
9152
9362
|
logger.setUserInfo(
|
|
9153
9363
|
identity.userId,
|
|
9154
9364
|
identity.walletAddress,
|
|
@@ -9157,13 +9367,13 @@ function FunkitProvider({
|
|
|
9157
9367
|
""
|
|
9158
9368
|
);
|
|
9159
9369
|
}, [identity]);
|
|
9160
|
-
return /* @__PURE__ */
|
|
9370
|
+
return /* @__PURE__ */ jsx57(SafeAreaProvider, { children: /* @__PURE__ */ jsx57(
|
|
9161
9371
|
FunkitStatsigProvider,
|
|
9162
9372
|
{
|
|
9163
9373
|
apiKey: identity.apiKey,
|
|
9164
9374
|
userId: identity.userId,
|
|
9165
9375
|
isDevelopment: debug,
|
|
9166
|
-
children: /* @__PURE__ */
|
|
9376
|
+
children: /* @__PURE__ */ jsx57(QueryClientProvider, { client, children: /* @__PURE__ */ jsx57(FunkitIdentityProvider, { identity, children: /* @__PURE__ */ jsx57(FunkitThemeProvider, { themes, colorScheme, children: /* @__PURE__ */ jsx57(FunkitI18nProvider, { locale, children: /* @__PURE__ */ jsx57(FunkitHapticsProvider, { hapticFeedback, children: /* @__PURE__ */ jsx57(
|
|
9167
9377
|
FunkitFlowProvider,
|
|
9168
9378
|
{
|
|
9169
9379
|
copyToClipboard: copyToClipboard2,
|