@funkit/connect-rn 3.0.0 → 3.1.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 +20 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +577 -358
- package/dist/index.js.map +4 -4
- package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
- package/dist/src/history/useCheckoutsListenerByUserId.d.ts +19 -0
- package/dist/src/history/useCheckoutsListenerByUserId.d.ts.map +1 -0
- package/dist/src/history/useRecentDeposits.d.ts +36 -0
- package/dist/src/history/useRecentDeposits.d.ts.map +1 -0
- package/dist/src/icons/PaymentBrandIcons.d.ts +9 -0
- package/dist/src/icons/PaymentBrandIcons.d.ts.map +1 -1
- package/dist/src/icons/PaymentMethodIcon.d.ts +5 -0
- package/dist/src/icons/PaymentMethodIcon.d.ts.map +1 -0
- package/dist/src/icons/QrChainCluster.d.ts.map +1 -1
- package/dist/src/screens/AvailableChainsScreen.d.ts +3 -3
- package/dist/src/screens/AvailableChainsScreen.d.ts.map +1 -1
- package/dist/src/screens/TransferCryptoScreen.d.ts.map +1 -1
- package/dist/src/transfer/fops.d.ts +0 -2
- package/dist/src/transfer/fops.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -549,7 +549,7 @@ function useFunkitColorScheme() {
|
|
|
549
549
|
|
|
550
550
|
// src/providers/FunkitProvider.tsx
|
|
551
551
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
552
|
-
import { useEffect as useEffect12, useMemo as useMemo11, useRef as
|
|
552
|
+
import { useEffect as useEffect12, useMemo as useMemo11, useRef as useRef9 } from "react";
|
|
553
553
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
554
554
|
|
|
555
555
|
// src/flow/FunkitFlowProvider.tsx
|
|
@@ -704,11 +704,11 @@ import {
|
|
|
704
704
|
useContext as useContext3,
|
|
705
705
|
useEffect as useEffect11,
|
|
706
706
|
useMemo as useMemo9,
|
|
707
|
-
useRef as
|
|
708
|
-
useState as
|
|
707
|
+
useRef as useRef8,
|
|
708
|
+
useState as useState10
|
|
709
709
|
} from "react";
|
|
710
|
-
import { Share, StyleSheet as StyleSheet4, View as
|
|
711
|
-
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
710
|
+
import { Share, StyleSheet as StyleSheet4, View as View4 } from "react-native";
|
|
711
|
+
import { useSafeAreaInsets as useSafeAreaInsets3 } from "react-native-safe-area-context";
|
|
712
712
|
|
|
713
713
|
// src/geo/useCheckoutBlocked.ts
|
|
714
714
|
import { useEffect as useEffect2, useMemo as useMemo3 } from "react";
|
|
@@ -754,6 +754,9 @@ function useCheckoutBlocked(params) {
|
|
|
754
754
|
return { isGeoblocked, isLoadingGeoCheck };
|
|
755
755
|
}
|
|
756
756
|
|
|
757
|
+
// src/icons/PaymentMethodIcon.tsx
|
|
758
|
+
import { getSwappedIcon, isSavedFormOfPaymentType } from "@funkit/connect-core";
|
|
759
|
+
|
|
757
760
|
// src/icons/assetLogos.ts
|
|
758
761
|
var ASSET_LOGO_SRCS = {
|
|
759
762
|
$MFER: "https://sdk-cdn.fun.xyz/images/mfer.png",
|
|
@@ -852,28 +855,11 @@ var ASSET_LOGO_SRCS = {
|
|
|
852
855
|
};
|
|
853
856
|
var FALLBACK_ASSET_LOGO = "https://sdk-cdn.fun.xyz/images/dollar_circle.png";
|
|
854
857
|
|
|
855
|
-
// src/icons/CryptoBitcoinIcon.tsx
|
|
856
|
-
import { SvgXml as SvgXml2 } from "react-native-svg";
|
|
857
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
858
|
-
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>`;
|
|
859
|
-
function CryptoBitcoinIcon({ size = 28 }) {
|
|
860
|
-
const theme = useTheme();
|
|
861
|
-
return /* @__PURE__ */ jsx4(
|
|
862
|
-
SvgXml2,
|
|
863
|
-
{
|
|
864
|
-
xml: CIRCLE_BITCOIN_SVG,
|
|
865
|
-
width: size,
|
|
866
|
-
height: size,
|
|
867
|
-
color: theme.content.elements.primary
|
|
868
|
-
}
|
|
869
|
-
);
|
|
870
|
-
}
|
|
871
|
-
|
|
872
858
|
// src/icons/FunIcon.tsx
|
|
873
859
|
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
874
860
|
import { Image } from "react-native";
|
|
875
|
-
import { SvgXml as
|
|
876
|
-
import { jsx as
|
|
861
|
+
import { SvgXml as SvgXml2 } from "react-native-svg";
|
|
862
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
877
863
|
var svgCache = /* @__PURE__ */ new Map();
|
|
878
864
|
function ensureViewBox(svg) {
|
|
879
865
|
if (/\bviewBox\s*=/.test(svg)) {
|
|
@@ -941,7 +927,7 @@ function FunIcon({ uri, size = 32, fallbackUri }) {
|
|
|
941
927
|
}, [currentUri, isSvg]);
|
|
942
928
|
const ready = isSvg ? xml != null : rasterLoaded;
|
|
943
929
|
const clip = { overflow: "hidden" };
|
|
944
|
-
return /* @__PURE__ */
|
|
930
|
+
return /* @__PURE__ */ jsx4(
|
|
945
931
|
Box,
|
|
946
932
|
{
|
|
947
933
|
width: size,
|
|
@@ -951,7 +937,7 @@ function FunIcon({ uri, size = 32, fallbackUri }) {
|
|
|
951
937
|
clip,
|
|
952
938
|
{ backgroundColor: ready ? void 0 : theme.background.secondary }
|
|
953
939
|
],
|
|
954
|
-
children: isSvg ? xml != null ? /* @__PURE__ */
|
|
940
|
+
children: isSvg ? xml != null ? /* @__PURE__ */ jsx4(SvgXml2, { xml, width: size, height: size }) : null : /* @__PURE__ */ jsx4(
|
|
955
941
|
Image,
|
|
956
942
|
{
|
|
957
943
|
source: { uri: currentUri },
|
|
@@ -964,19 +950,91 @@ function FunIcon({ uri, size = 32, fallbackUri }) {
|
|
|
964
950
|
);
|
|
965
951
|
}
|
|
966
952
|
|
|
953
|
+
// src/icons/PaymentBrandIcons.tsx
|
|
954
|
+
import { SvgXml as SvgXml3 } from "react-native-svg";
|
|
955
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
956
|
+
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>';
|
|
957
|
+
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>';
|
|
958
|
+
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>';
|
|
959
|
+
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>';
|
|
960
|
+
function MastercardIcon({ size = 24 }) {
|
|
961
|
+
return /* @__PURE__ */ jsx5(SvgXml3, { xml: MASTERCARD_SVG, width: size, height: size * (18 / 24) });
|
|
962
|
+
}
|
|
963
|
+
function VisaIcon({ size = 24 }) {
|
|
964
|
+
return /* @__PURE__ */ jsx5(SvgXml3, { xml: VISA_SVG, width: size, height: size * (19 / 24) });
|
|
965
|
+
}
|
|
966
|
+
function JcbIcon({ size = 24 }) {
|
|
967
|
+
return /* @__PURE__ */ jsx5(SvgXml3, { xml: JCB_SVG, width: size, height: size * (19 / 24) });
|
|
968
|
+
}
|
|
969
|
+
function UnionPayIcon({ size = 24 }) {
|
|
970
|
+
return /* @__PURE__ */ jsx5(SvgXml3, { xml: UNIONPAY_SVG, width: size, height: size * (160 / 256) });
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
// src/icons/PaymentMethodIcon.tsx
|
|
974
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
975
|
+
var CARD_ICON = "https://sdk-cdn.fun.xyz/images/swapped/card-payment.svg";
|
|
976
|
+
var BRAND_ICONS = {
|
|
977
|
+
mastercard: MastercardIcon,
|
|
978
|
+
visa: VisaIcon,
|
|
979
|
+
jcb: JcbIcon,
|
|
980
|
+
unionpay: UnionPayIcon
|
|
981
|
+
};
|
|
982
|
+
var genericCardIcon = (isDarkMode) => isDarkMode ? CARD_ICON.replace(".svg", "-light.svg") : CARD_ICON;
|
|
983
|
+
function PaymentMethodIcon({ fop }) {
|
|
984
|
+
const isDarkMode = useFunkitColorScheme().colorScheme === "dark";
|
|
985
|
+
if (isSavedFormOfPaymentType(fop)) {
|
|
986
|
+
const BrandIcon = BRAND_ICONS[fop.cardBrand.replace(/ /g, "_").toLowerCase()];
|
|
987
|
+
if (BrandIcon) {
|
|
988
|
+
return /* @__PURE__ */ jsx6(BrandIcon, { size: 32 });
|
|
989
|
+
}
|
|
990
|
+
return /* @__PURE__ */ jsx6(
|
|
991
|
+
FunIcon,
|
|
992
|
+
{
|
|
993
|
+
uri: genericCardIcon(isDarkMode),
|
|
994
|
+
fallbackUri: FALLBACK_ASSET_LOGO
|
|
995
|
+
}
|
|
996
|
+
);
|
|
997
|
+
}
|
|
998
|
+
return /* @__PURE__ */ jsx6(
|
|
999
|
+
FunIcon,
|
|
1000
|
+
{
|
|
1001
|
+
uri: getSwappedIcon(fop, isDarkMode),
|
|
1002
|
+
fallbackUri: FALLBACK_ASSET_LOGO
|
|
1003
|
+
}
|
|
1004
|
+
);
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
// src/icons/CryptoBitcoinIcon.tsx
|
|
1008
|
+
import { SvgXml as SvgXml4 } from "react-native-svg";
|
|
1009
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1010
|
+
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>`;
|
|
1011
|
+
function CryptoBitcoinIcon({ size = 28 }) {
|
|
1012
|
+
const theme = useTheme();
|
|
1013
|
+
return /* @__PURE__ */ jsx7(
|
|
1014
|
+
SvgXml4,
|
|
1015
|
+
{
|
|
1016
|
+
xml: CIRCLE_BITCOIN_SVG,
|
|
1017
|
+
width: size,
|
|
1018
|
+
height: size,
|
|
1019
|
+
color: theme.content.elements.primary
|
|
1020
|
+
}
|
|
1021
|
+
);
|
|
1022
|
+
}
|
|
1023
|
+
|
|
967
1024
|
// src/icons/funIconUri.ts
|
|
968
1025
|
var CDN_BASE = "https://sdk-cdn.fun.xyz/images";
|
|
969
1026
|
var chainIconUri = (chainKey) => `${CDN_BASE}/${chainKey}.svg`;
|
|
970
1027
|
var tokenLogoUri = (symbol) => ASSET_LOGO_SRCS[symbol.toUpperCase()] ?? `${CDN_BASE}/${symbol.toLowerCase()}.svg`;
|
|
971
1028
|
|
|
972
1029
|
// src/icons/QrChainCluster.tsx
|
|
973
|
-
import { jsx as
|
|
1030
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
974
1031
|
function toIconUri(icon) {
|
|
975
1032
|
return icon.startsWith("http") ? icon : chainIconUri(icon);
|
|
976
1033
|
}
|
|
977
|
-
var CARD_SIZE =
|
|
978
|
-
var
|
|
979
|
-
var
|
|
1034
|
+
var CARD_SIZE = 46;
|
|
1035
|
+
var CARD_RADIUS = 12;
|
|
1036
|
+
var SINGLE_SIZE = 34;
|
|
1037
|
+
var GRID_SIZE = 16;
|
|
980
1038
|
var GRID_GAP = 3;
|
|
981
1039
|
function QrChainCluster({ iconKeys, max = 4 }) {
|
|
982
1040
|
const keys = iconKeys.slice(0, max);
|
|
@@ -985,7 +1043,7 @@ function QrChainCluster({ iconKeys, max = 4 }) {
|
|
|
985
1043
|
return null;
|
|
986
1044
|
}
|
|
987
1045
|
if (keys.length === 1) {
|
|
988
|
-
return /* @__PURE__ */
|
|
1046
|
+
return /* @__PURE__ */ jsx8(Box, { alignItems: "center", justifyContent: "center", style: card, children: /* @__PURE__ */ jsx8(Box, { style: ring(SINGLE_SIZE), children: /* @__PURE__ */ jsx8(
|
|
989
1047
|
FunIcon,
|
|
990
1048
|
{
|
|
991
1049
|
uri: toIconUri(first),
|
|
@@ -994,7 +1052,7 @@ function QrChainCluster({ iconKeys, max = 4 }) {
|
|
|
994
1052
|
}
|
|
995
1053
|
) }) });
|
|
996
1054
|
}
|
|
997
|
-
return /* @__PURE__ */
|
|
1055
|
+
return /* @__PURE__ */ jsx8(Box, { alignItems: "center", justifyContent: "center", style: card, children: /* @__PURE__ */ jsx8(Box, { flexDirection: "row", flexWrap: "wrap", style: grid, children: keys.map((key) => /* @__PURE__ */ jsx8(Box, { style: ring(GRID_SIZE), children: /* @__PURE__ */ jsx8(
|
|
998
1056
|
FunIcon,
|
|
999
1057
|
{
|
|
1000
1058
|
uri: toIconUri(key),
|
|
@@ -1010,7 +1068,7 @@ var grid = {
|
|
|
1010
1068
|
var card = {
|
|
1011
1069
|
width: CARD_SIZE,
|
|
1012
1070
|
height: CARD_SIZE,
|
|
1013
|
-
borderRadius:
|
|
1071
|
+
borderRadius: CARD_RADIUS,
|
|
1014
1072
|
backgroundColor: "#FFFFFF"
|
|
1015
1073
|
};
|
|
1016
1074
|
var ring = (iconSize) => ({
|
|
@@ -1022,7 +1080,7 @@ var ring = (iconSize) => ({
|
|
|
1022
1080
|
});
|
|
1023
1081
|
|
|
1024
1082
|
// src/icons/SourceTokenCluster.tsx
|
|
1025
|
-
import { jsx as
|
|
1083
|
+
import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1026
1084
|
function toIconUri2(icon) {
|
|
1027
1085
|
return icon.startsWith("http") ? icon : chainIconUri(icon);
|
|
1028
1086
|
}
|
|
@@ -1037,14 +1095,14 @@ function SourceTokenCluster({
|
|
|
1037
1095
|
const visible = icons.slice(0, maxVisible);
|
|
1038
1096
|
const overflow = icons.length - visible.length;
|
|
1039
1097
|
return /* @__PURE__ */ jsxs2(Box, { flexDirection: "row", alignItems: "center", style: { gap }, children: [
|
|
1040
|
-
visible.map((icon) => /* @__PURE__ */
|
|
1098
|
+
visible.map((icon) => /* @__PURE__ */ jsx9(
|
|
1041
1099
|
Box,
|
|
1042
1100
|
{
|
|
1043
1101
|
style: [
|
|
1044
1102
|
iconRing(size),
|
|
1045
1103
|
{ backgroundColor: theme.background.secondary }
|
|
1046
1104
|
],
|
|
1047
|
-
children: /* @__PURE__ */
|
|
1105
|
+
children: /* @__PURE__ */ jsx9(
|
|
1048
1106
|
FunIcon,
|
|
1049
1107
|
{
|
|
1050
1108
|
uri: toIconUri2(icon),
|
|
@@ -1059,7 +1117,7 @@ function SourceTokenCluster({
|
|
|
1059
1117
|
// Both chips are a fixed `size`×`size` circle (Figma). The "+" glyph sits
|
|
1060
1118
|
// on `bgSecondary` (Add money `crypto2`); the "+N" count on `pillPressed`
|
|
1061
1119
|
// (Transfer `tap-target`).
|
|
1062
|
-
/* @__PURE__ */
|
|
1120
|
+
/* @__PURE__ */ jsx9(
|
|
1063
1121
|
Box,
|
|
1064
1122
|
{
|
|
1065
1123
|
alignItems: "center",
|
|
@@ -1072,14 +1130,14 @@ function SourceTokenCluster({
|
|
|
1072
1130
|
],
|
|
1073
1131
|
children: overflowMode === "plus" ? (
|
|
1074
1132
|
// The geometric "+" glyph centers cleanly; the text "+" did not.
|
|
1075
|
-
/* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ jsx9(
|
|
1076
1134
|
FigmaPlusIcon,
|
|
1077
1135
|
{
|
|
1078
1136
|
size,
|
|
1079
1137
|
color: theme.content.elements.secondary
|
|
1080
1138
|
}
|
|
1081
1139
|
)
|
|
1082
|
-
) : /* @__PURE__ */
|
|
1140
|
+
) : /* @__PURE__ */ jsx9(
|
|
1083
1141
|
Text,
|
|
1084
1142
|
{
|
|
1085
1143
|
variant: "bodyMedium",
|
|
@@ -1118,7 +1176,7 @@ var overflowText = (size) => ({
|
|
|
1118
1176
|
});
|
|
1119
1177
|
|
|
1120
1178
|
// src/icons/TokenChainIcon.tsx
|
|
1121
|
-
import { jsx as
|
|
1179
|
+
import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1122
1180
|
function TokenChainIcon({
|
|
1123
1181
|
symbol,
|
|
1124
1182
|
iconSrc,
|
|
@@ -1128,7 +1186,7 @@ function TokenChainIcon({
|
|
|
1128
1186
|
const theme = useTheme();
|
|
1129
1187
|
const badge = Math.round(size * 0.5);
|
|
1130
1188
|
return /* @__PURE__ */ jsxs3(Box, { width: size, height: size, children: [
|
|
1131
|
-
/* @__PURE__ */
|
|
1189
|
+
/* @__PURE__ */ jsx10(
|
|
1132
1190
|
FunIcon,
|
|
1133
1191
|
{
|
|
1134
1192
|
uri: iconSrc ?? tokenLogoUri(symbol),
|
|
@@ -1136,7 +1194,7 @@ function TokenChainIcon({
|
|
|
1136
1194
|
fallbackUri: FALLBACK_ASSET_LOGO
|
|
1137
1195
|
}
|
|
1138
1196
|
),
|
|
1139
|
-
chainKey ? /* @__PURE__ */
|
|
1197
|
+
chainKey ? /* @__PURE__ */ jsx10(
|
|
1140
1198
|
Box,
|
|
1141
1199
|
{
|
|
1142
1200
|
borderRadius: "rounded",
|
|
@@ -1146,7 +1204,7 @@ function TokenChainIcon({
|
|
|
1146
1204
|
badgeRing(badge),
|
|
1147
1205
|
{ backgroundColor: theme.background.modal }
|
|
1148
1206
|
],
|
|
1149
|
-
children: /* @__PURE__ */
|
|
1207
|
+
children: /* @__PURE__ */ jsx10(
|
|
1150
1208
|
FunIcon,
|
|
1151
1209
|
{
|
|
1152
1210
|
uri: chainIconUri(chainKey),
|
|
@@ -1179,17 +1237,17 @@ import Reanimated, {
|
|
|
1179
1237
|
|
|
1180
1238
|
// src/icons/StatusIcon.tsx
|
|
1181
1239
|
import { StyleSheet as StyleSheet2 } from "react-native";
|
|
1182
|
-
import { jsx as
|
|
1240
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1183
1241
|
function StatusIcon() {
|
|
1184
1242
|
const theme = useTheme();
|
|
1185
|
-
return /* @__PURE__ */
|
|
1243
|
+
return /* @__PURE__ */ jsx11(
|
|
1186
1244
|
Box,
|
|
1187
1245
|
{
|
|
1188
1246
|
borderRadius: "rounded",
|
|
1189
1247
|
alignItems: "center",
|
|
1190
1248
|
justifyContent: "center",
|
|
1191
1249
|
style: [styles2.circle, { backgroundColor: theme.background.secondary }],
|
|
1192
|
-
children: /* @__PURE__ */
|
|
1250
|
+
children: /* @__PURE__ */ jsx11(
|
|
1193
1251
|
FigmaAlertCircleIcon,
|
|
1194
1252
|
{
|
|
1195
1253
|
size: 20,
|
|
@@ -1204,7 +1262,7 @@ var styles2 = StyleSheet2.create({
|
|
|
1204
1262
|
});
|
|
1205
1263
|
|
|
1206
1264
|
// src/screens/SelectMethodScreen.tsx
|
|
1207
|
-
import { Fragment, jsx as
|
|
1265
|
+
import { Fragment, jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1208
1266
|
var DROPDOWN_OPEN_DURATION = 250;
|
|
1209
1267
|
var DROPDOWN_CLOSE_DURATION = 150;
|
|
1210
1268
|
var DROPDOWN_EASING = Easing2.bezier(0.22, 1, 0.36, 1);
|
|
@@ -1281,7 +1339,7 @@ function SelectMethodScreen({
|
|
|
1281
1339
|
style: { backgroundColor: theme.background.modal },
|
|
1282
1340
|
children: [
|
|
1283
1341
|
/* @__PURE__ */ jsxs4(Box, { alignItems: "center", style: topBar, children: [
|
|
1284
|
-
/* @__PURE__ */
|
|
1342
|
+
/* @__PURE__ */ jsx12(
|
|
1285
1343
|
Box,
|
|
1286
1344
|
{
|
|
1287
1345
|
style: [
|
|
@@ -1290,7 +1348,7 @@ function SelectMethodScreen({
|
|
|
1290
1348
|
]
|
|
1291
1349
|
}
|
|
1292
1350
|
),
|
|
1293
|
-
/* @__PURE__ */
|
|
1351
|
+
/* @__PURE__ */ jsx12(
|
|
1294
1352
|
Text,
|
|
1295
1353
|
{
|
|
1296
1354
|
variant: "bodyMedium",
|
|
@@ -1299,7 +1357,7 @@ function SelectMethodScreen({
|
|
|
1299
1357
|
}
|
|
1300
1358
|
)
|
|
1301
1359
|
] }),
|
|
1302
|
-
error ? /* @__PURE__ */
|
|
1360
|
+
error ? /* @__PURE__ */ jsx12(
|
|
1303
1361
|
SelectMethodError,
|
|
1304
1362
|
{
|
|
1305
1363
|
title: errorTitle,
|
|
@@ -1307,7 +1365,7 @@ function SelectMethodScreen({
|
|
|
1307
1365
|
retryLabel,
|
|
1308
1366
|
onRetry
|
|
1309
1367
|
}
|
|
1310
|
-
) : loading ? /* @__PURE__ */
|
|
1368
|
+
) : loading ? /* @__PURE__ */ jsx12(
|
|
1311
1369
|
SelectMethodLoading,
|
|
1312
1370
|
{
|
|
1313
1371
|
count: skeletonCount,
|
|
@@ -1317,7 +1375,7 @@ function SelectMethodScreen({
|
|
|
1317
1375
|
}
|
|
1318
1376
|
) : /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
1319
1377
|
showDropdown ? /* @__PURE__ */ jsxs4(Box, { style: depositSection, children: [
|
|
1320
|
-
/* @__PURE__ */
|
|
1378
|
+
/* @__PURE__ */ jsx12(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx12(
|
|
1321
1379
|
Text,
|
|
1322
1380
|
{
|
|
1323
1381
|
variant: "detail",
|
|
@@ -1326,7 +1384,7 @@ function SelectMethodScreen({
|
|
|
1326
1384
|
children: depositToLabel
|
|
1327
1385
|
}
|
|
1328
1386
|
) }),
|
|
1329
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ jsx12(
|
|
1330
1388
|
ReceiveTokenDropdown,
|
|
1331
1389
|
{
|
|
1332
1390
|
tokens: receiveTokens,
|
|
@@ -1344,7 +1402,7 @@ function SelectMethodScreen({
|
|
|
1344
1402
|
// "Pay with" section: a labeled, bordered card wrapping the method
|
|
1345
1403
|
// rows with hairline dividers between them (Figma node 11202:8282).
|
|
1346
1404
|
/* @__PURE__ */ jsxs4(Box, { style: payWithSection, children: [
|
|
1347
|
-
/* @__PURE__ */
|
|
1405
|
+
/* @__PURE__ */ jsx12(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx12(
|
|
1348
1406
|
Text,
|
|
1349
1407
|
{
|
|
1350
1408
|
variant: "detail",
|
|
@@ -1353,7 +1411,7 @@ function SelectMethodScreen({
|
|
|
1353
1411
|
children: payWithLabel
|
|
1354
1412
|
}
|
|
1355
1413
|
) }),
|
|
1356
|
-
/* @__PURE__ */
|
|
1414
|
+
/* @__PURE__ */ jsx12(
|
|
1357
1415
|
Box,
|
|
1358
1416
|
{
|
|
1359
1417
|
borderWidth: 1,
|
|
@@ -1366,14 +1424,14 @@ function SelectMethodScreen({
|
|
|
1366
1424
|
}
|
|
1367
1425
|
],
|
|
1368
1426
|
children: methods.map((method, i) => /* @__PURE__ */ jsxs4(Box, { children: [
|
|
1369
|
-
i > 0 ? /* @__PURE__ */
|
|
1370
|
-
/* @__PURE__ */
|
|
1427
|
+
i > 0 ? /* @__PURE__ */ jsx12(MethodDivider, {}) : null,
|
|
1428
|
+
/* @__PURE__ */ jsx12(
|
|
1371
1429
|
Pressable,
|
|
1372
1430
|
{
|
|
1373
1431
|
onPress: () => onSelectMethod(method.id),
|
|
1374
1432
|
accessibilityRole: "button",
|
|
1375
1433
|
accessibilityLabel: method.title,
|
|
1376
|
-
children: /* @__PURE__ */
|
|
1434
|
+
children: /* @__PURE__ */ jsx12(PaymentMethodRow, { method })
|
|
1377
1435
|
}
|
|
1378
1436
|
)
|
|
1379
1437
|
] }, method.id))
|
|
@@ -1383,20 +1441,20 @@ function SelectMethodScreen({
|
|
|
1383
1441
|
) : (
|
|
1384
1442
|
// Methods-only: bare rows with full-width hairline dividers, no
|
|
1385
1443
|
// outer border (Figma node 11202:8632).
|
|
1386
|
-
/* @__PURE__ */
|
|
1444
|
+
/* @__PURE__ */ jsx12(
|
|
1387
1445
|
ScrollView,
|
|
1388
1446
|
{
|
|
1389
1447
|
contentContainerStyle: listContent,
|
|
1390
1448
|
showsVerticalScrollIndicator: false,
|
|
1391
1449
|
children: methods.map((method, i) => /* @__PURE__ */ jsxs4(Box, { children: [
|
|
1392
|
-
i > 0 ? /* @__PURE__ */
|
|
1393
|
-
/* @__PURE__ */
|
|
1450
|
+
i > 0 ? /* @__PURE__ */ jsx12(MethodDivider, {}) : null,
|
|
1451
|
+
/* @__PURE__ */ jsx12(
|
|
1394
1452
|
Pressable,
|
|
1395
1453
|
{
|
|
1396
1454
|
onPress: () => onSelectMethod(method.id),
|
|
1397
1455
|
accessibilityRole: "button",
|
|
1398
1456
|
accessibilityLabel: method.title,
|
|
1399
|
-
children: /* @__PURE__ */
|
|
1457
|
+
children: /* @__PURE__ */ jsx12(PaymentMethodRow, { method })
|
|
1400
1458
|
}
|
|
1401
1459
|
)
|
|
1402
1460
|
] }, method.id))
|
|
@@ -1404,7 +1462,7 @@ function SelectMethodScreen({
|
|
|
1404
1462
|
)
|
|
1405
1463
|
)
|
|
1406
1464
|
] }),
|
|
1407
|
-
scrimVisible ? /* @__PURE__ */
|
|
1465
|
+
scrimVisible ? /* @__PURE__ */ jsx12(
|
|
1408
1466
|
AnimatedPressable,
|
|
1409
1467
|
{
|
|
1410
1468
|
entering: scrimEnter,
|
|
@@ -1427,9 +1485,9 @@ function SelectMethodError({
|
|
|
1427
1485
|
}) {
|
|
1428
1486
|
const theme = useTheme();
|
|
1429
1487
|
return /* @__PURE__ */ jsxs4(Box, { alignItems: "center", justifyContent: "center", style: errorContainer, children: [
|
|
1430
|
-
/* @__PURE__ */
|
|
1488
|
+
/* @__PURE__ */ jsx12(StatusIcon, {}),
|
|
1431
1489
|
/* @__PURE__ */ jsxs4(Box, { alignItems: "center", style: errorText, children: [
|
|
1432
|
-
/* @__PURE__ */
|
|
1490
|
+
/* @__PURE__ */ jsx12(
|
|
1433
1491
|
Text,
|
|
1434
1492
|
{
|
|
1435
1493
|
variant: "bodyMedium",
|
|
@@ -1437,7 +1495,7 @@ function SelectMethodError({
|
|
|
1437
1495
|
children: title
|
|
1438
1496
|
}
|
|
1439
1497
|
),
|
|
1440
|
-
/* @__PURE__ */
|
|
1498
|
+
/* @__PURE__ */ jsx12(
|
|
1441
1499
|
Text,
|
|
1442
1500
|
{
|
|
1443
1501
|
variant: "detail",
|
|
@@ -1449,13 +1507,13 @@ function SelectMethodError({
|
|
|
1449
1507
|
}
|
|
1450
1508
|
)
|
|
1451
1509
|
] }),
|
|
1452
|
-
onRetry ? /* @__PURE__ */
|
|
1510
|
+
onRetry ? /* @__PURE__ */ jsx12(
|
|
1453
1511
|
Pressable,
|
|
1454
1512
|
{
|
|
1455
1513
|
onPress: onRetry,
|
|
1456
1514
|
accessibilityRole: "button",
|
|
1457
1515
|
accessibilityLabel: retryLabel,
|
|
1458
|
-
children: /* @__PURE__ */
|
|
1516
|
+
children: /* @__PURE__ */ jsx12(
|
|
1459
1517
|
Box,
|
|
1460
1518
|
{
|
|
1461
1519
|
borderRadius: "button",
|
|
@@ -1465,7 +1523,7 @@ function SelectMethodError({
|
|
|
1465
1523
|
retryButton,
|
|
1466
1524
|
{ backgroundColor: theme.background.button.primary.default }
|
|
1467
1525
|
],
|
|
1468
|
-
children: /* @__PURE__ */
|
|
1526
|
+
children: /* @__PURE__ */ jsx12(
|
|
1469
1527
|
Text,
|
|
1470
1528
|
{
|
|
1471
1529
|
variant: "bodyMedium",
|
|
@@ -1489,20 +1547,9 @@ function PaymentMethodRow({ method }) {
|
|
|
1489
1547
|
gap: "elementsHorizontal",
|
|
1490
1548
|
style: row,
|
|
1491
1549
|
children: [
|
|
1492
|
-
/* @__PURE__ */
|
|
1493
|
-
Box,
|
|
1494
|
-
{
|
|
1495
|
-
width: 48,
|
|
1496
|
-
height: 48,
|
|
1497
|
-
borderRadius: "rounded",
|
|
1498
|
-
alignItems: "center",
|
|
1499
|
-
justifyContent: "center",
|
|
1500
|
-
style: { backgroundColor: theme.background.secondary },
|
|
1501
|
-
children: method.icon
|
|
1502
|
-
}
|
|
1503
|
-
),
|
|
1550
|
+
/* @__PURE__ */ jsx12(Box, { width: 48, height: 48, alignItems: "center", justifyContent: "center", children: method.icon }),
|
|
1504
1551
|
/* @__PURE__ */ jsxs4(Box, { flex: 1, style: details, children: [
|
|
1505
|
-
/* @__PURE__ */
|
|
1552
|
+
/* @__PURE__ */ jsx12(
|
|
1506
1553
|
Text,
|
|
1507
1554
|
{
|
|
1508
1555
|
variant: "bodyMedium",
|
|
@@ -1510,7 +1557,7 @@ function PaymentMethodRow({ method }) {
|
|
|
1510
1557
|
children: method.title
|
|
1511
1558
|
}
|
|
1512
1559
|
),
|
|
1513
|
-
method.subtitle ? /* @__PURE__ */
|
|
1560
|
+
method.subtitle ? /* @__PURE__ */ jsx12(
|
|
1514
1561
|
Text,
|
|
1515
1562
|
{
|
|
1516
1563
|
variant: "detail",
|
|
@@ -1526,7 +1573,7 @@ function PaymentMethodRow({ method }) {
|
|
|
1526
1573
|
}
|
|
1527
1574
|
function MethodDivider() {
|
|
1528
1575
|
const theme = useTheme();
|
|
1529
|
-
return /* @__PURE__ */
|
|
1576
|
+
return /* @__PURE__ */ jsx12(
|
|
1530
1577
|
Box,
|
|
1531
1578
|
{
|
|
1532
1579
|
style: [
|
|
@@ -1546,7 +1593,7 @@ function ReceiveTokenDropdown({
|
|
|
1546
1593
|
const theme = useTheme();
|
|
1547
1594
|
const selectable = tokens.length > 1;
|
|
1548
1595
|
return /* @__PURE__ */ jsxs4(Box, { style: dropdownAnchor, children: [
|
|
1549
|
-
/* @__PURE__ */
|
|
1596
|
+
/* @__PURE__ */ jsx12(
|
|
1550
1597
|
Pressable,
|
|
1551
1598
|
{
|
|
1552
1599
|
onPress: selectable ? onToggle : void 0,
|
|
@@ -1569,8 +1616,8 @@ function ReceiveTokenDropdown({
|
|
|
1569
1616
|
],
|
|
1570
1617
|
children: [
|
|
1571
1618
|
/* @__PURE__ */ jsxs4(Box, { flexDirection: "row", alignItems: "center", style: triggerLeft, children: [
|
|
1572
|
-
selected.icon ?? /* @__PURE__ */
|
|
1573
|
-
/* @__PURE__ */
|
|
1619
|
+
selected.icon ?? /* @__PURE__ */ jsx12(ReceiveTokenIconFallback, {}),
|
|
1620
|
+
/* @__PURE__ */ jsx12(
|
|
1574
1621
|
Text,
|
|
1575
1622
|
{
|
|
1576
1623
|
variant: "bodyMedium",
|
|
@@ -1580,24 +1627,24 @@ function ReceiveTokenDropdown({
|
|
|
1580
1627
|
}
|
|
1581
1628
|
)
|
|
1582
1629
|
] }),
|
|
1583
|
-
selectable ? /* @__PURE__ */
|
|
1630
|
+
selectable ? /* @__PURE__ */ jsx12(AnimatedChevron, { open }) : null
|
|
1584
1631
|
]
|
|
1585
1632
|
}
|
|
1586
1633
|
)
|
|
1587
1634
|
}
|
|
1588
1635
|
),
|
|
1589
|
-
open && selectable ? /* @__PURE__ */
|
|
1636
|
+
open && selectable ? /* @__PURE__ */ jsx12(
|
|
1590
1637
|
Reanimated.View,
|
|
1591
1638
|
{
|
|
1592
1639
|
entering: menuEnter,
|
|
1593
1640
|
exiting: menuExit,
|
|
1594
1641
|
style: dropdownMenuOverlay,
|
|
1595
|
-
children: /* @__PURE__ */
|
|
1642
|
+
children: /* @__PURE__ */ jsx12(
|
|
1596
1643
|
Box,
|
|
1597
1644
|
{
|
|
1598
1645
|
borderRadius: "element",
|
|
1599
1646
|
style: [dropdownMenu, { backgroundColor: theme.background.modal }],
|
|
1600
|
-
children: tokens.map((token) => /* @__PURE__ */
|
|
1647
|
+
children: tokens.map((token) => /* @__PURE__ */ jsx12(
|
|
1601
1648
|
Pressable,
|
|
1602
1649
|
{
|
|
1603
1650
|
onPress: () => onSelect(token.id),
|
|
@@ -1618,8 +1665,8 @@ function ReceiveTokenDropdown({
|
|
|
1618
1665
|
alignItems: "center",
|
|
1619
1666
|
style: triggerLeft,
|
|
1620
1667
|
children: [
|
|
1621
|
-
token.icon ?? /* @__PURE__ */
|
|
1622
|
-
/* @__PURE__ */
|
|
1668
|
+
token.icon ?? /* @__PURE__ */ jsx12(ReceiveTokenIconFallback, {}),
|
|
1669
|
+
/* @__PURE__ */ jsx12(
|
|
1623
1670
|
Text,
|
|
1624
1671
|
{
|
|
1625
1672
|
variant: "bodyMedium",
|
|
@@ -1630,7 +1677,7 @@ function ReceiveTokenDropdown({
|
|
|
1630
1677
|
]
|
|
1631
1678
|
}
|
|
1632
1679
|
),
|
|
1633
|
-
token.id === selected.id ? /* @__PURE__ */
|
|
1680
|
+
token.id === selected.id ? /* @__PURE__ */ jsx12(CheckIcon, {}) : null
|
|
1634
1681
|
]
|
|
1635
1682
|
}
|
|
1636
1683
|
)
|
|
@@ -1645,7 +1692,7 @@ function ReceiveTokenDropdown({
|
|
|
1645
1692
|
}
|
|
1646
1693
|
function ReceiveTokenIconFallback() {
|
|
1647
1694
|
const theme = useTheme();
|
|
1648
|
-
return /* @__PURE__ */
|
|
1695
|
+
return /* @__PURE__ */ jsx12(
|
|
1649
1696
|
Box,
|
|
1650
1697
|
{
|
|
1651
1698
|
width: 24,
|
|
@@ -1656,7 +1703,7 @@ function ReceiveTokenIconFallback() {
|
|
|
1656
1703
|
);
|
|
1657
1704
|
}
|
|
1658
1705
|
function ChevronDownIcon() {
|
|
1659
|
-
return /* @__PURE__ */
|
|
1706
|
+
return /* @__PURE__ */ jsx12(FigmaChevronDownIcon, { size: 16 });
|
|
1660
1707
|
}
|
|
1661
1708
|
function AnimatedChevron({ open }) {
|
|
1662
1709
|
const rotation = useSharedValue(open ? 1 : 0);
|
|
@@ -1669,10 +1716,10 @@ function AnimatedChevron({ open }) {
|
|
|
1669
1716
|
const style = useAnimatedStyle(() => ({
|
|
1670
1717
|
transform: [{ rotate: `${rotation.value * 180}deg` }]
|
|
1671
1718
|
}));
|
|
1672
|
-
return /* @__PURE__ */
|
|
1719
|
+
return /* @__PURE__ */ jsx12(Reanimated.View, { style, children: /* @__PURE__ */ jsx12(FigmaChevronDownIcon, { size: 16 }) });
|
|
1673
1720
|
}
|
|
1674
1721
|
function CheckIcon() {
|
|
1675
|
-
return /* @__PURE__ */
|
|
1722
|
+
return /* @__PURE__ */ jsx12(FigmaCheckIcon, { size: 16 });
|
|
1676
1723
|
}
|
|
1677
1724
|
function SelectMethodLoading({
|
|
1678
1725
|
count,
|
|
@@ -1685,7 +1732,7 @@ function SelectMethodLoading({
|
|
|
1685
1732
|
const rowCount = count ?? (showDropdown ? 5 : 6);
|
|
1686
1733
|
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
1687
1734
|
showDropdown ? /* @__PURE__ */ jsxs4(Box, { style: depositSection, children: [
|
|
1688
|
-
/* @__PURE__ */
|
|
1735
|
+
/* @__PURE__ */ jsx12(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx12(
|
|
1689
1736
|
Text,
|
|
1690
1737
|
{
|
|
1691
1738
|
variant: "detail",
|
|
@@ -1710,7 +1757,7 @@ function SelectMethodLoading({
|
|
|
1710
1757
|
],
|
|
1711
1758
|
children: [
|
|
1712
1759
|
/* @__PURE__ */ jsxs4(Animated2.View, { style: [loadingSelectorLeft, { opacity }], children: [
|
|
1713
|
-
/* @__PURE__ */
|
|
1760
|
+
/* @__PURE__ */ jsx12(
|
|
1714
1761
|
Box,
|
|
1715
1762
|
{
|
|
1716
1763
|
width: 20,
|
|
@@ -1719,7 +1766,7 @@ function SelectMethodLoading({
|
|
|
1719
1766
|
style: { backgroundColor: theme.background.pill.pressed }
|
|
1720
1767
|
}
|
|
1721
1768
|
),
|
|
1722
|
-
/* @__PURE__ */
|
|
1769
|
+
/* @__PURE__ */ jsx12(
|
|
1723
1770
|
Box,
|
|
1724
1771
|
{
|
|
1725
1772
|
style: [
|
|
@@ -1729,13 +1776,13 @@ function SelectMethodLoading({
|
|
|
1729
1776
|
}
|
|
1730
1777
|
)
|
|
1731
1778
|
] }),
|
|
1732
|
-
/* @__PURE__ */
|
|
1779
|
+
/* @__PURE__ */ jsx12(ChevronDownIcon, {})
|
|
1733
1780
|
]
|
|
1734
1781
|
}
|
|
1735
1782
|
)
|
|
1736
1783
|
] }) : null,
|
|
1737
1784
|
showDropdown ? /* @__PURE__ */ jsxs4(Box, { style: payWithSection, children: [
|
|
1738
|
-
/* @__PURE__ */
|
|
1785
|
+
/* @__PURE__ */ jsx12(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx12(
|
|
1739
1786
|
Text,
|
|
1740
1787
|
{
|
|
1741
1788
|
variant: "detail",
|
|
@@ -1743,7 +1790,7 @@ function SelectMethodLoading({
|
|
|
1743
1790
|
children: payWithLabel
|
|
1744
1791
|
}
|
|
1745
1792
|
) }),
|
|
1746
|
-
/* @__PURE__ */
|
|
1793
|
+
/* @__PURE__ */ jsx12(
|
|
1747
1794
|
Box,
|
|
1748
1795
|
{
|
|
1749
1796
|
borderWidth: 1,
|
|
@@ -1755,22 +1802,22 @@ function SelectMethodLoading({
|
|
|
1755
1802
|
borderColor: theme.border.elements.default.color
|
|
1756
1803
|
}
|
|
1757
1804
|
],
|
|
1758
|
-
children: /* @__PURE__ */
|
|
1805
|
+
children: /* @__PURE__ */ jsx12(
|
|
1759
1806
|
Animated2.View,
|
|
1760
1807
|
{
|
|
1761
1808
|
style: { opacity },
|
|
1762
1809
|
accessibilityLabel: "Loading payment methods",
|
|
1763
|
-
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */
|
|
1810
|
+
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */ jsx12(PaymentMethodRowSkeleton, {}, i))
|
|
1764
1811
|
}
|
|
1765
1812
|
)
|
|
1766
1813
|
}
|
|
1767
1814
|
)
|
|
1768
|
-
] }) : /* @__PURE__ */
|
|
1815
|
+
] }) : /* @__PURE__ */ jsx12(Box, { style: skeletonListContent, children: /* @__PURE__ */ jsx12(
|
|
1769
1816
|
Animated2.View,
|
|
1770
1817
|
{
|
|
1771
1818
|
style: { opacity },
|
|
1772
1819
|
accessibilityLabel: "Loading payment methods",
|
|
1773
|
-
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */
|
|
1820
|
+
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */ jsx12(PaymentMethodRowSkeleton, {}, i))
|
|
1774
1821
|
}
|
|
1775
1822
|
) })
|
|
1776
1823
|
] });
|
|
@@ -1785,7 +1832,7 @@ function PaymentMethodRowSkeleton() {
|
|
|
1785
1832
|
gap: "elementsHorizontal",
|
|
1786
1833
|
style: skeletonRow,
|
|
1787
1834
|
children: [
|
|
1788
|
-
/* @__PURE__ */
|
|
1835
|
+
/* @__PURE__ */ jsx12(
|
|
1789
1836
|
Box,
|
|
1790
1837
|
{
|
|
1791
1838
|
width: 48,
|
|
@@ -1795,7 +1842,7 @@ function PaymentMethodRowSkeleton() {
|
|
|
1795
1842
|
}
|
|
1796
1843
|
),
|
|
1797
1844
|
/* @__PURE__ */ jsxs4(Box, { flex: 1, style: skeletonDetails, children: [
|
|
1798
|
-
/* @__PURE__ */
|
|
1845
|
+
/* @__PURE__ */ jsx12(
|
|
1799
1846
|
Box,
|
|
1800
1847
|
{
|
|
1801
1848
|
style: [
|
|
@@ -1804,7 +1851,7 @@ function PaymentMethodRowSkeleton() {
|
|
|
1804
1851
|
]
|
|
1805
1852
|
}
|
|
1806
1853
|
),
|
|
1807
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ jsx12(
|
|
1808
1855
|
Box,
|
|
1809
1856
|
{
|
|
1810
1857
|
style: [
|
|
@@ -1848,9 +1895,10 @@ var grabber = {
|
|
|
1848
1895
|
height: 5,
|
|
1849
1896
|
borderRadius: 999
|
|
1850
1897
|
};
|
|
1898
|
+
var BOTTOM_GAP = 50;
|
|
1851
1899
|
var listContent = {
|
|
1852
1900
|
paddingHorizontal: 16,
|
|
1853
|
-
paddingBottom:
|
|
1901
|
+
paddingBottom: BOTTOM_GAP
|
|
1854
1902
|
};
|
|
1855
1903
|
var row = { padding: 12 };
|
|
1856
1904
|
var details = { gap: 2 };
|
|
@@ -1861,7 +1909,7 @@ var depositSection = {
|
|
|
1861
1909
|
var payWithSection = {
|
|
1862
1910
|
paddingHorizontal: 16,
|
|
1863
1911
|
paddingTop: 12,
|
|
1864
|
-
paddingBottom:
|
|
1912
|
+
paddingBottom: BOTTOM_GAP
|
|
1865
1913
|
};
|
|
1866
1914
|
var sectionLabel = { paddingHorizontal: 12, paddingBottom: 6 };
|
|
1867
1915
|
var methodsCard = { paddingVertical: 2, overflow: "hidden" };
|
|
@@ -1905,7 +1953,7 @@ var errorMessageText = { textAlign: "center" };
|
|
|
1905
1953
|
var retryButton = { height: 48, paddingHorizontal: 20 };
|
|
1906
1954
|
var skeletonListContent = {
|
|
1907
1955
|
paddingHorizontal: 16,
|
|
1908
|
-
paddingBottom:
|
|
1956
|
+
paddingBottom: BOTTOM_GAP
|
|
1909
1957
|
};
|
|
1910
1958
|
var skeletonRow = { padding: 12 };
|
|
1911
1959
|
var loadingSelectorLeft = {
|
|
@@ -1923,12 +1971,18 @@ var skeletonSubtitleBar = {
|
|
|
1923
1971
|
};
|
|
1924
1972
|
|
|
1925
1973
|
// src/screens/AvailableChainsScreen.tsx
|
|
1974
|
+
import { useRef as useRef2, useState as useState5 } from "react";
|
|
1926
1975
|
import {
|
|
1927
1976
|
Pressable as Pressable2,
|
|
1928
1977
|
ScrollView as ScrollView2,
|
|
1978
|
+
View,
|
|
1929
1979
|
useWindowDimensions
|
|
1930
1980
|
} from "react-native";
|
|
1931
|
-
import {
|
|
1981
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
1982
|
+
import Svg, { Defs, LinearGradient, Rect, Stop } from "react-native-svg";
|
|
1983
|
+
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1984
|
+
var SCROLL_FADE_HEIGHT = 42;
|
|
1985
|
+
var SCROLL_EPSILON = 1;
|
|
1932
1986
|
function AvailableChainsScreen({
|
|
1933
1987
|
networkLabel,
|
|
1934
1988
|
chains,
|
|
@@ -1940,16 +1994,48 @@ function AvailableChainsScreen({
|
|
|
1940
1994
|
}) {
|
|
1941
1995
|
const { height } = useWindowDimensions();
|
|
1942
1996
|
const theme = useTheme();
|
|
1997
|
+
const insets = useSafeAreaInsets();
|
|
1998
|
+
const [showTopFade, setShowTopFade] = useState5(false);
|
|
1999
|
+
const [showBottomFade, setShowBottomFade] = useState5(false);
|
|
2000
|
+
const metrics = useRef2({ scrollY: 0, viewportH: 0, contentH: 0 });
|
|
2001
|
+
const recomputeFades = () => {
|
|
2002
|
+
const { scrollY, viewportH, contentH } = metrics.current;
|
|
2003
|
+
const overflows = contentH > viewportH + SCROLL_EPSILON;
|
|
2004
|
+
setShowTopFade(overflows && scrollY > SCROLL_EPSILON);
|
|
2005
|
+
setShowBottomFade(
|
|
2006
|
+
overflows && scrollY + viewportH < contentH - SCROLL_EPSILON
|
|
2007
|
+
);
|
|
2008
|
+
};
|
|
2009
|
+
const onScroll = (e) => {
|
|
2010
|
+
metrics.current.scrollY = e.nativeEvent.contentOffset.y;
|
|
2011
|
+
recomputeFades();
|
|
2012
|
+
};
|
|
2013
|
+
const onViewportLayout = (e) => {
|
|
2014
|
+
metrics.current.viewportH = e.nativeEvent.layout.height;
|
|
2015
|
+
recomputeFades();
|
|
2016
|
+
};
|
|
2017
|
+
const onContentSizeChange = (_w, h) => {
|
|
2018
|
+
metrics.current.contentH = h;
|
|
2019
|
+
metrics.current.scrollY = Math.min(
|
|
2020
|
+
metrics.current.scrollY,
|
|
2021
|
+
Math.max(0, h - metrics.current.viewportH)
|
|
2022
|
+
);
|
|
2023
|
+
recomputeFades();
|
|
2024
|
+
};
|
|
1943
2025
|
return /* @__PURE__ */ jsxs5(
|
|
1944
2026
|
Box,
|
|
1945
2027
|
{
|
|
1946
2028
|
borderTopLeftRadius: "modal",
|
|
1947
2029
|
borderTopRightRadius: "modal",
|
|
1948
|
-
style:
|
|
2030
|
+
style: {
|
|
2031
|
+
backgroundColor: theme.background.modal,
|
|
2032
|
+
// 16px gap above the home indicator (design review), device-aware.
|
|
2033
|
+
paddingBottom: insets.bottom + 16
|
|
2034
|
+
},
|
|
1949
2035
|
children: [
|
|
1950
2036
|
/* @__PURE__ */ jsxs5(Box, { flexDirection: "row", alignItems: "center", style: topBar2, children: [
|
|
1951
|
-
/* @__PURE__ */
|
|
1952
|
-
/* @__PURE__ */
|
|
2037
|
+
/* @__PURE__ */ jsx13(Box, { style: topBarSpacer }),
|
|
2038
|
+
/* @__PURE__ */ jsx13(Box, { flex: 1, alignItems: "center", children: /* @__PURE__ */ jsx13(
|
|
1953
2039
|
Text,
|
|
1954
2040
|
{
|
|
1955
2041
|
variant: "bodyMedium",
|
|
@@ -1957,58 +2043,66 @@ function AvailableChainsScreen({
|
|
|
1957
2043
|
children: title
|
|
1958
2044
|
}
|
|
1959
2045
|
) }),
|
|
1960
|
-
/* @__PURE__ */
|
|
2046
|
+
/* @__PURE__ */ jsx13(Box, { style: topBarSpacer })
|
|
1961
2047
|
] }),
|
|
1962
|
-
/* @__PURE__ */
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2048
|
+
/* @__PURE__ */ jsxs5(View, { style: scrollArea, children: [
|
|
2049
|
+
/* @__PURE__ */ jsx13(
|
|
2050
|
+
ScrollView2,
|
|
2051
|
+
{
|
|
2052
|
+
style: [list, { maxHeight: height * 0.72 }],
|
|
2053
|
+
showsVerticalScrollIndicator: false,
|
|
2054
|
+
contentContainerStyle: listContent2,
|
|
2055
|
+
onScroll,
|
|
2056
|
+
onLayout: onViewportLayout,
|
|
2057
|
+
onContentSizeChange,
|
|
2058
|
+
scrollEventThrottle: 16,
|
|
2059
|
+
children: loading ? Array.from({ length: skeletonCount }, (_, index) => /* @__PURE__ */ jsx13(AvailableChainSkeleton, {}, index)) : chains.map((chain) => /* @__PURE__ */ jsxs5(
|
|
2060
|
+
Box,
|
|
2061
|
+
{
|
|
2062
|
+
flexDirection: "row",
|
|
2063
|
+
alignItems: "center",
|
|
2064
|
+
style: row2,
|
|
2065
|
+
children: [
|
|
2066
|
+
/* @__PURE__ */ jsx13(Box, { style: iconRing2, children: /* @__PURE__ */ jsx13(
|
|
2067
|
+
FunIcon,
|
|
2068
|
+
{
|
|
2069
|
+
uri: chain.iconUri,
|
|
2070
|
+
size: 36,
|
|
2071
|
+
fallbackUri: FALLBACK_ASSET_LOGO
|
|
2072
|
+
}
|
|
2073
|
+
) }),
|
|
2074
|
+
/* @__PURE__ */ jsx13(Box, { flex: 1, children: /* @__PURE__ */ jsx13(
|
|
2075
|
+
Text,
|
|
2076
|
+
{
|
|
2077
|
+
variant: "bodyMedium",
|
|
2078
|
+
style: { color: theme.content.elements.primary },
|
|
2079
|
+
children: chain.name
|
|
2080
|
+
}
|
|
2081
|
+
) }),
|
|
2082
|
+
chain.minLabel ? /* @__PURE__ */ jsx13(
|
|
2083
|
+
Text,
|
|
2084
|
+
{
|
|
2085
|
+
variant: "detail",
|
|
2086
|
+
style: { color: theme.content.elements.secondary },
|
|
2087
|
+
children: chain.minLabel
|
|
2088
|
+
}
|
|
2089
|
+
) : null
|
|
2090
|
+
]
|
|
2091
|
+
},
|
|
2092
|
+
chain.id
|
|
2093
|
+
))
|
|
2094
|
+
}
|
|
2095
|
+
),
|
|
2096
|
+
showTopFade ? /* @__PURE__ */ jsx13(ScrollFade, { edge: "top", color: theme.background.modal }) : null,
|
|
2097
|
+
showBottomFade ? /* @__PURE__ */ jsx13(ScrollFade, { edge: "bottom", color: theme.background.modal }) : null
|
|
2098
|
+
] }),
|
|
2099
|
+
/* @__PURE__ */ jsx13(Box, { style: buttonContainer, children: /* @__PURE__ */ jsx13(
|
|
2006
2100
|
Pressable2,
|
|
2007
2101
|
{
|
|
2008
2102
|
onPress: onClose,
|
|
2009
2103
|
accessibilityRole: "button",
|
|
2010
2104
|
accessibilityLabel: gotItLabel,
|
|
2011
|
-
children: /* @__PURE__ */
|
|
2105
|
+
children: /* @__PURE__ */ jsx13(
|
|
2012
2106
|
Box,
|
|
2013
2107
|
{
|
|
2014
2108
|
flexDirection: "row",
|
|
@@ -2019,7 +2113,7 @@ function AvailableChainsScreen({
|
|
|
2019
2113
|
gotItButton,
|
|
2020
2114
|
{ backgroundColor: theme.background.button.primary.default }
|
|
2021
2115
|
],
|
|
2022
|
-
children: /* @__PURE__ */
|
|
2116
|
+
children: /* @__PURE__ */ jsx13(
|
|
2023
2117
|
Text,
|
|
2024
2118
|
{
|
|
2025
2119
|
variant: "bodyMedium",
|
|
@@ -2038,7 +2132,7 @@ function AvailableChainsScreen({
|
|
|
2038
2132
|
function AvailableChainSkeleton() {
|
|
2039
2133
|
const theme = useTheme();
|
|
2040
2134
|
return /* @__PURE__ */ jsxs5(Box, { flexDirection: "row", alignItems: "center", style: row2, children: [
|
|
2041
|
-
/* @__PURE__ */
|
|
2135
|
+
/* @__PURE__ */ jsx13(
|
|
2042
2136
|
Box,
|
|
2043
2137
|
{
|
|
2044
2138
|
style: [
|
|
@@ -2047,7 +2141,7 @@ function AvailableChainSkeleton() {
|
|
|
2047
2141
|
]
|
|
2048
2142
|
}
|
|
2049
2143
|
),
|
|
2050
|
-
/* @__PURE__ */
|
|
2144
|
+
/* @__PURE__ */ jsx13(Box, { flex: 1, children: /* @__PURE__ */ jsx13(
|
|
2051
2145
|
Box,
|
|
2052
2146
|
{
|
|
2053
2147
|
style: [
|
|
@@ -2056,7 +2150,7 @@ function AvailableChainSkeleton() {
|
|
|
2056
2150
|
]
|
|
2057
2151
|
}
|
|
2058
2152
|
) }),
|
|
2059
|
-
/* @__PURE__ */
|
|
2153
|
+
/* @__PURE__ */ jsx13(
|
|
2060
2154
|
Box,
|
|
2061
2155
|
{
|
|
2062
2156
|
style: [
|
|
@@ -2067,7 +2161,48 @@ function AvailableChainSkeleton() {
|
|
|
2067
2161
|
)
|
|
2068
2162
|
] });
|
|
2069
2163
|
}
|
|
2070
|
-
|
|
2164
|
+
function ScrollFade({
|
|
2165
|
+
edge,
|
|
2166
|
+
color
|
|
2167
|
+
}) {
|
|
2168
|
+
const id = `chains-fade-${edge}`;
|
|
2169
|
+
const topOpaque = edge === "top";
|
|
2170
|
+
return /* @__PURE__ */ jsx13(
|
|
2171
|
+
View,
|
|
2172
|
+
{
|
|
2173
|
+
pointerEvents: "none",
|
|
2174
|
+
style: [fade, edge === "top" ? { top: 0 } : { bottom: 0 }],
|
|
2175
|
+
children: /* @__PURE__ */ jsxs5(Svg, { width: "100%", height: "100%", children: [
|
|
2176
|
+
/* @__PURE__ */ jsx13(Defs, { children: /* @__PURE__ */ jsxs5(LinearGradient, { id, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
2177
|
+
/* @__PURE__ */ jsx13(
|
|
2178
|
+
Stop,
|
|
2179
|
+
{
|
|
2180
|
+
offset: "0",
|
|
2181
|
+
stopColor: color,
|
|
2182
|
+
stopOpacity: topOpaque ? 1 : 0
|
|
2183
|
+
}
|
|
2184
|
+
),
|
|
2185
|
+
/* @__PURE__ */ jsx13(
|
|
2186
|
+
Stop,
|
|
2187
|
+
{
|
|
2188
|
+
offset: "1",
|
|
2189
|
+
stopColor: color,
|
|
2190
|
+
stopOpacity: topOpaque ? 0 : 1
|
|
2191
|
+
}
|
|
2192
|
+
)
|
|
2193
|
+
] }) }),
|
|
2194
|
+
/* @__PURE__ */ jsx13(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${id})` })
|
|
2195
|
+
] })
|
|
2196
|
+
}
|
|
2197
|
+
);
|
|
2198
|
+
}
|
|
2199
|
+
var scrollArea = { position: "relative" };
|
|
2200
|
+
var fade = {
|
|
2201
|
+
position: "absolute",
|
|
2202
|
+
left: 0,
|
|
2203
|
+
right: 0,
|
|
2204
|
+
height: SCROLL_FADE_HEIGHT
|
|
2205
|
+
};
|
|
2071
2206
|
var topBar2 = {
|
|
2072
2207
|
paddingBottom: 12,
|
|
2073
2208
|
paddingHorizontal: 24,
|
|
@@ -2095,7 +2230,7 @@ var iconRing2 = {
|
|
|
2095
2230
|
|
|
2096
2231
|
// src/screens/CheckoutBlockedScreen.tsx
|
|
2097
2232
|
import { Linking, Pressable as Pressable3, StyleSheet as StyleSheet3 } from "react-native";
|
|
2098
|
-
import { jsx as
|
|
2233
|
+
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2099
2234
|
var FUN_REGIONAL_RESTRICTIONS_URL = "https://intercom.help/funxyz/en/articles/9827689-regional-restrictions";
|
|
2100
2235
|
function CheckoutBlockedScreen() {
|
|
2101
2236
|
const theme = useTheme();
|
|
@@ -2107,7 +2242,7 @@ function CheckoutBlockedScreen() {
|
|
|
2107
2242
|
style: { backgroundColor: theme.background.modal },
|
|
2108
2243
|
children: [
|
|
2109
2244
|
/* @__PURE__ */ jsxs6(Box, { alignItems: "center", style: styles3.topBar, children: [
|
|
2110
|
-
/* @__PURE__ */
|
|
2245
|
+
/* @__PURE__ */ jsx14(
|
|
2111
2246
|
Box,
|
|
2112
2247
|
{
|
|
2113
2248
|
style: [
|
|
@@ -2116,7 +2251,7 @@ function CheckoutBlockedScreen() {
|
|
|
2116
2251
|
]
|
|
2117
2252
|
}
|
|
2118
2253
|
),
|
|
2119
|
-
/* @__PURE__ */
|
|
2254
|
+
/* @__PURE__ */ jsx14(
|
|
2120
2255
|
Text,
|
|
2121
2256
|
{
|
|
2122
2257
|
variant: "bodyMedium",
|
|
@@ -2126,9 +2261,9 @@ function CheckoutBlockedScreen() {
|
|
|
2126
2261
|
)
|
|
2127
2262
|
] }),
|
|
2128
2263
|
/* @__PURE__ */ jsxs6(Box, { alignItems: "center", justifyContent: "center", style: styles3.content, children: [
|
|
2129
|
-
/* @__PURE__ */
|
|
2264
|
+
/* @__PURE__ */ jsx14(StatusIcon, {}),
|
|
2130
2265
|
/* @__PURE__ */ jsxs6(Box, { alignItems: "center", style: styles3.textGroup, children: [
|
|
2131
|
-
/* @__PURE__ */
|
|
2266
|
+
/* @__PURE__ */ jsx14(
|
|
2132
2267
|
Text,
|
|
2133
2268
|
{
|
|
2134
2269
|
variant: "bodyMedium",
|
|
@@ -2137,7 +2272,7 @@ function CheckoutBlockedScreen() {
|
|
|
2137
2272
|
}
|
|
2138
2273
|
),
|
|
2139
2274
|
/* @__PURE__ */ jsxs6(Box, { alignItems: "center", children: [
|
|
2140
|
-
/* @__PURE__ */
|
|
2275
|
+
/* @__PURE__ */ jsx14(
|
|
2141
2276
|
Text,
|
|
2142
2277
|
{
|
|
2143
2278
|
variant: "detail",
|
|
@@ -2148,11 +2283,11 @@ function CheckoutBlockedScreen() {
|
|
|
2148
2283
|
children: "This service is not available in your region."
|
|
2149
2284
|
}
|
|
2150
2285
|
),
|
|
2151
|
-
/* @__PURE__ */
|
|
2286
|
+
/* @__PURE__ */ jsx14(
|
|
2152
2287
|
Pressable3,
|
|
2153
2288
|
{
|
|
2154
2289
|
onPress: () => Linking.openURL(FUN_REGIONAL_RESTRICTIONS_URL),
|
|
2155
|
-
children: /* @__PURE__ */
|
|
2290
|
+
children: /* @__PURE__ */ jsx14(
|
|
2156
2291
|
Text,
|
|
2157
2292
|
{
|
|
2158
2293
|
variant: "detail",
|
|
@@ -2193,7 +2328,7 @@ var styles3 = StyleSheet3.create({
|
|
|
2193
2328
|
});
|
|
2194
2329
|
|
|
2195
2330
|
// src/screens/QrCodeScreen.tsx
|
|
2196
|
-
import { useEffect as useEffect5, useRef as
|
|
2331
|
+
import { useEffect as useEffect5, useRef as useRef3, useState as useState6 } from "react";
|
|
2197
2332
|
import { Pressable as Pressable4 } from "react-native";
|
|
2198
2333
|
|
|
2199
2334
|
// src/hooks/useScreenSize.ts
|
|
@@ -2205,13 +2340,13 @@ function useScreenSize() {
|
|
|
2205
2340
|
}
|
|
2206
2341
|
|
|
2207
2342
|
// src/icons/CopyAddressIcon.tsx
|
|
2208
|
-
import { SvgXml as
|
|
2209
|
-
import { jsx as
|
|
2343
|
+
import { SvgXml as SvgXml5 } from "react-native-svg";
|
|
2344
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
2210
2345
|
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>`;
|
|
2211
2346
|
function CopyAddressIcon({ size = 16 }) {
|
|
2212
2347
|
const theme = useTheme();
|
|
2213
|
-
return /* @__PURE__ */
|
|
2214
|
-
|
|
2348
|
+
return /* @__PURE__ */ jsx15(
|
|
2349
|
+
SvgXml5,
|
|
2215
2350
|
{
|
|
2216
2351
|
xml: COPY_ADDRESS_SVG,
|
|
2217
2352
|
width: size,
|
|
@@ -2222,7 +2357,7 @@ function CopyAddressIcon({ size = 16 }) {
|
|
|
2222
2357
|
}
|
|
2223
2358
|
|
|
2224
2359
|
// src/screens/QrCodeScreen.tsx
|
|
2225
|
-
import { jsx as
|
|
2360
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2226
2361
|
function QrCodeScreen({
|
|
2227
2362
|
qrCode,
|
|
2228
2363
|
centerIcon,
|
|
@@ -2237,8 +2372,8 @@ function QrCodeScreen({
|
|
|
2237
2372
|
}) {
|
|
2238
2373
|
const { isShort } = useScreenSize();
|
|
2239
2374
|
const theme = useTheme();
|
|
2240
|
-
const [copied, setCopied] =
|
|
2241
|
-
const copyTimer =
|
|
2375
|
+
const [copied, setCopied] = useState6(false);
|
|
2376
|
+
const copyTimer = useRef3(void 0);
|
|
2242
2377
|
useEffect5(() => () => clearTimeout(copyTimer.current), []);
|
|
2243
2378
|
const handleCopy = async () => {
|
|
2244
2379
|
const ok = await onCopyAddress?.();
|
|
@@ -2252,11 +2387,11 @@ function QrCodeScreen({
|
|
|
2252
2387
|
{
|
|
2253
2388
|
borderTopLeftRadius: "modal",
|
|
2254
2389
|
borderTopRightRadius: "modal",
|
|
2255
|
-
style: [
|
|
2390
|
+
style: [sheet, { backgroundColor: theme.background.modal }],
|
|
2256
2391
|
children: [
|
|
2257
2392
|
/* @__PURE__ */ jsxs7(Box, { flexDirection: "row", alignItems: "center", style: topBar3, children: [
|
|
2258
|
-
/* @__PURE__ */
|
|
2259
|
-
/* @__PURE__ */
|
|
2393
|
+
/* @__PURE__ */ jsx16(Box, { style: topBarSpacer2 }),
|
|
2394
|
+
/* @__PURE__ */ jsx16(Box, { flex: 1, alignItems: "center", children: /* @__PURE__ */ jsx16(
|
|
2260
2395
|
Text,
|
|
2261
2396
|
{
|
|
2262
2397
|
variant: "bodyMedium",
|
|
@@ -2264,7 +2399,7 @@ function QrCodeScreen({
|
|
|
2264
2399
|
children: title
|
|
2265
2400
|
}
|
|
2266
2401
|
) }),
|
|
2267
|
-
/* @__PURE__ */
|
|
2402
|
+
/* @__PURE__ */ jsx16(Box, { style: topBarSpacer2 })
|
|
2268
2403
|
] }),
|
|
2269
2404
|
/* @__PURE__ */ jsxs7(Box, { style: { paddingVertical: isShort ? 0 : 16 }, children: [
|
|
2270
2405
|
/* @__PURE__ */ jsxs7(
|
|
@@ -2289,7 +2424,7 @@ function QrCodeScreen({
|
|
|
2289
2424
|
],
|
|
2290
2425
|
children: [
|
|
2291
2426
|
qrCode,
|
|
2292
|
-
centerIcon ? /* @__PURE__ */
|
|
2427
|
+
centerIcon ? /* @__PURE__ */ jsx16(
|
|
2293
2428
|
Box,
|
|
2294
2429
|
{
|
|
2295
2430
|
alignItems: "center",
|
|
@@ -2302,7 +2437,7 @@ function QrCodeScreen({
|
|
|
2302
2437
|
}
|
|
2303
2438
|
),
|
|
2304
2439
|
address ? /* @__PURE__ */ jsxs7(Box, { alignItems: "center", style: addressGroup, children: [
|
|
2305
|
-
/* @__PURE__ */
|
|
2440
|
+
/* @__PURE__ */ jsx16(
|
|
2306
2441
|
Text,
|
|
2307
2442
|
{
|
|
2308
2443
|
variant: "body",
|
|
@@ -2313,7 +2448,7 @@ function QrCodeScreen({
|
|
|
2313
2448
|
children: address
|
|
2314
2449
|
}
|
|
2315
2450
|
),
|
|
2316
|
-
onCopyAddress ? /* @__PURE__ */
|
|
2451
|
+
onCopyAddress ? /* @__PURE__ */ jsx16(
|
|
2317
2452
|
Pressable4,
|
|
2318
2453
|
{
|
|
2319
2454
|
onPress: handleCopy,
|
|
@@ -2335,8 +2470,8 @@ function QrCodeScreen({
|
|
|
2335
2470
|
}
|
|
2336
2471
|
],
|
|
2337
2472
|
children: [
|
|
2338
|
-
/* @__PURE__ */
|
|
2339
|
-
/* @__PURE__ */
|
|
2473
|
+
/* @__PURE__ */ jsx16(CopyAddressIcon, {}),
|
|
2474
|
+
/* @__PURE__ */ jsx16(
|
|
2340
2475
|
Text,
|
|
2341
2476
|
{
|
|
2342
2477
|
variant: "bodyMedium",
|
|
@@ -2353,13 +2488,13 @@ function QrCodeScreen({
|
|
|
2353
2488
|
]
|
|
2354
2489
|
}
|
|
2355
2490
|
),
|
|
2356
|
-
/* @__PURE__ */
|
|
2491
|
+
/* @__PURE__ */ jsx16(Box, { style: buttonContainer2, children: /* @__PURE__ */ jsx16(
|
|
2357
2492
|
Pressable4,
|
|
2358
2493
|
{
|
|
2359
2494
|
onPress: onClose,
|
|
2360
2495
|
accessibilityRole: "button",
|
|
2361
2496
|
accessibilityLabel: doneLabel,
|
|
2362
|
-
children: /* @__PURE__ */
|
|
2497
|
+
children: /* @__PURE__ */ jsx16(
|
|
2363
2498
|
Box,
|
|
2364
2499
|
{
|
|
2365
2500
|
flexDirection: "row",
|
|
@@ -2370,7 +2505,7 @@ function QrCodeScreen({
|
|
|
2370
2505
|
doneButton,
|
|
2371
2506
|
{ backgroundColor: theme.background.button.primary.default }
|
|
2372
2507
|
],
|
|
2373
|
-
children: /* @__PURE__ */
|
|
2508
|
+
children: /* @__PURE__ */ jsx16(
|
|
2374
2509
|
Text,
|
|
2375
2510
|
{
|
|
2376
2511
|
variant: "bodyMedium",
|
|
@@ -2387,7 +2522,7 @@ function QrCodeScreen({
|
|
|
2387
2522
|
}
|
|
2388
2523
|
);
|
|
2389
2524
|
}
|
|
2390
|
-
var
|
|
2525
|
+
var sheet = { paddingBottom: 34 };
|
|
2391
2526
|
var topBar3 = {
|
|
2392
2527
|
paddingBottom: 12,
|
|
2393
2528
|
paddingHorizontal: 24,
|
|
@@ -2429,11 +2564,12 @@ var buttonContainer2 = { paddingHorizontal: 20 };
|
|
|
2429
2564
|
var doneButton = { height: 56, paddingHorizontal: 24 };
|
|
2430
2565
|
|
|
2431
2566
|
// src/screens/TransferCryptoScreen.tsx
|
|
2432
|
-
import { useEffect as useEffect7, useRef as
|
|
2567
|
+
import { useEffect as useEffect7, useRef as useRef4, useState as useState8 } from "react";
|
|
2433
2568
|
import { Pressable as Pressable6 } from "react-native";
|
|
2569
|
+
import { useSafeAreaInsets as useSafeAreaInsets2 } from "react-native-safe-area-context";
|
|
2434
2570
|
|
|
2435
2571
|
// src/screens/NetworkSelector.tsx
|
|
2436
|
-
import { useEffect as useEffect6, useState as
|
|
2572
|
+
import { useEffect as useEffect6, useState as useState7 } from "react";
|
|
2437
2573
|
import { Pressable as Pressable5 } from "react-native";
|
|
2438
2574
|
import Animated3, {
|
|
2439
2575
|
Easing as Easing3,
|
|
@@ -2441,7 +2577,7 @@ import Animated3, {
|
|
|
2441
2577
|
FadeOut,
|
|
2442
2578
|
LinearTransition
|
|
2443
2579
|
} from "react-native-reanimated";
|
|
2444
|
-
import { jsx as
|
|
2580
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2445
2581
|
function toIconUri3(icon) {
|
|
2446
2582
|
return icon.startsWith("http") ? icon : chainIconUri(icon);
|
|
2447
2583
|
}
|
|
@@ -2450,10 +2586,10 @@ function NetworkSelector({
|
|
|
2450
2586
|
selectedId,
|
|
2451
2587
|
onSelect
|
|
2452
2588
|
}) {
|
|
2453
|
-
const [animate, setAnimate] =
|
|
2589
|
+
const [animate, setAnimate] = useState7(false);
|
|
2454
2590
|
useEffect6(() => setAnimate(true), []);
|
|
2455
2591
|
const theme = useTheme();
|
|
2456
|
-
return /* @__PURE__ */
|
|
2592
|
+
return /* @__PURE__ */ jsx17(
|
|
2457
2593
|
Box,
|
|
2458
2594
|
{
|
|
2459
2595
|
flexDirection: "row",
|
|
@@ -2469,7 +2605,7 @@ function NetworkSelector({
|
|
|
2469
2605
|
],
|
|
2470
2606
|
children: networks.map((network) => {
|
|
2471
2607
|
const selected = network.id === selectedId;
|
|
2472
|
-
return /* @__PURE__ */
|
|
2608
|
+
return /* @__PURE__ */ jsx17(
|
|
2473
2609
|
AnimatedPressable2,
|
|
2474
2610
|
{
|
|
2475
2611
|
onPress: () => onSelect(network.id),
|
|
@@ -2478,7 +2614,7 @@ function NetworkSelector({
|
|
|
2478
2614
|
accessibilityLabel: network.label,
|
|
2479
2615
|
style: selected ? selectedPress : iconPress,
|
|
2480
2616
|
layout: animate ? segmentLayout : void 0,
|
|
2481
|
-
children: selected ? /* @__PURE__ */
|
|
2617
|
+
children: selected ? /* @__PURE__ */ jsx17(
|
|
2482
2618
|
Animated3.View,
|
|
2483
2619
|
{
|
|
2484
2620
|
entering: animate ? FadeIn.duration(SLIDE_MS) : void 0,
|
|
@@ -2500,8 +2636,8 @@ function NetworkSelector({
|
|
|
2500
2636
|
}
|
|
2501
2637
|
],
|
|
2502
2638
|
children: [
|
|
2503
|
-
/* @__PURE__ */
|
|
2504
|
-
/* @__PURE__ */
|
|
2639
|
+
/* @__PURE__ */ jsx17(ChainGlyph, { iconKeys: network.iconKeys }),
|
|
2640
|
+
/* @__PURE__ */ jsx17(
|
|
2505
2641
|
Text,
|
|
2506
2642
|
{
|
|
2507
2643
|
variant: "bodyMedium",
|
|
@@ -2513,7 +2649,7 @@ function NetworkSelector({
|
|
|
2513
2649
|
}
|
|
2514
2650
|
)
|
|
2515
2651
|
}
|
|
2516
|
-
) : /* @__PURE__ */
|
|
2652
|
+
) : /* @__PURE__ */ jsx17(ChainGlyph, { iconKeys: network.iconKeys })
|
|
2517
2653
|
},
|
|
2518
2654
|
network.id
|
|
2519
2655
|
);
|
|
@@ -2529,7 +2665,7 @@ var segmentLayout = LinearTransition.duration(SLIDE_MS).easing(
|
|
|
2529
2665
|
);
|
|
2530
2666
|
function ChainGlyph({ iconKeys }) {
|
|
2531
2667
|
if (iconKeys.length <= 1) {
|
|
2532
|
-
return /* @__PURE__ */
|
|
2668
|
+
return /* @__PURE__ */ jsx17(
|
|
2533
2669
|
FunIcon,
|
|
2534
2670
|
{
|
|
2535
2671
|
uri: toIconUri3(iconKeys[0] ?? ""),
|
|
@@ -2538,7 +2674,7 @@ function ChainGlyph({ iconKeys }) {
|
|
|
2538
2674
|
}
|
|
2539
2675
|
);
|
|
2540
2676
|
}
|
|
2541
|
-
return /* @__PURE__ */
|
|
2677
|
+
return /* @__PURE__ */ jsx17(Box, { width: 24, height: 24, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx17(Box, { flexDirection: "row", flexWrap: "wrap", style: miniGrid, children: iconKeys.slice(0, 4).map((key) => /* @__PURE__ */ jsx17(
|
|
2542
2678
|
FunIcon,
|
|
2543
2679
|
{
|
|
2544
2680
|
uri: toIconUri3(key),
|
|
@@ -2565,7 +2701,7 @@ var iconPress = {
|
|
|
2565
2701
|
var miniGrid = { width: 23.5, gap: 1.5 };
|
|
2566
2702
|
|
|
2567
2703
|
// src/screens/TransferCryptoScreen.tsx
|
|
2568
|
-
import { jsx as
|
|
2704
|
+
import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2569
2705
|
function TransferCryptoScreen({
|
|
2570
2706
|
depositAddress,
|
|
2571
2707
|
networks,
|
|
@@ -2586,8 +2722,9 @@ function TransferCryptoScreen({
|
|
|
2586
2722
|
onShareAddress
|
|
2587
2723
|
}) {
|
|
2588
2724
|
const theme = useTheme();
|
|
2589
|
-
const
|
|
2590
|
-
const
|
|
2725
|
+
const insets = useSafeAreaInsets2();
|
|
2726
|
+
const [copied, setCopied] = useState8(false);
|
|
2727
|
+
const copyTimer = useRef4(void 0);
|
|
2591
2728
|
useEffect7(() => () => clearTimeout(copyTimer.current), []);
|
|
2592
2729
|
const handleCopy = () => {
|
|
2593
2730
|
onCopyAddress?.();
|
|
@@ -2607,17 +2744,17 @@ function TransferCryptoScreen({
|
|
|
2607
2744
|
style: { backgroundColor: theme.background.modal },
|
|
2608
2745
|
children: [
|
|
2609
2746
|
/* @__PURE__ */ jsxs9(Box, { flexDirection: "row", alignItems: "center", style: topBar4, children: [
|
|
2610
|
-
/* @__PURE__ */
|
|
2747
|
+
/* @__PURE__ */ jsx18(
|
|
2611
2748
|
Pressable6,
|
|
2612
2749
|
{
|
|
2613
2750
|
onPress: onBack,
|
|
2614
2751
|
hitSlop: 12,
|
|
2615
2752
|
accessibilityRole: "button",
|
|
2616
2753
|
accessibilityLabel: "Back",
|
|
2617
|
-
children: /* @__PURE__ */
|
|
2754
|
+
children: /* @__PURE__ */ jsx18(Box, { alignItems: "center", justifyContent: "center", style: iconButton, children: /* @__PURE__ */ jsx18(FigmaChevronLeftIcon, {}) })
|
|
2618
2755
|
}
|
|
2619
2756
|
),
|
|
2620
|
-
/* @__PURE__ */
|
|
2757
|
+
/* @__PURE__ */ jsx18(Box, { flex: 1, alignItems: "center", children: /* @__PURE__ */ jsx18(
|
|
2621
2758
|
Text,
|
|
2622
2759
|
{
|
|
2623
2760
|
variant: "bodyMedium",
|
|
@@ -2625,19 +2762,19 @@ function TransferCryptoScreen({
|
|
|
2625
2762
|
children: title
|
|
2626
2763
|
}
|
|
2627
2764
|
) }),
|
|
2628
|
-
/* @__PURE__ */
|
|
2765
|
+
/* @__PURE__ */ jsx18(
|
|
2629
2766
|
Pressable6,
|
|
2630
2767
|
{
|
|
2631
2768
|
onPress: onShowQrCode,
|
|
2632
2769
|
hitSlop: 12,
|
|
2633
2770
|
accessibilityRole: "button",
|
|
2634
2771
|
accessibilityLabel: "Show QR code",
|
|
2635
|
-
children: /* @__PURE__ */
|
|
2772
|
+
children: /* @__PURE__ */ jsx18(Box, { alignItems: "center", justifyContent: "center", style: iconButton, children: /* @__PURE__ */ jsx18(FigmaQrScanIcon, {}) })
|
|
2636
2773
|
}
|
|
2637
2774
|
)
|
|
2638
2775
|
] }),
|
|
2639
|
-
/* @__PURE__ */ jsxs9(Box, { style: content2, children: [
|
|
2640
|
-
/* @__PURE__ */
|
|
2776
|
+
/* @__PURE__ */ jsxs9(Box, { style: [content2, { paddingBottom: insets.bottom + 16 }], children: [
|
|
2777
|
+
/* @__PURE__ */ jsx18(
|
|
2641
2778
|
NetworkSelector,
|
|
2642
2779
|
{
|
|
2643
2780
|
networks,
|
|
@@ -2652,7 +2789,7 @@ function TransferCryptoScreen({
|
|
|
2652
2789
|
justifyContent: "flex-end",
|
|
2653
2790
|
style: addressRegion,
|
|
2654
2791
|
children: [
|
|
2655
|
-
/* @__PURE__ */
|
|
2792
|
+
/* @__PURE__ */ jsx18(
|
|
2656
2793
|
Box,
|
|
2657
2794
|
{
|
|
2658
2795
|
flex: 1,
|
|
@@ -2669,7 +2806,7 @@ function TransferCryptoScreen({
|
|
|
2669
2806
|
],
|
|
2670
2807
|
children: /* @__PURE__ */ jsxs9(Box, { alignItems: "center", style: addressColumn, children: [
|
|
2671
2808
|
/* @__PURE__ */ jsxs9(Box, { alignItems: "center", style: addressGroup2, children: [
|
|
2672
|
-
/* @__PURE__ */
|
|
2809
|
+
/* @__PURE__ */ jsx18(
|
|
2673
2810
|
Text,
|
|
2674
2811
|
{
|
|
2675
2812
|
variant: "body",
|
|
@@ -2677,7 +2814,7 @@ function TransferCryptoScreen({
|
|
|
2677
2814
|
children: depositAddressLabel
|
|
2678
2815
|
}
|
|
2679
2816
|
),
|
|
2680
|
-
/* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ jsx18(
|
|
2681
2818
|
Text,
|
|
2682
2819
|
{
|
|
2683
2820
|
variant: "bodyMedium",
|
|
@@ -2689,7 +2826,7 @@ function TransferCryptoScreen({
|
|
|
2689
2826
|
}
|
|
2690
2827
|
)
|
|
2691
2828
|
] }),
|
|
2692
|
-
showPreview ? /* @__PURE__ */
|
|
2829
|
+
showPreview ? /* @__PURE__ */ jsx18(
|
|
2693
2830
|
Pressable6,
|
|
2694
2831
|
{
|
|
2695
2832
|
onPress: onShowChains,
|
|
@@ -2705,7 +2842,7 @@ function TransferCryptoScreen({
|
|
|
2705
2842
|
{ backgroundColor: theme.background.secondary }
|
|
2706
2843
|
],
|
|
2707
2844
|
children: [
|
|
2708
|
-
/* @__PURE__ */
|
|
2845
|
+
/* @__PURE__ */ jsx18(
|
|
2709
2846
|
SourceTokenCluster,
|
|
2710
2847
|
{
|
|
2711
2848
|
icons: supportedTokenIcons,
|
|
@@ -2713,7 +2850,7 @@ function TransferCryptoScreen({
|
|
|
2713
2850
|
gap: 4
|
|
2714
2851
|
}
|
|
2715
2852
|
),
|
|
2716
|
-
/* @__PURE__ */
|
|
2853
|
+
/* @__PURE__ */ jsx18(
|
|
2717
2854
|
FigmaChevronRightIcon,
|
|
2718
2855
|
{
|
|
2719
2856
|
size: 16,
|
|
@@ -2724,7 +2861,7 @@ function TransferCryptoScreen({
|
|
|
2724
2861
|
}
|
|
2725
2862
|
)
|
|
2726
2863
|
}
|
|
2727
|
-
) : minimumDepositLabel ? /* @__PURE__ */
|
|
2864
|
+
) : minimumDepositLabel ? /* @__PURE__ */ jsx18(
|
|
2728
2865
|
MinimumDepositPill,
|
|
2729
2866
|
{
|
|
2730
2867
|
label: minimumDepositLabel,
|
|
@@ -2735,21 +2872,21 @@ function TransferCryptoScreen({
|
|
|
2735
2872
|
}
|
|
2736
2873
|
),
|
|
2737
2874
|
/* @__PURE__ */ jsxs9(Box, { flexDirection: "row", style: buttonsRow, children: [
|
|
2738
|
-
/* @__PURE__ */
|
|
2875
|
+
/* @__PURE__ */ jsx18(
|
|
2739
2876
|
PillButton,
|
|
2740
2877
|
{
|
|
2741
2878
|
label: copied ? copiedLabel : copyLabel,
|
|
2742
2879
|
accessibilityLabel: copied ? "Address copied" : "Copy address",
|
|
2743
|
-
icon: /* @__PURE__ */
|
|
2880
|
+
icon: /* @__PURE__ */ jsx18(FigmaCopyIcon, { color: theme.content.button.primary.default }),
|
|
2744
2881
|
onPress: handleCopy
|
|
2745
2882
|
}
|
|
2746
2883
|
),
|
|
2747
|
-
/* @__PURE__ */
|
|
2884
|
+
/* @__PURE__ */ jsx18(
|
|
2748
2885
|
PillButton,
|
|
2749
2886
|
{
|
|
2750
2887
|
label: shareLabel,
|
|
2751
2888
|
accessibilityLabel: "Share address",
|
|
2752
|
-
icon: /* @__PURE__ */
|
|
2889
|
+
icon: /* @__PURE__ */ jsx18(FigmaShareIcon, { color: theme.content.button.primary.default }),
|
|
2753
2890
|
onPress: onShareAddress
|
|
2754
2891
|
}
|
|
2755
2892
|
)
|
|
@@ -2767,8 +2904,8 @@ function MinimumDepositPill({
|
|
|
2767
2904
|
iconKey
|
|
2768
2905
|
}) {
|
|
2769
2906
|
const theme = useTheme();
|
|
2770
|
-
return /* @__PURE__ */
|
|
2771
|
-
iconKey ? /* @__PURE__ */
|
|
2907
|
+
return /* @__PURE__ */ jsx18(Box, { alignItems: "center", justifyContent: "flex-start", style: minimumPill, children: /* @__PURE__ */ jsxs9(Box, { flexDirection: "row", alignItems: "center", style: minimumPillRow, children: [
|
|
2908
|
+
iconKey ? /* @__PURE__ */ jsx18(
|
|
2772
2909
|
FunIcon,
|
|
2773
2910
|
{
|
|
2774
2911
|
uri: iconKey.startsWith("http") ? iconKey : chainIconUri(iconKey),
|
|
@@ -2776,7 +2913,7 @@ function MinimumDepositPill({
|
|
|
2776
2913
|
fallbackUri: FALLBACK_ASSET_LOGO
|
|
2777
2914
|
}
|
|
2778
2915
|
) : null,
|
|
2779
|
-
/* @__PURE__ */
|
|
2916
|
+
/* @__PURE__ */ jsx18(
|
|
2780
2917
|
Text,
|
|
2781
2918
|
{
|
|
2782
2919
|
variant: "detail",
|
|
@@ -2793,7 +2930,7 @@ function PillButton({
|
|
|
2793
2930
|
onPress
|
|
2794
2931
|
}) {
|
|
2795
2932
|
const theme = useTheme();
|
|
2796
|
-
return /* @__PURE__ */
|
|
2933
|
+
return /* @__PURE__ */ jsx18(
|
|
2797
2934
|
Pressable6,
|
|
2798
2935
|
{
|
|
2799
2936
|
onPress,
|
|
@@ -2813,7 +2950,7 @@ function PillButton({
|
|
|
2813
2950
|
],
|
|
2814
2951
|
children: [
|
|
2815
2952
|
icon,
|
|
2816
|
-
/* @__PURE__ */
|
|
2953
|
+
/* @__PURE__ */ jsx18(
|
|
2817
2954
|
Text,
|
|
2818
2955
|
{
|
|
2819
2956
|
variant: "bodyMedium",
|
|
@@ -2836,9 +2973,8 @@ var topBar4 = {
|
|
|
2836
2973
|
var iconButton = { width: 32, height: 32 };
|
|
2837
2974
|
var content2 = {
|
|
2838
2975
|
paddingHorizontal: 20,
|
|
2839
|
-
//
|
|
2840
|
-
//
|
|
2841
|
-
paddingBottom: 34,
|
|
2976
|
+
// paddingBottom is set inline: safe-area inset + 16 so the buttons keep a 16px
|
|
2977
|
+
// gap above the home indicator on every device.
|
|
2842
2978
|
paddingTop: 8,
|
|
2843
2979
|
gap: 16
|
|
2844
2980
|
};
|
|
@@ -2873,7 +3009,7 @@ var pillButtonPress = { flex: 1 };
|
|
|
2873
3009
|
var pillButton = { height: 56, paddingHorizontal: 24, gap: 8 };
|
|
2874
3010
|
|
|
2875
3011
|
// src/screens/WithdrawMethodScreen.tsx
|
|
2876
|
-
import { jsx as
|
|
3012
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2877
3013
|
var EMPTY_TITLE = "Withdrawals unavailable";
|
|
2878
3014
|
var EMPTY_MESSAGE = "Cash withdrawals aren't available in your region right now.";
|
|
2879
3015
|
var BELOW_MIN_TITLE = "Balance too low";
|
|
@@ -2899,7 +3035,7 @@ function WithdrawMethodScreen({
|
|
|
2899
3035
|
}) {
|
|
2900
3036
|
const terminalError = getTerminalError(isBelowMinimum, isEmpty);
|
|
2901
3037
|
if (terminalError && !hasError && !loading) {
|
|
2902
|
-
return /* @__PURE__ */
|
|
3038
|
+
return /* @__PURE__ */ jsx19(
|
|
2903
3039
|
SelectMethodScreen,
|
|
2904
3040
|
{
|
|
2905
3041
|
title,
|
|
@@ -2911,7 +3047,7 @@ function WithdrawMethodScreen({
|
|
|
2911
3047
|
}
|
|
2912
3048
|
);
|
|
2913
3049
|
}
|
|
2914
|
-
return /* @__PURE__ */
|
|
3050
|
+
return /* @__PURE__ */ jsx19(
|
|
2915
3051
|
SelectMethodScreen,
|
|
2916
3052
|
{
|
|
2917
3053
|
title,
|
|
@@ -2932,8 +3068,8 @@ import { useCallback as useCallback3 } from "react";
|
|
|
2932
3068
|
|
|
2933
3069
|
// src/swapped/SwappedWebView.tsx
|
|
2934
3070
|
import { useTheme as useTheme2 } from "@shopify/restyle";
|
|
2935
|
-
import { useCallback as useCallback2, useEffect as useEffect8, useMemo as useMemo4, useRef as
|
|
2936
|
-
import { ActivityIndicator, View } from "react-native";
|
|
3071
|
+
import { useCallback as useCallback2, useEffect as useEffect8, useMemo as useMemo4, useRef as useRef5 } from "react";
|
|
3072
|
+
import { ActivityIndicator, View as View2 } from "react-native";
|
|
2937
3073
|
import {
|
|
2938
3074
|
WebView
|
|
2939
3075
|
} from "react-native-webview";
|
|
@@ -3192,10 +3328,10 @@ function createWebViewSwappedTransport({
|
|
|
3192
3328
|
}
|
|
3193
3329
|
|
|
3194
3330
|
// src/swapped/SwappedWebView.tsx
|
|
3195
|
-
import { jsx as
|
|
3331
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
3196
3332
|
function SwappedWebView({ url, onMessage, style }) {
|
|
3197
|
-
const webViewRef =
|
|
3198
|
-
const lastCommittedUrlRef =
|
|
3333
|
+
const webViewRef = useRef5(null);
|
|
3334
|
+
const lastCommittedUrlRef = useRef5(url);
|
|
3199
3335
|
const { transport, dispatch } = useMemo4(
|
|
3200
3336
|
() => createWebViewSwappedTransport({
|
|
3201
3337
|
getWebView: () => webViewRef.current
|
|
@@ -3208,11 +3344,11 @@ function SwappedWebView({ url, onMessage, style }) {
|
|
|
3208
3344
|
() => buildSwappedThemeRN(theme, colorScheme === "dark"),
|
|
3209
3345
|
[theme, colorScheme]
|
|
3210
3346
|
);
|
|
3211
|
-
const swappedThemeRef =
|
|
3347
|
+
const swappedThemeRef = useRef5(swappedTheme);
|
|
3212
3348
|
swappedThemeRef.current = swappedTheme;
|
|
3213
|
-
const colorSchemeRef =
|
|
3349
|
+
const colorSchemeRef = useRef5(colorScheme);
|
|
3214
3350
|
colorSchemeRef.current = colorScheme;
|
|
3215
|
-
const handlerRef =
|
|
3351
|
+
const handlerRef = useRef5(onMessage);
|
|
3216
3352
|
handlerRef.current = onMessage;
|
|
3217
3353
|
useEffect8(
|
|
3218
3354
|
() => transport.onMessage((msg) => {
|
|
@@ -3241,11 +3377,11 @@ function SwappedWebView({ url, onMessage, style }) {
|
|
|
3241
3377
|
);
|
|
3242
3378
|
};
|
|
3243
3379
|
const renderLoading = useCallback2(
|
|
3244
|
-
() => /* @__PURE__ */
|
|
3245
|
-
|
|
3380
|
+
() => /* @__PURE__ */ jsx20(
|
|
3381
|
+
View2,
|
|
3246
3382
|
{
|
|
3247
3383
|
style: [loadingOverlay, { backgroundColor: theme.background.modal }],
|
|
3248
|
-
children: /* @__PURE__ */
|
|
3384
|
+
children: /* @__PURE__ */ jsx20(ActivityIndicator, { color: theme.content.elements.secondary })
|
|
3249
3385
|
}
|
|
3250
3386
|
),
|
|
3251
3387
|
[theme.background.modal, theme.content.elements.secondary]
|
|
@@ -3263,7 +3399,7 @@ function SwappedWebView({ url, onMessage, style }) {
|
|
|
3263
3399
|
url: event.nativeEvent.url
|
|
3264
3400
|
});
|
|
3265
3401
|
};
|
|
3266
|
-
return /* @__PURE__ */
|
|
3402
|
+
return /* @__PURE__ */ jsx20(
|
|
3267
3403
|
WebView,
|
|
3268
3404
|
{
|
|
3269
3405
|
ref: webViewRef,
|
|
@@ -3302,7 +3438,7 @@ var loadingOverlay = {
|
|
|
3302
3438
|
};
|
|
3303
3439
|
|
|
3304
3440
|
// src/swapped/SwappedScreenShell.tsx
|
|
3305
|
-
import { jsx as
|
|
3441
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
3306
3442
|
function SwappedScreenShell({
|
|
3307
3443
|
url,
|
|
3308
3444
|
onMessage
|
|
@@ -3319,22 +3455,22 @@ function SwappedScreenShell({
|
|
|
3319
3455
|
},
|
|
3320
3456
|
[onMessage]
|
|
3321
3457
|
);
|
|
3322
|
-
return /* @__PURE__ */
|
|
3458
|
+
return /* @__PURE__ */ jsx21(
|
|
3323
3459
|
Box,
|
|
3324
3460
|
{
|
|
3325
3461
|
borderTopLeftRadius: "modal",
|
|
3326
3462
|
borderTopRightRadius: "modal",
|
|
3327
|
-
style: [
|
|
3328
|
-
children: /* @__PURE__ */
|
|
3463
|
+
style: [sheet2, { backgroundColor: theme.background.modal }],
|
|
3464
|
+
children: /* @__PURE__ */ jsx21(SwappedWebView, { url, onMessage: handleMessage, style: fill })
|
|
3329
3465
|
}
|
|
3330
3466
|
);
|
|
3331
3467
|
}
|
|
3332
3468
|
var SHEET_HEIGHT = 550;
|
|
3333
|
-
var
|
|
3469
|
+
var sheet2 = { height: SHEET_HEIGHT, overflow: "hidden" };
|
|
3334
3470
|
var fill = { flex: 1 };
|
|
3335
3471
|
|
|
3336
3472
|
// src/swapped/SwappedScreen.tsx
|
|
3337
|
-
import { jsx as
|
|
3473
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
3338
3474
|
function SwappedScreen({
|
|
3339
3475
|
url,
|
|
3340
3476
|
onClose,
|
|
@@ -3361,7 +3497,7 @@ function SwappedScreen({
|
|
|
3361
3497
|
},
|
|
3362
3498
|
[onBack, onClose, onSuccess]
|
|
3363
3499
|
);
|
|
3364
|
-
return /* @__PURE__ */
|
|
3500
|
+
return /* @__PURE__ */ jsx22(SwappedScreenShell, { url, onMessage: handleMessage });
|
|
3365
3501
|
}
|
|
3366
3502
|
|
|
3367
3503
|
// src/swapped/SwappedWithdrawScreen.tsx
|
|
@@ -3369,7 +3505,7 @@ import {
|
|
|
3369
3505
|
isValidOrderData
|
|
3370
3506
|
} from "@funkit/connect-core";
|
|
3371
3507
|
import { useCallback as useCallback5 } from "react";
|
|
3372
|
-
import { jsx as
|
|
3508
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
3373
3509
|
function SwappedWithdrawScreen({
|
|
3374
3510
|
url,
|
|
3375
3511
|
onClose,
|
|
@@ -3413,7 +3549,7 @@ function SwappedWithdrawScreen({
|
|
|
3413
3549
|
},
|
|
3414
3550
|
[onBack, onClose, onNewWithdrawal, onWithdrawalSuccess, onOrderData]
|
|
3415
3551
|
);
|
|
3416
|
-
return /* @__PURE__ */
|
|
3552
|
+
return /* @__PURE__ */ jsx23(SwappedScreenShell, { url, onMessage: handleMessage });
|
|
3417
3553
|
}
|
|
3418
3554
|
|
|
3419
3555
|
// src/transfer/availableChains.ts
|
|
@@ -3511,7 +3647,7 @@ async function copyToClipboard(value) {
|
|
|
3511
3647
|
import {
|
|
3512
3648
|
FormOfPaymentType
|
|
3513
3649
|
} from "@funkit/api-base";
|
|
3514
|
-
import { getFopsLimit } from "@funkit/connect-core";
|
|
3650
|
+
import { getFopsLimit, getFormOfPaymentDisplayName } from "@funkit/connect-core";
|
|
3515
3651
|
var BANK_TRANSFER_TIME = "1-2 days";
|
|
3516
3652
|
function toFopRows(fops, exchangeRates) {
|
|
3517
3653
|
return fops.map((fop) => {
|
|
@@ -3519,8 +3655,7 @@ function toFopRows(fops, exchangeRates) {
|
|
|
3519
3655
|
const subtitle = fop.fopType === FormOfPaymentType.BANK_TRANSFER ? `${limit} \xB7 ${BANK_TRANSFER_TIME}` : limit;
|
|
3520
3656
|
return {
|
|
3521
3657
|
id: `${fop.fopType}:${fop.name}`,
|
|
3522
|
-
name: fop
|
|
3523
|
-
iconUri: fop.iconImageUrl,
|
|
3658
|
+
name: getFormOfPaymentDisplayName(fop),
|
|
3524
3659
|
subtitle,
|
|
3525
3660
|
disabled: !fop.embeddedFlowUrl
|
|
3526
3661
|
};
|
|
@@ -3529,8 +3664,7 @@ function toFopRows(fops, exchangeRates) {
|
|
|
3529
3664
|
function toWithdrawFopRows(fops) {
|
|
3530
3665
|
return fops.map((fop) => ({
|
|
3531
3666
|
id: `${fop.fopType}:${fop.name}`,
|
|
3532
|
-
name: fop
|
|
3533
|
-
iconUri: fop.iconImageUrl,
|
|
3667
|
+
name: getFormOfPaymentDisplayName(fop),
|
|
3534
3668
|
subtitle: fop.fopType === FormOfPaymentType.BANK_TRANSFER ? BANK_TRANSFER_TIME : "Instant",
|
|
3535
3669
|
disabled: !fop.embeddedFlowUrl
|
|
3536
3670
|
}));
|
|
@@ -3547,6 +3681,23 @@ function formatDepositAddress(address, leading = 6, trailing = 6) {
|
|
|
3547
3681
|
return `${address.slice(0, leading)}\u2026${address.slice(-trailing)}`;
|
|
3548
3682
|
}
|
|
3549
3683
|
|
|
3684
|
+
// src/transfer/hooks/useFiatExchangeRates.ts
|
|
3685
|
+
import { getFiatExchangeRates } from "@funkit/api-base";
|
|
3686
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3687
|
+
function useFiatExchangeRates(enabled = true) {
|
|
3688
|
+
const { data, isLoading, error } = useQuery({
|
|
3689
|
+
queryKey: ["fiatExchangeRates"],
|
|
3690
|
+
queryFn: () => getFiatExchangeRates({ logger }),
|
|
3691
|
+
refetchOnMount: false,
|
|
3692
|
+
refetchOnReconnect: false,
|
|
3693
|
+
refetchOnWindowFocus: false,
|
|
3694
|
+
gcTime: 1e3 * 60 * 60,
|
|
3695
|
+
// 1 hour
|
|
3696
|
+
enabled
|
|
3697
|
+
});
|
|
3698
|
+
return { data, isLoading, error };
|
|
3699
|
+
}
|
|
3700
|
+
|
|
3550
3701
|
// src/transfer/hooks/useFops.ts
|
|
3551
3702
|
import {
|
|
3552
3703
|
getFops
|
|
@@ -3563,7 +3714,7 @@ import {
|
|
|
3563
3714
|
useSwappedDefaultCurrencyQuery
|
|
3564
3715
|
} from "@funkit/connect-core";
|
|
3565
3716
|
import { useTheme as useTheme3 } from "@shopify/restyle";
|
|
3566
|
-
import { useQuery as
|
|
3717
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
3567
3718
|
import { useMemo as useMemo6 } from "react";
|
|
3568
3719
|
|
|
3569
3720
|
// src/identity/IdentityContext.tsx
|
|
@@ -3576,7 +3727,7 @@ function isMallardApiKey(apiKey) {
|
|
|
3576
3727
|
}
|
|
3577
3728
|
|
|
3578
3729
|
// src/identity/IdentityContext.tsx
|
|
3579
|
-
import { jsx as
|
|
3730
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
3580
3731
|
function generateSyntheticUserId(apiKey, externalUserId) {
|
|
3581
3732
|
if (isMallardApiKey(apiKey)) {
|
|
3582
3733
|
return externalUserId;
|
|
@@ -3598,7 +3749,7 @@ function FunkitIdentityProvider({
|
|
|
3598
3749
|
identity,
|
|
3599
3750
|
children
|
|
3600
3751
|
}) {
|
|
3601
|
-
return /* @__PURE__ */
|
|
3752
|
+
return /* @__PURE__ */ jsx24(FunkitIdentityContext.Provider, { value: identity, children });
|
|
3602
3753
|
}
|
|
3603
3754
|
function useFunkitIdentity() {
|
|
3604
3755
|
const identity = useContext2(FunkitIdentityContext);
|
|
@@ -3617,7 +3768,7 @@ import {
|
|
|
3617
3768
|
import {
|
|
3618
3769
|
getCheckoutTokenTransferParams
|
|
3619
3770
|
} from "@funkit/connect-core";
|
|
3620
|
-
import { useQuery } from "@tanstack/react-query";
|
|
3771
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
3621
3772
|
|
|
3622
3773
|
// src/transfer/hooks/useUDAParams.ts
|
|
3623
3774
|
import { useMemo as useMemo5 } from "react";
|
|
@@ -3647,7 +3798,7 @@ function useTransferInit({
|
|
|
3647
3798
|
recipientAddr: resolvedRecipient,
|
|
3648
3799
|
udaParams
|
|
3649
3800
|
});
|
|
3650
|
-
const { data, isLoading, isFetching } =
|
|
3801
|
+
const { data, isLoading, isFetching } = useQuery2({
|
|
3651
3802
|
queryKey: ["initializeCheckoutTokenTransferAddress", params],
|
|
3652
3803
|
queryFn: ({ queryKey: [, queryParams] }) => queryParams ? initializeCheckoutTokenTransferAddress({
|
|
3653
3804
|
...queryParams,
|
|
@@ -3704,7 +3855,7 @@ function useFops({
|
|
|
3704
3855
|
const targetChain = checkoutConfig?.targetChain;
|
|
3705
3856
|
const recipientAddress = targetChain ? getDepositAddressForChain(Number(targetChain), transferInit) : void 0;
|
|
3706
3857
|
const isEnabled = enabled && isSwappedEnabled && !!apiKey && !!targetAsset && !!targetChain && !!recipientAddress && !!transferInit && !isSwappedCurrencyCodeLoading;
|
|
3707
|
-
const query =
|
|
3858
|
+
const query = useQuery3({
|
|
3708
3859
|
queryKey: [
|
|
3709
3860
|
"fops",
|
|
3710
3861
|
userId,
|
|
@@ -3792,25 +3943,6 @@ import { useTheme as useTheme4 } from "@shopify/restyle";
|
|
|
3792
3943
|
import { useStatsigClient } from "@statsig/react-bindings";
|
|
3793
3944
|
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
3794
3945
|
import { useMemo as useMemo7 } from "react";
|
|
3795
|
-
|
|
3796
|
-
// src/transfer/hooks/useFiatExchangeRates.ts
|
|
3797
|
-
import { getFiatExchangeRates } from "@funkit/api-base";
|
|
3798
|
-
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
3799
|
-
function useFiatExchangeRates(enabled = true) {
|
|
3800
|
-
const { data, isLoading, error } = useQuery3({
|
|
3801
|
-
queryKey: ["fiatExchangeRates"],
|
|
3802
|
-
queryFn: () => getFiatExchangeRates({ logger }),
|
|
3803
|
-
refetchOnMount: false,
|
|
3804
|
-
refetchOnReconnect: false,
|
|
3805
|
-
refetchOnWindowFocus: false,
|
|
3806
|
-
gcTime: 1e3 * 60 * 60,
|
|
3807
|
-
// 1 hour
|
|
3808
|
-
enabled
|
|
3809
|
-
});
|
|
3810
|
-
return { data, isLoading, error };
|
|
3811
|
-
}
|
|
3812
|
-
|
|
3813
|
-
// src/transfer/hooks/useWithdrawalFops.ts
|
|
3814
3946
|
var WITHDRAW_FOPS_QUERY_KEY = "withdrawFops";
|
|
3815
3947
|
function useWithdrawalRoute(config) {
|
|
3816
3948
|
const sourceOverrides = useDynamicConfig("swappedwithdrawalsourceoverrides");
|
|
@@ -4011,7 +4143,7 @@ import {
|
|
|
4011
4143
|
processFiatWithdrawalOrder,
|
|
4012
4144
|
toFiatWithdrawalOrder
|
|
4013
4145
|
} from "@funkit/connect-core";
|
|
4014
|
-
import { useCallback as useCallback6, useRef as
|
|
4146
|
+
import { useCallback as useCallback6, useRef as useRef6 } from "react";
|
|
4015
4147
|
|
|
4016
4148
|
// src/withdrawal/publicClient.ts
|
|
4017
4149
|
import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO } from "@funkit/chains";
|
|
@@ -4039,7 +4171,7 @@ function useWithdrawalExecution({
|
|
|
4039
4171
|
onError
|
|
4040
4172
|
}) {
|
|
4041
4173
|
const { apiKey, userId } = useFunkitIdentity();
|
|
4042
|
-
const isProcessingRef =
|
|
4174
|
+
const isProcessingRef = useRef6(false);
|
|
4043
4175
|
const executeOrder = useCallback6(
|
|
4044
4176
|
async (data) => {
|
|
4045
4177
|
const order = toFiatWithdrawalOrder(data);
|
|
@@ -4244,9 +4376,9 @@ function useTokenTransfer({
|
|
|
4244
4376
|
|
|
4245
4377
|
// src/transfer/QrCode.tsx
|
|
4246
4378
|
import QRCode from "react-native-qrcode-svg";
|
|
4247
|
-
import { jsx as
|
|
4379
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
4248
4380
|
function QrCode({ value, size = 220, ecl = "H" }) {
|
|
4249
|
-
return /* @__PURE__ */
|
|
4381
|
+
return /* @__PURE__ */ jsx25(
|
|
4250
4382
|
QRCode,
|
|
4251
4383
|
{
|
|
4252
4384
|
value,
|
|
@@ -4270,9 +4402,9 @@ function getDefaultDynamicTargetAsset(candidates, dynamicRoutingId) {
|
|
|
4270
4402
|
import {
|
|
4271
4403
|
useCallback as useCallback7,
|
|
4272
4404
|
useEffect as useEffect10,
|
|
4273
|
-
useRef as
|
|
4405
|
+
useRef as useRef7
|
|
4274
4406
|
} from "react";
|
|
4275
|
-
import { View as
|
|
4407
|
+
import { View as View3 } from "react-native";
|
|
4276
4408
|
import {
|
|
4277
4409
|
BottomSheetBackdrop,
|
|
4278
4410
|
BottomSheetModal,
|
|
@@ -4283,10 +4415,10 @@ import {
|
|
|
4283
4415
|
import { Easing as Easing4 } from "react-native-reanimated";
|
|
4284
4416
|
|
|
4285
4417
|
// src/flow/useKeyboardHeight.ts
|
|
4286
|
-
import { useEffect as useEffect9, useState as
|
|
4418
|
+
import { useEffect as useEffect9, useState as useState9 } from "react";
|
|
4287
4419
|
import { Keyboard, Platform } from "react-native";
|
|
4288
4420
|
function useKeyboardHeight(enabled) {
|
|
4289
|
-
const [height, setHeight] =
|
|
4421
|
+
const [height, setHeight] = useState9(0);
|
|
4290
4422
|
useEffect9(() => {
|
|
4291
4423
|
if (!enabled) {
|
|
4292
4424
|
setHeight(0);
|
|
@@ -4308,7 +4440,7 @@ function useKeyboardHeight(enabled) {
|
|
|
4308
4440
|
}
|
|
4309
4441
|
|
|
4310
4442
|
// src/flow/FlowSheet.tsx
|
|
4311
|
-
import { jsx as
|
|
4443
|
+
import { jsx as jsx26, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
4312
4444
|
function FlowSheet({
|
|
4313
4445
|
isOpen,
|
|
4314
4446
|
session,
|
|
@@ -4317,13 +4449,13 @@ function FlowSheet({
|
|
|
4317
4449
|
children,
|
|
4318
4450
|
keyboardAvoidEnabled = false
|
|
4319
4451
|
}) {
|
|
4320
|
-
const ref =
|
|
4452
|
+
const ref = useRef7(null);
|
|
4321
4453
|
const setRef = useCallback7((instance) => {
|
|
4322
4454
|
ref.current = instance;
|
|
4323
4455
|
}, []);
|
|
4324
4456
|
const keyboardHeight = useKeyboardHeight(keyboardAvoidEnabled);
|
|
4325
|
-
const hasPresented =
|
|
4326
|
-
const sheetSelfDismissed =
|
|
4457
|
+
const hasPresented = useRef7(false);
|
|
4458
|
+
const sheetSelfDismissed = useRef7(false);
|
|
4327
4459
|
useEffect10(() => {
|
|
4328
4460
|
if (isOpen) {
|
|
4329
4461
|
sheetSelfDismissed.current = false;
|
|
@@ -4348,7 +4480,7 @@ function FlowSheet({
|
|
|
4348
4480
|
easing: Easing4.bezier(0.22, 1, 0.36, 1)
|
|
4349
4481
|
});
|
|
4350
4482
|
const renderBackdrop = useCallback7(
|
|
4351
|
-
(props) => /* @__PURE__ */
|
|
4483
|
+
(props) => /* @__PURE__ */ jsx26(
|
|
4352
4484
|
BottomSheetBackdrop,
|
|
4353
4485
|
{
|
|
4354
4486
|
...props,
|
|
@@ -4361,7 +4493,7 @@ function FlowSheet({
|
|
|
4361
4493
|
);
|
|
4362
4494
|
return /* @__PURE__ */ jsxs10(BottomSheetModalProvider, { children: [
|
|
4363
4495
|
children,
|
|
4364
|
-
/* @__PURE__ */
|
|
4496
|
+
/* @__PURE__ */ jsx26(
|
|
4365
4497
|
BottomSheetModal,
|
|
4366
4498
|
{
|
|
4367
4499
|
ref: setRef,
|
|
@@ -4375,7 +4507,7 @@ function FlowSheet({
|
|
|
4375
4507
|
backgroundComponent: FlowSheetBackground,
|
|
4376
4508
|
children: /* @__PURE__ */ jsxs10(BottomSheetView, { children: [
|
|
4377
4509
|
content3,
|
|
4378
|
-
keyboardHeight > 0 ? /* @__PURE__ */
|
|
4510
|
+
keyboardHeight > 0 ? /* @__PURE__ */ jsx26(View3, { style: { height: keyboardHeight } }) : null
|
|
4379
4511
|
] })
|
|
4380
4512
|
}
|
|
4381
4513
|
)
|
|
@@ -4395,7 +4527,7 @@ function FlowSheetBackground({
|
|
|
4395
4527
|
...bottomExtension,
|
|
4396
4528
|
backgroundColor: theme.background.modal
|
|
4397
4529
|
};
|
|
4398
|
-
return /* @__PURE__ */
|
|
4530
|
+
return /* @__PURE__ */ jsx26(View3, { pointerEvents, style: [style, surface], children: /* @__PURE__ */ jsx26(View3, { style: extension }) });
|
|
4399
4531
|
}
|
|
4400
4532
|
var bottomExtension = {
|
|
4401
4533
|
position: "absolute",
|
|
@@ -4406,7 +4538,7 @@ var bottomExtension = {
|
|
|
4406
4538
|
};
|
|
4407
4539
|
|
|
4408
4540
|
// src/flow/FunkitFlowProvider.tsx
|
|
4409
|
-
import { Fragment as Fragment2, jsx as
|
|
4541
|
+
import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4410
4542
|
var CLOSED = {
|
|
4411
4543
|
isOpen: false,
|
|
4412
4544
|
stack: [],
|
|
@@ -4418,8 +4550,8 @@ function FunkitFlowProvider({
|
|
|
4418
4550
|
children,
|
|
4419
4551
|
copyToClipboard: copyToClipboard2 = copyToClipboard
|
|
4420
4552
|
}) {
|
|
4421
|
-
const insets =
|
|
4422
|
-
const [state, setState] =
|
|
4553
|
+
const insets = useSafeAreaInsets3();
|
|
4554
|
+
const [state, setState] = useState10(CLOSED);
|
|
4423
4555
|
const beginDeposit = useCallback8(
|
|
4424
4556
|
(config, callbacks = {}) => {
|
|
4425
4557
|
callbacks.onOpen?.();
|
|
@@ -4483,12 +4615,12 @@ function FunkitFlowProvider({
|
|
|
4483
4615
|
() => ({ navigate, back, reset, closeFlow }),
|
|
4484
4616
|
[navigate, back, reset, closeFlow]
|
|
4485
4617
|
);
|
|
4486
|
-
const [toastMounted, setToastMounted] =
|
|
4487
|
-
const [copiedToastShown, setCopiedToastShown] =
|
|
4488
|
-
const hideTimerRef =
|
|
4618
|
+
const [toastMounted, setToastMounted] = useState10(false);
|
|
4619
|
+
const [copiedToastShown, setCopiedToastShown] = useState10(false);
|
|
4620
|
+
const hideTimerRef = useRef8(
|
|
4489
4621
|
void 0
|
|
4490
4622
|
);
|
|
4491
|
-
const unmountTimerRef =
|
|
4623
|
+
const unmountTimerRef = useRef8(
|
|
4492
4624
|
void 0
|
|
4493
4625
|
);
|
|
4494
4626
|
const showCopiedToast = useCallback8(() => {
|
|
@@ -4505,8 +4637,8 @@ function FunkitFlowProvider({
|
|
|
4505
4637
|
}, TOAST_VISIBLE_MS);
|
|
4506
4638
|
}, []);
|
|
4507
4639
|
useEffect11(() => () => clearToast(), [clearToast]);
|
|
4508
|
-
return /* @__PURE__ */
|
|
4509
|
-
/* @__PURE__ */
|
|
4640
|
+
return /* @__PURE__ */ jsx27(FunkitFlowContext.Provider, { value, children: /* @__PURE__ */ jsxs11(View4, { style: rootContainer, children: [
|
|
4641
|
+
/* @__PURE__ */ jsx27(
|
|
4510
4642
|
FlowSheet,
|
|
4511
4643
|
{
|
|
4512
4644
|
isOpen: state.isOpen,
|
|
@@ -4515,7 +4647,7 @@ function FunkitFlowProvider({
|
|
|
4515
4647
|
keyboardAvoidEnabled: current === "swapped",
|
|
4516
4648
|
content: (
|
|
4517
4649
|
// Mounted only while open so the flow queries run only then.
|
|
4518
|
-
state.isOpen && state.flow ? state.flow.mode === "deposit" ? /* @__PURE__ */
|
|
4650
|
+
state.isOpen && state.flow ? state.flow.mode === "deposit" ? /* @__PURE__ */ jsx27(
|
|
4519
4651
|
FlowContent,
|
|
4520
4652
|
{
|
|
4521
4653
|
config: state.flow.config,
|
|
@@ -4525,7 +4657,7 @@ function FunkitFlowProvider({
|
|
|
4525
4657
|
onCopySuccess: showCopiedToast,
|
|
4526
4658
|
callbacks: state.flow.callbacks
|
|
4527
4659
|
}
|
|
4528
|
-
) : /* @__PURE__ */
|
|
4660
|
+
) : /* @__PURE__ */ jsx27(
|
|
4529
4661
|
WithdrawalFlowContent,
|
|
4530
4662
|
{
|
|
4531
4663
|
config: state.flow.config,
|
|
@@ -4538,15 +4670,15 @@ function FunkitFlowProvider({
|
|
|
4538
4670
|
children
|
|
4539
4671
|
}
|
|
4540
4672
|
),
|
|
4541
|
-
toastMounted ? /* @__PURE__ */
|
|
4542
|
-
|
|
4673
|
+
toastMounted ? /* @__PURE__ */ jsx27(
|
|
4674
|
+
View4,
|
|
4543
4675
|
{
|
|
4544
4676
|
style: [
|
|
4545
4677
|
toastOverlay,
|
|
4546
4678
|
{ paddingTop: insets.top + TOAST_INSET_OFFSET }
|
|
4547
4679
|
],
|
|
4548
4680
|
pointerEvents: "none",
|
|
4549
|
-
children: copiedToastShown ? /* @__PURE__ */
|
|
4681
|
+
children: copiedToastShown ? /* @__PURE__ */ jsx27(AddressCopiedToast, {}) : null
|
|
4550
4682
|
}
|
|
4551
4683
|
) : null
|
|
4552
4684
|
] }) });
|
|
@@ -4570,8 +4702,8 @@ function FlowContent({
|
|
|
4570
4702
|
const { isGeoblocked, isLoadingGeoCheck } = useCheckoutBlocked({
|
|
4571
4703
|
onCheckoutBlocked: callbacks.onCheckoutBlocked
|
|
4572
4704
|
});
|
|
4573
|
-
const [selectedNetworkId, setSelectedNetworkId] =
|
|
4574
|
-
const [selectedCandidate, setSelectedCandidate] =
|
|
4705
|
+
const [selectedNetworkId, setSelectedNetworkId] = useState10();
|
|
4706
|
+
const [selectedCandidate, setSelectedCandidate] = useState10(
|
|
4575
4707
|
() => getDefaultDynamicTargetAsset(
|
|
4576
4708
|
config.dynamicTargetAssetCandidates,
|
|
4577
4709
|
config.dynamicRoutingId
|
|
@@ -4624,8 +4756,9 @@ function FlowContent({
|
|
|
4624
4756
|
checkoutConfig: activeCheckoutConfig,
|
|
4625
4757
|
dynamicRoutingId: activeDynamicRoutingId
|
|
4626
4758
|
});
|
|
4759
|
+
const { data: exchangeRates } = useFiatExchangeRates(isSwappedEnabled);
|
|
4627
4760
|
const { isLoading: isStatsigLoading } = useStatsigClient2();
|
|
4628
|
-
const [selectedSwappedUrl, setSelectedSwappedUrl] =
|
|
4761
|
+
const [selectedSwappedUrl, setSelectedSwappedUrl] = useState10();
|
|
4629
4762
|
const availableChains = buildAvailableChains({
|
|
4630
4763
|
chainFilters: tokenChainFilters,
|
|
4631
4764
|
networkChainId: selectedChainId,
|
|
@@ -4648,8 +4781,8 @@ function FlowContent({
|
|
|
4648
4781
|
},
|
|
4649
4782
|
[copyToClipboard2, onCopySuccess]
|
|
4650
4783
|
);
|
|
4651
|
-
const nestedSheetRef =
|
|
4652
|
-
const [nestedScreen, setNestedScreen] =
|
|
4784
|
+
const nestedSheetRef = useRef8(null);
|
|
4785
|
+
const [nestedScreen, setNestedScreen] = useState10(null);
|
|
4653
4786
|
const openNestedScreen = useCallback8((screen2) => {
|
|
4654
4787
|
setNestedScreen(screen2);
|
|
4655
4788
|
}, []);
|
|
@@ -4662,7 +4795,7 @@ function FlowContent({
|
|
|
4662
4795
|
nestedSheetRef.current?.dismiss();
|
|
4663
4796
|
}, []);
|
|
4664
4797
|
const renderNestedBackdrop = useCallback8(
|
|
4665
|
-
(props) => /* @__PURE__ */
|
|
4798
|
+
(props) => /* @__PURE__ */ jsx27(
|
|
4666
4799
|
BottomSheetBackdrop2,
|
|
4667
4800
|
{
|
|
4668
4801
|
...props,
|
|
@@ -4684,8 +4817,8 @@ function FlowContent({
|
|
|
4684
4817
|
id: CRYPTO_METHOD_ID,
|
|
4685
4818
|
title: "Crypto",
|
|
4686
4819
|
subtitle: "No limit",
|
|
4687
|
-
icon: /* @__PURE__ */
|
|
4688
|
-
trailing: cryptoSourceIcons.length ? /* @__PURE__ */
|
|
4820
|
+
icon: /* @__PURE__ */ jsx27(CryptoBitcoinIcon, {}),
|
|
4821
|
+
trailing: cryptoSourceIcons.length ? /* @__PURE__ */ jsx27(
|
|
4689
4822
|
SourceTokenCluster,
|
|
4690
4823
|
{
|
|
4691
4824
|
icons: cryptoSourceIcons,
|
|
@@ -4694,11 +4827,11 @@ function FlowContent({
|
|
|
4694
4827
|
) : void 0
|
|
4695
4828
|
}
|
|
4696
4829
|
];
|
|
4697
|
-
const toCashRows = (fops) => toFopRows(fops).map((row3) => ({
|
|
4830
|
+
const toCashRows = (fops) => toFopRows(fops, exchangeRates).map((row3, i) => ({
|
|
4698
4831
|
id: row3.id,
|
|
4699
4832
|
title: row3.name,
|
|
4700
4833
|
subtitle: row3.subtitle,
|
|
4701
|
-
icon: /* @__PURE__ */
|
|
4834
|
+
icon: /* @__PURE__ */ jsx27(PaymentMethodIcon, { fop: fops[i] })
|
|
4702
4835
|
}));
|
|
4703
4836
|
const methods = isSwappedEnabled ? [
|
|
4704
4837
|
...toCashRows(savedFops),
|
|
@@ -4710,11 +4843,11 @@ function FlowContent({
|
|
|
4710
4843
|
(c, i) => ({
|
|
4711
4844
|
id: String(i),
|
|
4712
4845
|
label: c.badgeText ? `${c.tokenSymbol} (${c.badgeText})` : c.tokenSymbol,
|
|
4713
|
-
icon: /* @__PURE__ */
|
|
4846
|
+
icon: /* @__PURE__ */ jsx27(TokenChainIcon, { symbol: c.tokenSymbol, iconSrc: c.iconSrc })
|
|
4714
4847
|
})
|
|
4715
4848
|
);
|
|
4716
4849
|
const selectedReceiveTokenId = selectedCandidate && candidates ? String(candidates.indexOf(selectedCandidate)) : void 0;
|
|
4717
|
-
return /* @__PURE__ */
|
|
4850
|
+
return /* @__PURE__ */ jsx27(
|
|
4718
4851
|
SelectMethodScreen,
|
|
4719
4852
|
{
|
|
4720
4853
|
methods,
|
|
@@ -4754,7 +4887,7 @@ function FlowContent({
|
|
|
4754
4887
|
label: chain.label,
|
|
4755
4888
|
iconKeys: chain.iconKeys ?? []
|
|
4756
4889
|
}));
|
|
4757
|
-
return /* @__PURE__ */
|
|
4890
|
+
return /* @__PURE__ */ jsx27(
|
|
4758
4891
|
TransferCryptoScreen,
|
|
4759
4892
|
{
|
|
4760
4893
|
depositAddress: displayAddress,
|
|
@@ -4772,7 +4905,7 @@ function FlowContent({
|
|
|
4772
4905
|
);
|
|
4773
4906
|
}
|
|
4774
4907
|
case "swapped":
|
|
4775
|
-
return selectedSwappedUrl ? /* @__PURE__ */
|
|
4908
|
+
return selectedSwappedUrl ? /* @__PURE__ */ jsx27(
|
|
4776
4909
|
SwappedScreen,
|
|
4777
4910
|
{
|
|
4778
4911
|
url: selectedSwappedUrl,
|
|
@@ -4787,7 +4920,7 @@ function FlowContent({
|
|
|
4787
4920
|
const bottomSheetScreen = (() => {
|
|
4788
4921
|
switch (nestedScreen) {
|
|
4789
4922
|
case "availableChains":
|
|
4790
|
-
return /* @__PURE__ */
|
|
4923
|
+
return /* @__PURE__ */ jsx27(
|
|
4791
4924
|
AvailableChainsScreen,
|
|
4792
4925
|
{
|
|
4793
4926
|
networkLabel: selectedChain?.label ?? "",
|
|
@@ -4796,11 +4929,11 @@ function FlowContent({
|
|
|
4796
4929
|
}
|
|
4797
4930
|
);
|
|
4798
4931
|
case "qrCode":
|
|
4799
|
-
return /* @__PURE__ */
|
|
4932
|
+
return /* @__PURE__ */ jsx27(
|
|
4800
4933
|
QrCodeScreen,
|
|
4801
4934
|
{
|
|
4802
|
-
qrCode: config.qrCode ?? (qrCodeUri ? /* @__PURE__ */
|
|
4803
|
-
centerIcon: /* @__PURE__ */
|
|
4935
|
+
qrCode: config.qrCode ?? (qrCodeUri ? /* @__PURE__ */ jsx27(QrCode, { value: qrCodeUri, size: 235 }) : null),
|
|
4936
|
+
centerIcon: /* @__PURE__ */ jsx27(QrChainCluster, { iconKeys: selectedChain?.iconKeys ?? [] }),
|
|
4804
4937
|
address: rawAddress,
|
|
4805
4938
|
onCopyAddress: rawAddress ? () => copyAddressAndToast(rawAddress) : void 0,
|
|
4806
4939
|
onClose: closeNestedScreen
|
|
@@ -4811,11 +4944,11 @@ function FlowContent({
|
|
|
4811
4944
|
}
|
|
4812
4945
|
})();
|
|
4813
4946
|
if (isGeoblocked) {
|
|
4814
|
-
return /* @__PURE__ */
|
|
4947
|
+
return /* @__PURE__ */ jsx27(CheckoutBlockedScreen, {});
|
|
4815
4948
|
}
|
|
4816
4949
|
return /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
4817
4950
|
screen,
|
|
4818
|
-
/* @__PURE__ */
|
|
4951
|
+
/* @__PURE__ */ jsx27(
|
|
4819
4952
|
BottomSheetModal2,
|
|
4820
4953
|
{
|
|
4821
4954
|
ref: nestedSheetRef,
|
|
@@ -4824,7 +4957,7 @@ function FlowContent({
|
|
|
4824
4957
|
backgroundComponent: FlowSheetBackground,
|
|
4825
4958
|
backdropComponent: renderNestedBackdrop,
|
|
4826
4959
|
onDismiss: () => setNestedScreen(null),
|
|
4827
|
-
children: /* @__PURE__ */
|
|
4960
|
+
children: /* @__PURE__ */ jsx27(BottomSheetView2, { children: bottomSheetScreen })
|
|
4828
4961
|
}
|
|
4829
4962
|
)
|
|
4830
4963
|
] });
|
|
@@ -4848,8 +4981,8 @@ function WithdrawalFlowContent({
|
|
|
4848
4981
|
refetch,
|
|
4849
4982
|
route
|
|
4850
4983
|
} = useWithdrawalFops({ config });
|
|
4851
|
-
const [selectedFop, setSelectedFop] =
|
|
4852
|
-
const [hasExecutionError, setHasExecutionError] =
|
|
4984
|
+
const [selectedFop, setSelectedFop] = useState10();
|
|
4985
|
+
const [hasExecutionError, setHasExecutionError] = useState10(false);
|
|
4853
4986
|
const onExecutionError = useCallback8(() => setHasExecutionError(true), []);
|
|
4854
4987
|
const { executeOrder } = useWithdrawalExecution({
|
|
4855
4988
|
config,
|
|
@@ -4861,10 +4994,10 @@ function WithdrawalFlowContent({
|
|
|
4861
4994
|
void queryClient.invalidateQueries({ queryKey: [WITHDRAW_FOPS_QUERY_KEY] });
|
|
4862
4995
|
}, [queryClient]);
|
|
4863
4996
|
if (isGeoblocked) {
|
|
4864
|
-
return /* @__PURE__ */
|
|
4997
|
+
return /* @__PURE__ */ jsx27(CheckoutBlockedScreen, {});
|
|
4865
4998
|
}
|
|
4866
4999
|
if (hasExecutionError) {
|
|
4867
|
-
return /* @__PURE__ */
|
|
5000
|
+
return /* @__PURE__ */ jsx27(
|
|
4868
5001
|
WithdrawMethodScreen,
|
|
4869
5002
|
{
|
|
4870
5003
|
title: config.title,
|
|
@@ -4886,10 +5019,10 @@ function WithdrawalFlowContent({
|
|
|
4886
5019
|
id: String(i),
|
|
4887
5020
|
title: row3.name,
|
|
4888
5021
|
subtitle: row3.subtitle,
|
|
4889
|
-
icon: /* @__PURE__ */
|
|
5022
|
+
icon: /* @__PURE__ */ jsx27(PaymentMethodIcon, { fop: fops[i] })
|
|
4890
5023
|
})
|
|
4891
5024
|
);
|
|
4892
|
-
return /* @__PURE__ */
|
|
5025
|
+
return /* @__PURE__ */ jsx27(
|
|
4893
5026
|
WithdrawMethodScreen,
|
|
4894
5027
|
{
|
|
4895
5028
|
title: config.title,
|
|
@@ -4913,7 +5046,7 @@ function WithdrawalFlowContent({
|
|
|
4913
5046
|
);
|
|
4914
5047
|
}
|
|
4915
5048
|
case "swapped":
|
|
4916
|
-
return selectedFop?.embeddedFlowUrl ? /* @__PURE__ */
|
|
5049
|
+
return selectedFop?.embeddedFlowUrl ? /* @__PURE__ */ jsx27(
|
|
4917
5050
|
SwappedWithdrawScreen,
|
|
4918
5051
|
{
|
|
4919
5052
|
url: selectedFop.embeddedFlowUrl,
|
|
@@ -4968,7 +5101,7 @@ function useFunkitFlow() {
|
|
|
4968
5101
|
}
|
|
4969
5102
|
|
|
4970
5103
|
// src/version.ts
|
|
4971
|
-
var CONNECT_RN_VERSION = true ? "3.
|
|
5104
|
+
var CONNECT_RN_VERSION = true ? "3.1.0" : "0.0.0-dev";
|
|
4972
5105
|
|
|
4973
5106
|
// src/providers/FunkitStatsigProvider.tsx
|
|
4974
5107
|
import {
|
|
@@ -5161,7 +5294,7 @@ function useClientAsyncInitRN(sdkKey, initialUser, statsigOptions = null) {
|
|
|
5161
5294
|
}
|
|
5162
5295
|
|
|
5163
5296
|
// src/providers/FunkitStatsigProvider.tsx
|
|
5164
|
-
import { jsx as
|
|
5297
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
5165
5298
|
var STATSIG_API = "https://data-api.fun.xyz/v1";
|
|
5166
5299
|
var STATSIG_CLIENT_KEY = "client-UmFd8WIJljA7cLmZuDqs3X25M8sKd5WIQP4BSC2bRbM";
|
|
5167
5300
|
var STATSIG_SDK_TYPE = "react-native";
|
|
@@ -5197,11 +5330,11 @@ function FunkitStatsigProvider({
|
|
|
5197
5330
|
tier: isDevelopment ? "development" : "production"
|
|
5198
5331
|
}
|
|
5199
5332
|
});
|
|
5200
|
-
return /* @__PURE__ */
|
|
5333
|
+
return /* @__PURE__ */ jsx28(StatsigProvider, { client, children });
|
|
5201
5334
|
}
|
|
5202
5335
|
|
|
5203
5336
|
// src/providers/FunkitProvider.tsx
|
|
5204
|
-
import { jsx as
|
|
5337
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
5205
5338
|
var ANONYMOUS_CONFIG = { apiKey: "" };
|
|
5206
5339
|
var IS_DEV_BUILD = typeof __DEV__ !== "undefined" && !!__DEV__;
|
|
5207
5340
|
function createFallbackQueryClient() {
|
|
@@ -5223,7 +5356,7 @@ function FunkitProvider({
|
|
|
5223
5356
|
debug = IS_DEV_BUILD,
|
|
5224
5357
|
copyToClipboard: copyToClipboard2
|
|
5225
5358
|
}) {
|
|
5226
|
-
const fallbackClient =
|
|
5359
|
+
const fallbackClient = useRef9(void 0);
|
|
5227
5360
|
fallbackClient.current ??= createFallbackQueryClient();
|
|
5228
5361
|
const client = queryClient ?? fallbackClient.current;
|
|
5229
5362
|
const identity = useMemo11(
|
|
@@ -5245,13 +5378,13 @@ function FunkitProvider({
|
|
|
5245
5378
|
""
|
|
5246
5379
|
);
|
|
5247
5380
|
}, [identity]);
|
|
5248
|
-
return /* @__PURE__ */
|
|
5381
|
+
return /* @__PURE__ */ jsx29(SafeAreaProvider, { children: /* @__PURE__ */ jsx29(
|
|
5249
5382
|
FunkitStatsigProvider,
|
|
5250
5383
|
{
|
|
5251
5384
|
apiKey: identity.apiKey,
|
|
5252
5385
|
userId: identity.userId,
|
|
5253
5386
|
isDevelopment: debug,
|
|
5254
|
-
children: /* @__PURE__ */
|
|
5387
|
+
children: /* @__PURE__ */ jsx29(QueryClientProvider, { client, children: /* @__PURE__ */ jsx29(FunkitIdentityProvider, { identity, children: /* @__PURE__ */ jsx29(FunkitThemeProvider, { themes, colorScheme, children: /* @__PURE__ */ jsx29(FunkitFlowProvider, { copyToClipboard: copyToClipboard2, children }) }) }) })
|
|
5255
5388
|
}
|
|
5256
5389
|
) });
|
|
5257
5390
|
}
|
|
@@ -5270,6 +5403,90 @@ function useFunkitCheckout(callbacks = {}) {
|
|
|
5270
5403
|
);
|
|
5271
5404
|
return { beginDeposit, beginWithdrawal };
|
|
5272
5405
|
}
|
|
5406
|
+
|
|
5407
|
+
// src/history/useRecentDeposits.ts
|
|
5408
|
+
import {
|
|
5409
|
+
processRecentDepositsForNotifications,
|
|
5410
|
+
purifyCheckoutHistoryItem,
|
|
5411
|
+
useRecentDepositsApiQuery
|
|
5412
|
+
} from "@funkit/connect-core";
|
|
5413
|
+
import { useMemo as useMemo12 } from "react";
|
|
5414
|
+
function useFunkitRecentDeposits({
|
|
5415
|
+
isVisible,
|
|
5416
|
+
fetchSize = 5,
|
|
5417
|
+
cutOffTimeMs,
|
|
5418
|
+
memoizedFilterFunc
|
|
5419
|
+
}) {
|
|
5420
|
+
const { apiKey, userId } = useFunkitIdentity();
|
|
5421
|
+
const { listRefresh } = useDynamicConfig(
|
|
5422
|
+
"checkoutnotificationsrefreshinterval"
|
|
5423
|
+
);
|
|
5424
|
+
const effectiveUserId = userId === "0x" ? "" : userId;
|
|
5425
|
+
const { data: directExecutions } = useRecentDepositsApiQuery({
|
|
5426
|
+
isVisible,
|
|
5427
|
+
apiKey,
|
|
5428
|
+
userId: effectiveUserId,
|
|
5429
|
+
refreshIntervalMs: listRefresh,
|
|
5430
|
+
fetchSize: fetchSize * 2,
|
|
5431
|
+
// over-fetch to account for merging
|
|
5432
|
+
logger
|
|
5433
|
+
});
|
|
5434
|
+
const mergedDirectExecutions = useMemo12(
|
|
5435
|
+
() => processRecentDepositsForNotifications(
|
|
5436
|
+
memoizedFilterFunc ? directExecutions?.filter(memoizedFilterFunc) : directExecutions,
|
|
5437
|
+
{ cutOffTimeMs }
|
|
5438
|
+
),
|
|
5439
|
+
[directExecutions, cutOffTimeMs, memoizedFilterFunc]
|
|
5440
|
+
);
|
|
5441
|
+
return useMemo12(
|
|
5442
|
+
() => ({
|
|
5443
|
+
data: mergedDirectExecutions?.map((de) => purifyCheckoutHistoryItem(de)).slice(0, fetchSize)
|
|
5444
|
+
}),
|
|
5445
|
+
[mergedDirectExecutions, fetchSize]
|
|
5446
|
+
);
|
|
5447
|
+
}
|
|
5448
|
+
|
|
5449
|
+
// src/history/useCheckoutsListenerByUserId.ts
|
|
5450
|
+
import {
|
|
5451
|
+
getCheckoutsByUserId,
|
|
5452
|
+
getDirectExecutionsByUserId
|
|
5453
|
+
} from "@funkit/api-base";
|
|
5454
|
+
import {
|
|
5455
|
+
purifyCheckoutHistoryItem as purifyCheckoutHistoryItem2
|
|
5456
|
+
} from "@funkit/connect-core";
|
|
5457
|
+
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
5458
|
+
var CHECKOUT_HISTORY_HOOK_LIMIT = 100;
|
|
5459
|
+
function useCheckoutsListenerByUserId(userId) {
|
|
5460
|
+
const { apiKey, userId: identityUserId } = useFunkitIdentity();
|
|
5461
|
+
const { listRefresh } = useDynamicConfig(
|
|
5462
|
+
"checkoutnotificationsrefreshinterval"
|
|
5463
|
+
);
|
|
5464
|
+
const resolvedUserId = userId ?? identityUserId;
|
|
5465
|
+
const effectiveUserId = resolvedUserId === "0x" ? "" : resolvedUserId;
|
|
5466
|
+
const { data, isLoading } = useQuery6({
|
|
5467
|
+
enabled: !!effectiveUserId,
|
|
5468
|
+
queryKey: ["getPurifiedCheckoutsByUserId", effectiveUserId],
|
|
5469
|
+
queryFn: async () => {
|
|
5470
|
+
const [checkouts, directExecutions] = await Promise.all([
|
|
5471
|
+
getCheckoutsByUserId({
|
|
5472
|
+
apiKey,
|
|
5473
|
+
logger,
|
|
5474
|
+
userId: effectiveUserId,
|
|
5475
|
+
limit: CHECKOUT_HISTORY_HOOK_LIMIT
|
|
5476
|
+
}),
|
|
5477
|
+
getDirectExecutionsByUserId({
|
|
5478
|
+
apiKey,
|
|
5479
|
+
logger,
|
|
5480
|
+
userId: effectiveUserId,
|
|
5481
|
+
limit: CHECKOUT_HISTORY_HOOK_LIMIT
|
|
5482
|
+
})
|
|
5483
|
+
]);
|
|
5484
|
+
return [...checkouts, ...directExecutions].map(purifyCheckoutHistoryItem2).sort((a, b) => b.createdTimeMs - a.createdTimeMs).slice(0, CHECKOUT_HISTORY_HOOK_LIMIT);
|
|
5485
|
+
},
|
|
5486
|
+
refetchInterval: listRefresh
|
|
5487
|
+
});
|
|
5488
|
+
return { data, isLoading };
|
|
5489
|
+
}
|
|
5273
5490
|
export {
|
|
5274
5491
|
AddressCopiedToast,
|
|
5275
5492
|
Box,
|
|
@@ -5286,9 +5503,11 @@ export {
|
|
|
5286
5503
|
normalizeColorScheme,
|
|
5287
5504
|
resolveColorScheme,
|
|
5288
5505
|
toRestyleTheme,
|
|
5506
|
+
useCheckoutsListenerByUserId,
|
|
5289
5507
|
useColorScheme,
|
|
5290
5508
|
useFunkitCheckout,
|
|
5291
5509
|
useFunkitColorScheme,
|
|
5510
|
+
useFunkitRecentDeposits,
|
|
5292
5511
|
useFunkitTheme
|
|
5293
5512
|
};
|
|
5294
5513
|
//# sourceMappingURL=index.js.map
|