@funkit/connect-rn 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/index.js +1661 -1311
- package/dist/index.js.map +4 -4
- package/dist/src/components/Grabber.d.ts +8 -0
- package/dist/src/components/Grabber.d.ts.map +1 -0
- package/dist/src/components/ScrollFade.d.ts +26 -0
- package/dist/src/components/ScrollFade.d.ts.map +1 -0
- package/dist/src/components/SelectedChainRow.d.ts +16 -0
- package/dist/src/components/SelectedChainRow.d.ts.map +1 -0
- package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
- package/dist/src/flow/depositFlowConfig.d.ts +4 -12
- package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
- package/dist/src/flow/selectedChainStorage.d.ts +4 -0
- package/dist/src/flow/selectedChainStorage.d.ts.map +1 -0
- package/dist/src/icons/ChainAvatar.d.ts +12 -0
- package/dist/src/icons/ChainAvatar.d.ts.map +1 -0
- package/dist/src/screens/QrCodeScreen.d.ts.map +1 -1
- package/dist/src/screens/SelectChainScreen.d.ts +27 -0
- package/dist/src/screens/SelectChainScreen.d.ts.map +1 -0
- package/dist/src/screens/SelectMethodScreen.d.ts +11 -0
- package/dist/src/screens/SelectMethodScreen.d.ts.map +1 -1
- package/dist/src/screens/TransferCryptoScreen.d.ts +13 -20
- package/dist/src/screens/TransferCryptoScreen.d.ts.map +1 -1
- package/dist/src/screens/WithdrawCryptoScreen.d.ts +15 -0
- package/dist/src/screens/WithdrawCryptoScreen.d.ts.map +1 -0
- package/dist/src/screens/WithdrawMethodScreen.d.ts +2 -0
- package/dist/src/screens/WithdrawMethodScreen.d.ts.map +1 -1
- package/dist/src/transfer/availableChains.d.ts +15 -22
- package/dist/src/transfer/availableChains.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useCopyDepositAddress.d.ts +17 -0
- package/dist/src/transfer/hooks/useCopyDepositAddress.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/src/screens/AvailableChainsScreen.d.ts +0 -32
- package/dist/src/screens/AvailableChainsScreen.d.ts.map +0 -1
- package/dist/src/screens/NetworkSelector.d.ts +0 -31
- package/dist/src/screens/NetworkSelector.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -440,7 +440,7 @@ function useFunkitColorScheme() {
|
|
|
440
440
|
|
|
441
441
|
// src/providers/FunkitProvider.tsx
|
|
442
442
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
443
|
-
import { useEffect as useEffect13, useMemo as useMemo12, useRef as
|
|
443
|
+
import { useEffect as useEffect13, useMemo as useMemo12, useRef as useRef10 } from "react";
|
|
444
444
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
445
445
|
|
|
446
446
|
// src/flow/FunkitFlowProvider.tsx
|
|
@@ -591,14 +591,14 @@ import { useStatsigClient as useStatsigClient2 } from "@statsig/react-bindings";
|
|
|
591
591
|
import { useQueryClient } from "@tanstack/react-query";
|
|
592
592
|
import {
|
|
593
593
|
createContext as createContext4,
|
|
594
|
-
useCallback as
|
|
594
|
+
useCallback as useCallback9,
|
|
595
595
|
useContext as useContext4,
|
|
596
596
|
useEffect as useEffect12,
|
|
597
597
|
useMemo as useMemo10,
|
|
598
|
-
useRef as
|
|
599
|
-
useState as
|
|
598
|
+
useRef as useRef9,
|
|
599
|
+
useState as useState10
|
|
600
600
|
} from "react";
|
|
601
|
-
import { Share, StyleSheet as
|
|
601
|
+
import { Share, StyleSheet as StyleSheet11, View as View5 } from "react-native";
|
|
602
602
|
import { useSafeAreaInsets as useSafeAreaInsets4 } from "react-native-safe-area-context";
|
|
603
603
|
|
|
604
604
|
// src/geo/useCheckoutBlocked.ts
|
|
@@ -645,6 +645,51 @@ function useCheckoutBlocked(params) {
|
|
|
645
645
|
return { isGeoblocked, isLoadingGeoCheck };
|
|
646
646
|
}
|
|
647
647
|
|
|
648
|
+
// src/identity/IdentityContext.tsx
|
|
649
|
+
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
650
|
+
|
|
651
|
+
// src/utils/customers.ts
|
|
652
|
+
import { MALLARD_API_KEY } from "@funkit/api-base";
|
|
653
|
+
function isMallardApiKey(apiKey) {
|
|
654
|
+
return apiKey === MALLARD_API_KEY;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
// src/identity/IdentityContext.tsx
|
|
658
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
659
|
+
function generateSyntheticUserId(apiKey, externalUserId) {
|
|
660
|
+
if (isMallardApiKey(apiKey)) {
|
|
661
|
+
return externalUserId;
|
|
662
|
+
}
|
|
663
|
+
return `${apiKey}|${externalUserId}`;
|
|
664
|
+
}
|
|
665
|
+
function resolveFunkitIdentity(config, walletAddress) {
|
|
666
|
+
const address = walletAddress || "0x";
|
|
667
|
+
const userId = config.externalUserId ? generateSyntheticUserId(config.apiKey, config.externalUserId) : address;
|
|
668
|
+
return {
|
|
669
|
+
apiKey: config.apiKey,
|
|
670
|
+
userId,
|
|
671
|
+
walletAddress: address,
|
|
672
|
+
loginType: config.loginType,
|
|
673
|
+
prefillFiatEmail: config.prefillFiatEmail
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
var FunkitIdentityContext = createContext2(null);
|
|
677
|
+
function FunkitIdentityProvider({
|
|
678
|
+
identity,
|
|
679
|
+
children
|
|
680
|
+
}) {
|
|
681
|
+
return /* @__PURE__ */ jsx2(FunkitIdentityContext.Provider, { value: identity, children });
|
|
682
|
+
}
|
|
683
|
+
function useFunkitIdentity() {
|
|
684
|
+
const identity = useContext2(FunkitIdentityContext);
|
|
685
|
+
if (identity == null) {
|
|
686
|
+
throw new Error(
|
|
687
|
+
"useFunkitIdentity must be used within a <FunkitIdentityProvider> (mounted by <FunkitProvider>)"
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
return identity;
|
|
691
|
+
}
|
|
692
|
+
|
|
648
693
|
// src/icons/PaymentMethodIcon.tsx
|
|
649
694
|
import { getSwappedIcon, isSavedFormOfPaymentType } from "@funkit/connect-core";
|
|
650
695
|
|
|
@@ -750,7 +795,7 @@ var FALLBACK_ASSET_LOGO = "https://sdk-cdn.fun.xyz/images/dollar_circle.png";
|
|
|
750
795
|
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
751
796
|
import { Image } from "react-native";
|
|
752
797
|
import { SvgXml } from "react-native-svg";
|
|
753
|
-
import { jsx as
|
|
798
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
754
799
|
var svgCache = /* @__PURE__ */ new Map();
|
|
755
800
|
function ensureViewBox(svg) {
|
|
756
801
|
if (/\bviewBox\s*=/.test(svg)) {
|
|
@@ -818,7 +863,7 @@ function FunIcon({ uri, size = 32, fallbackUri }) {
|
|
|
818
863
|
}, [currentUri, isSvg]);
|
|
819
864
|
const ready = isSvg ? xml != null : rasterLoaded;
|
|
820
865
|
const clip = { overflow: "hidden" };
|
|
821
|
-
return /* @__PURE__ */
|
|
866
|
+
return /* @__PURE__ */ jsx3(
|
|
822
867
|
Box,
|
|
823
868
|
{
|
|
824
869
|
width: size,
|
|
@@ -828,7 +873,7 @@ function FunIcon({ uri, size = 32, fallbackUri }) {
|
|
|
828
873
|
clip,
|
|
829
874
|
{ backgroundColor: ready ? void 0 : theme.background.secondary }
|
|
830
875
|
],
|
|
831
|
-
children: isSvg ? xml != null ? /* @__PURE__ */
|
|
876
|
+
children: isSvg ? xml != null ? /* @__PURE__ */ jsx3(SvgXml, { xml, width: size, height: size }) : null : /* @__PURE__ */ jsx3(
|
|
832
877
|
Image,
|
|
833
878
|
{
|
|
834
879
|
source: { uri: currentUri },
|
|
@@ -843,26 +888,26 @@ function FunIcon({ uri, size = 32, fallbackUri }) {
|
|
|
843
888
|
|
|
844
889
|
// src/icons/PaymentBrandIcons.tsx
|
|
845
890
|
import { SvgXml as SvgXml2 } from "react-native-svg";
|
|
846
|
-
import { jsx as
|
|
891
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
847
892
|
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>';
|
|
848
893
|
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>';
|
|
849
894
|
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>';
|
|
850
895
|
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>';
|
|
851
896
|
function MastercardIcon({ size = 24 }) {
|
|
852
|
-
return /* @__PURE__ */
|
|
897
|
+
return /* @__PURE__ */ jsx4(SvgXml2, { xml: MASTERCARD_SVG, width: size, height: size * (18 / 24) });
|
|
853
898
|
}
|
|
854
899
|
function VisaIcon({ size = 24 }) {
|
|
855
|
-
return /* @__PURE__ */
|
|
900
|
+
return /* @__PURE__ */ jsx4(SvgXml2, { xml: VISA_SVG, width: size, height: size * (19 / 24) });
|
|
856
901
|
}
|
|
857
902
|
function JcbIcon({ size = 24 }) {
|
|
858
|
-
return /* @__PURE__ */
|
|
903
|
+
return /* @__PURE__ */ jsx4(SvgXml2, { xml: JCB_SVG, width: size, height: size * (19 / 24) });
|
|
859
904
|
}
|
|
860
905
|
function UnionPayIcon({ size = 24 }) {
|
|
861
|
-
return /* @__PURE__ */
|
|
906
|
+
return /* @__PURE__ */ jsx4(SvgXml2, { xml: UNIONPAY_SVG, width: size, height: size * (160 / 256) });
|
|
862
907
|
}
|
|
863
908
|
|
|
864
909
|
// src/icons/PaymentMethodIcon.tsx
|
|
865
|
-
import { jsx as
|
|
910
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
866
911
|
var CARD_ICON = "https://sdk-cdn.fun.xyz/images/swapped/card-payment.svg";
|
|
867
912
|
var BRAND_ICONS = {
|
|
868
913
|
mastercard: MastercardIcon,
|
|
@@ -876,9 +921,9 @@ function PaymentMethodIcon({ fop }) {
|
|
|
876
921
|
if (isSavedFormOfPaymentType(fop)) {
|
|
877
922
|
const BrandIcon = BRAND_ICONS[fop.cardBrand.replace(/ /g, "_").toLowerCase()];
|
|
878
923
|
if (BrandIcon) {
|
|
879
|
-
return /* @__PURE__ */
|
|
924
|
+
return /* @__PURE__ */ jsx5(BrandIcon, { size: 32 });
|
|
880
925
|
}
|
|
881
|
-
return /* @__PURE__ */
|
|
926
|
+
return /* @__PURE__ */ jsx5(
|
|
882
927
|
FunIcon,
|
|
883
928
|
{
|
|
884
929
|
uri: genericCardIcon(isDarkMode),
|
|
@@ -886,7 +931,7 @@ function PaymentMethodIcon({ fop }) {
|
|
|
886
931
|
}
|
|
887
932
|
);
|
|
888
933
|
}
|
|
889
|
-
return /* @__PURE__ */
|
|
934
|
+
return /* @__PURE__ */ jsx5(
|
|
890
935
|
FunIcon,
|
|
891
936
|
{
|
|
892
937
|
uri: getSwappedIcon(fop, isDarkMode),
|
|
@@ -897,8 +942,8 @@ function PaymentMethodIcon({ fop }) {
|
|
|
897
942
|
|
|
898
943
|
// src/providers/FunkitI18nProvider.tsx
|
|
899
944
|
import {
|
|
900
|
-
createContext as
|
|
901
|
-
useContext as
|
|
945
|
+
createContext as createContext3,
|
|
946
|
+
useContext as useContext3,
|
|
902
947
|
useEffect as useEffect4,
|
|
903
948
|
useMemo as useMemo4,
|
|
904
949
|
useState as useState4
|
|
@@ -909,9 +954,8 @@ import i18next from "i18next";
|
|
|
909
954
|
|
|
910
955
|
// src/locales/translations/en.json
|
|
911
956
|
var en_default = {
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
title: "Available {{networkLabel}}"
|
|
957
|
+
changeChain: {
|
|
958
|
+
title: "Select a chain"
|
|
915
959
|
},
|
|
916
960
|
checkoutBlocked: {
|
|
917
961
|
notAvailable: "Not available",
|
|
@@ -921,6 +965,7 @@ var en_default = {
|
|
|
921
965
|
common: {
|
|
922
966
|
addressCopied: "Address copied",
|
|
923
967
|
back: "Back",
|
|
968
|
+
cancel: "Cancel",
|
|
924
969
|
close: "Close",
|
|
925
970
|
copied: "Copied!",
|
|
926
971
|
copy: "Copy",
|
|
@@ -936,12 +981,15 @@ var en_default = {
|
|
|
936
981
|
},
|
|
937
982
|
networks: {
|
|
938
983
|
chainFallback: "Chain {{chainId}}",
|
|
939
|
-
|
|
940
|
-
min: "Min ${{min}}"
|
|
984
|
+
minimum: "${{min}} minimum"
|
|
941
985
|
},
|
|
942
986
|
qrCode: {
|
|
943
987
|
title: "QR Code"
|
|
944
988
|
},
|
|
989
|
+
selectChain: {
|
|
990
|
+
subtitle: "Choose a network to deposit from",
|
|
991
|
+
title: "Deposit crypto"
|
|
992
|
+
},
|
|
945
993
|
selectMethod: {
|
|
946
994
|
crypto: "Crypto",
|
|
947
995
|
depositTo: "Deposit to",
|
|
@@ -953,9 +1001,10 @@ var en_default = {
|
|
|
953
1001
|
title: "Add money"
|
|
954
1002
|
},
|
|
955
1003
|
transferCrypto: {
|
|
956
|
-
|
|
1004
|
+
changeChain: "Change chain",
|
|
957
1005
|
depositAddressLabel: "Your deposit address",
|
|
958
1006
|
generating: "Generating\u2026",
|
|
1007
|
+
selectedChain: "Selected chain",
|
|
959
1008
|
share: "Share",
|
|
960
1009
|
shareAddress: "Share address",
|
|
961
1010
|
showQrCode: "Show QR code",
|
|
@@ -964,17 +1013,23 @@ var en_default = {
|
|
|
964
1013
|
withdraw: {
|
|
965
1014
|
belowMinimumMessage: "Your balance is below the minimum for a cash withdrawal.",
|
|
966
1015
|
belowMinimumTitle: "Balance too low",
|
|
1016
|
+
cashMethodsError: "Something went wrong loading cash-out methods. You can still withdraw with crypto.",
|
|
1017
|
+
noCashMethods: "Cash-out methods like bank and card aren't available in your region. You can still withdraw with crypto.",
|
|
967
1018
|
title: "Withdraw",
|
|
968
1019
|
unavailableMessage: "Cash withdrawals aren't available in your region right now.",
|
|
969
1020
|
unavailableTitle: "Withdrawals unavailable"
|
|
1021
|
+
},
|
|
1022
|
+
withdrawCrypto: {
|
|
1023
|
+
methodSubtitle: "No limit",
|
|
1024
|
+
methodTitle: "Crypto address",
|
|
1025
|
+
title: "Withdraw crypto"
|
|
970
1026
|
}
|
|
971
1027
|
};
|
|
972
1028
|
|
|
973
1029
|
// src/locales/translations/es.json
|
|
974
1030
|
var es_default = {
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
title: "{{networkLabel}} disponibles"
|
|
1031
|
+
changeChain: {
|
|
1032
|
+
title: "Selecciona una cadena"
|
|
978
1033
|
},
|
|
979
1034
|
checkoutBlocked: {
|
|
980
1035
|
notAvailable: "No disponible",
|
|
@@ -984,6 +1039,7 @@ var es_default = {
|
|
|
984
1039
|
common: {
|
|
985
1040
|
addressCopied: "Direcci\xF3n copiada",
|
|
986
1041
|
back: "Atr\xE1s",
|
|
1042
|
+
cancel: "Cancelar",
|
|
987
1043
|
close: "Cerrar",
|
|
988
1044
|
copied: "\xA1Copiado!",
|
|
989
1045
|
copy: "Copiar",
|
|
@@ -999,12 +1055,15 @@ var es_default = {
|
|
|
999
1055
|
},
|
|
1000
1056
|
networks: {
|
|
1001
1057
|
chainFallback: "Cadena {{chainId}}",
|
|
1002
|
-
|
|
1003
|
-
min: "M\xEDn. ${{min}}"
|
|
1058
|
+
minimum: "${{min}} m\xEDnimo"
|
|
1004
1059
|
},
|
|
1005
1060
|
qrCode: {
|
|
1006
1061
|
title: "C\xF3digo QR"
|
|
1007
1062
|
},
|
|
1063
|
+
selectChain: {
|
|
1064
|
+
subtitle: "Elige una red desde la que depositar",
|
|
1065
|
+
title: "Depositar cripto"
|
|
1066
|
+
},
|
|
1008
1067
|
selectMethod: {
|
|
1009
1068
|
crypto: "Cripto",
|
|
1010
1069
|
depositTo: "Depositar en",
|
|
@@ -1016,9 +1075,10 @@ var es_default = {
|
|
|
1016
1075
|
title: "Agregar dinero"
|
|
1017
1076
|
},
|
|
1018
1077
|
transferCrypto: {
|
|
1019
|
-
|
|
1078
|
+
changeChain: "Cambiar cadena",
|
|
1020
1079
|
depositAddressLabel: "Tu direcci\xF3n de dep\xF3sito",
|
|
1021
1080
|
generating: "Generando\u2026",
|
|
1081
|
+
selectedChain: "Cadena seleccionada",
|
|
1022
1082
|
share: "Compartir",
|
|
1023
1083
|
shareAddress: "Compartir direcci\xF3n",
|
|
1024
1084
|
showQrCode: "Mostrar c\xF3digo QR",
|
|
@@ -1027,17 +1087,23 @@ var es_default = {
|
|
|
1027
1087
|
withdraw: {
|
|
1028
1088
|
belowMinimumMessage: "Tu saldo est\xE1 por debajo del m\xEDnimo para un retiro en efectivo.",
|
|
1029
1089
|
belowMinimumTitle: "Saldo insuficiente",
|
|
1090
|
+
cashMethodsError: "No se pudieron cargar los m\xE9todos de retiro en efectivo. A\xFAn puedes retirar con cripto.",
|
|
1091
|
+
noCashMethods: "Los m\xE9todos de retiro como banco y tarjeta no est\xE1n disponibles en tu regi\xF3n. A\xFAn puedes retirar con cripto.",
|
|
1030
1092
|
title: "Retirar",
|
|
1031
1093
|
unavailableMessage: "Los retiros en efectivo no est\xE1n disponibles en tu regi\xF3n en este momento.",
|
|
1032
1094
|
unavailableTitle: "Retiros no disponibles"
|
|
1095
|
+
},
|
|
1096
|
+
withdrawCrypto: {
|
|
1097
|
+
methodSubtitle: "Sin l\xEDmite",
|
|
1098
|
+
methodTitle: "Direcci\xF3n cripto",
|
|
1099
|
+
title: "Retirar cripto"
|
|
1033
1100
|
}
|
|
1034
1101
|
};
|
|
1035
1102
|
|
|
1036
1103
|
// src/locales/translations/fr.json
|
|
1037
1104
|
var fr_default = {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
title: "{{networkLabel}} disponibles"
|
|
1105
|
+
changeChain: {
|
|
1106
|
+
title: "S\xE9lectionnez une cha\xEEne"
|
|
1041
1107
|
},
|
|
1042
1108
|
checkoutBlocked: {
|
|
1043
1109
|
notAvailable: "Non disponible",
|
|
@@ -1047,6 +1113,7 @@ var fr_default = {
|
|
|
1047
1113
|
common: {
|
|
1048
1114
|
addressCopied: "Adresse copi\xE9e",
|
|
1049
1115
|
back: "Retour",
|
|
1116
|
+
cancel: "Annuler",
|
|
1050
1117
|
close: "Fermer",
|
|
1051
1118
|
copied: "Copi\xE9 !",
|
|
1052
1119
|
copy: "Copier",
|
|
@@ -1062,12 +1129,15 @@ var fr_default = {
|
|
|
1062
1129
|
},
|
|
1063
1130
|
networks: {
|
|
1064
1131
|
chainFallback: "Cha\xEEne {{chainId}}",
|
|
1065
|
-
|
|
1066
|
-
min: "Min ${{min}}"
|
|
1132
|
+
minimum: "${{min}} minimum"
|
|
1067
1133
|
},
|
|
1068
1134
|
qrCode: {
|
|
1069
1135
|
title: "Code QR"
|
|
1070
1136
|
},
|
|
1137
|
+
selectChain: {
|
|
1138
|
+
subtitle: "Choisissez un r\xE9seau depuis lequel d\xE9poser",
|
|
1139
|
+
title: "D\xE9poser des cryptos"
|
|
1140
|
+
},
|
|
1071
1141
|
selectMethod: {
|
|
1072
1142
|
crypto: "Crypto",
|
|
1073
1143
|
depositTo: "D\xE9poser sur",
|
|
@@ -1079,9 +1149,10 @@ var fr_default = {
|
|
|
1079
1149
|
title: "Ajouter de l'argent"
|
|
1080
1150
|
},
|
|
1081
1151
|
transferCrypto: {
|
|
1082
|
-
|
|
1152
|
+
changeChain: "Changer de cha\xEEne",
|
|
1083
1153
|
depositAddressLabel: "Votre adresse de d\xE9p\xF4t",
|
|
1084
1154
|
generating: "G\xE9n\xE9ration\u2026",
|
|
1155
|
+
selectedChain: "Cha\xEEne s\xE9lectionn\xE9e",
|
|
1085
1156
|
share: "Partager",
|
|
1086
1157
|
shareAddress: "Partager l'adresse",
|
|
1087
1158
|
showQrCode: "Afficher le code QR",
|
|
@@ -1090,17 +1161,23 @@ var fr_default = {
|
|
|
1090
1161
|
withdraw: {
|
|
1091
1162
|
belowMinimumMessage: "Votre solde est inf\xE9rieur au minimum requis pour un retrait en esp\xE8ces.",
|
|
1092
1163
|
belowMinimumTitle: "Solde insuffisant",
|
|
1164
|
+
cashMethodsError: "Le chargement des m\xE9thodes de retrait en esp\xE8ces a \xE9chou\xE9. Vous pouvez toujours retirer en crypto.",
|
|
1165
|
+
noCashMethods: "Les retraits par banque ou carte ne sont pas disponibles dans votre r\xE9gion. Vous pouvez toujours retirer en crypto.",
|
|
1093
1166
|
title: "Retirer",
|
|
1094
1167
|
unavailableMessage: "Les retraits en esp\xE8ces ne sont pas disponibles dans votre r\xE9gion pour le moment.",
|
|
1095
1168
|
unavailableTitle: "Retraits indisponibles"
|
|
1169
|
+
},
|
|
1170
|
+
withdrawCrypto: {
|
|
1171
|
+
methodSubtitle: "Aucune limite",
|
|
1172
|
+
methodTitle: "Adresse crypto",
|
|
1173
|
+
title: "Retirer des cryptos"
|
|
1096
1174
|
}
|
|
1097
1175
|
};
|
|
1098
1176
|
|
|
1099
1177
|
// src/locales/translations/ja.json
|
|
1100
1178
|
var ja_default = {
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
title: "\u5229\u7528\u53EF\u80FD\u306A{{networkLabel}}"
|
|
1179
|
+
changeChain: {
|
|
1180
|
+
title: "\u30C1\u30A7\u30FC\u30F3\u3092\u9078\u629E"
|
|
1104
1181
|
},
|
|
1105
1182
|
checkoutBlocked: {
|
|
1106
1183
|
notAvailable: "\u3054\u5229\u7528\u3044\u305F\u3060\u3051\u307E\u305B\u3093",
|
|
@@ -1110,6 +1187,7 @@ var ja_default = {
|
|
|
1110
1187
|
common: {
|
|
1111
1188
|
addressCopied: "\u30A2\u30C9\u30EC\u30B9\u3092\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",
|
|
1112
1189
|
back: "\u623B\u308B",
|
|
1190
|
+
cancel: "\u30AD\u30E3\u30F3\u30BB\u30EB",
|
|
1113
1191
|
close: "\u9589\u3058\u308B",
|
|
1114
1192
|
copied: "\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F\uFF01",
|
|
1115
1193
|
copy: "\u30B3\u30D4\u30FC",
|
|
@@ -1125,12 +1203,15 @@ var ja_default = {
|
|
|
1125
1203
|
},
|
|
1126
1204
|
networks: {
|
|
1127
1205
|
chainFallback: "\u30C1\u30A7\u30FC\u30F3 {{chainId}}",
|
|
1128
|
-
|
|
1129
|
-
min: "\u6700\u4F4E ${{min}}"
|
|
1206
|
+
minimum: "\u6700\u4F4E ${{min}}"
|
|
1130
1207
|
},
|
|
1131
1208
|
qrCode: {
|
|
1132
1209
|
title: "QR\u30B3\u30FC\u30C9"
|
|
1133
1210
|
},
|
|
1211
|
+
selectChain: {
|
|
1212
|
+
subtitle: "\u5165\u91D1\u5143\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u3092\u9078\u629E",
|
|
1213
|
+
title: "\u6697\u53F7\u8CC7\u7523\u3092\u5165\u91D1"
|
|
1214
|
+
},
|
|
1134
1215
|
selectMethod: {
|
|
1135
1216
|
crypto: "\u6697\u53F7\u8CC7\u7523",
|
|
1136
1217
|
depositTo: "\u5165\u91D1\u5148",
|
|
@@ -1142,9 +1223,10 @@ var ja_default = {
|
|
|
1142
1223
|
title: "\u5165\u91D1"
|
|
1143
1224
|
},
|
|
1144
1225
|
transferCrypto: {
|
|
1145
|
-
|
|
1226
|
+
changeChain: "\u30C1\u30A7\u30FC\u30F3\u3092\u5909\u66F4",
|
|
1146
1227
|
depositAddressLabel: "\u3042\u306A\u305F\u306E\u5165\u91D1\u30A2\u30C9\u30EC\u30B9",
|
|
1147
1228
|
generating: "\u751F\u6210\u4E2D\u2026",
|
|
1229
|
+
selectedChain: "\u9078\u629E\u4E2D\u306E\u30C1\u30A7\u30FC\u30F3",
|
|
1148
1230
|
share: "\u5171\u6709",
|
|
1149
1231
|
shareAddress: "\u30A2\u30C9\u30EC\u30B9\u3092\u5171\u6709",
|
|
1150
1232
|
showQrCode: "QR\u30B3\u30FC\u30C9\u3092\u8868\u793A",
|
|
@@ -1153,17 +1235,23 @@ var ja_default = {
|
|
|
1153
1235
|
withdraw: {
|
|
1154
1236
|
belowMinimumMessage: "\u6B8B\u9AD8\u304C\u73FE\u91D1\u51FA\u91D1\u306E\u6700\u4F4E\u984D\u3092\u4E0B\u56DE\u3063\u3066\u3044\u307E\u3059\u3002",
|
|
1155
1237
|
belowMinimumTitle: "\u6B8B\u9AD8\u4E0D\u8DB3",
|
|
1238
|
+
cashMethodsError: "\u73FE\u91D1\u306E\u51FA\u91D1\u65B9\u6CD5\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u6697\u53F7\u8CC7\u7523\u3067\u306E\u51FA\u91D1\u306F\u53EF\u80FD\u3067\u3059\u3002",
|
|
1239
|
+
noCashMethods: "\u9280\u884C\u3084\u30AB\u30FC\u30C9\u3067\u306E\u51FA\u91D1\u306F\u304A\u4F4F\u307E\u3044\u306E\u5730\u57DF\u3067\u306F\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u6697\u53F7\u8CC7\u7523\u3067\u306E\u51FA\u91D1\u306F\u53EF\u80FD\u3067\u3059\u3002",
|
|
1156
1240
|
title: "\u51FA\u91D1",
|
|
1157
1241
|
unavailableMessage: "\u73FE\u91D1\u51FA\u91D1\u306F\u73FE\u5728\u304A\u4F4F\u307E\u3044\u306E\u5730\u57DF\u3067\u306F\u3054\u5229\u7528\u3044\u305F\u3060\u3051\u307E\u305B\u3093\u3002",
|
|
1158
1242
|
unavailableTitle: "\u51FA\u91D1\u306F\u3054\u5229\u7528\u3044\u305F\u3060\u3051\u307E\u305B\u3093"
|
|
1243
|
+
},
|
|
1244
|
+
withdrawCrypto: {
|
|
1245
|
+
methodSubtitle: "\u4E0A\u9650\u306A\u3057",
|
|
1246
|
+
methodTitle: "\u6697\u53F7\u8CC7\u7523\u30A2\u30C9\u30EC\u30B9",
|
|
1247
|
+
title: "\u6697\u53F7\u8CC7\u7523\u3092\u51FA\u91D1"
|
|
1159
1248
|
}
|
|
1160
1249
|
};
|
|
1161
1250
|
|
|
1162
1251
|
// src/locales/translations/ko.json
|
|
1163
1252
|
var ko_default = {
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
title: "\uC0AC\uC6A9 \uAC00\uB2A5\uD55C {{networkLabel}}"
|
|
1253
|
+
changeChain: {
|
|
1254
|
+
title: "\uCCB4\uC778 \uC120\uD0DD"
|
|
1167
1255
|
},
|
|
1168
1256
|
checkoutBlocked: {
|
|
1169
1257
|
notAvailable: "\uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C",
|
|
@@ -1173,6 +1261,7 @@ var ko_default = {
|
|
|
1173
1261
|
common: {
|
|
1174
1262
|
addressCopied: "\uC8FC\uC18C\uAC00 \uBCF5\uC0AC\uB428",
|
|
1175
1263
|
back: "\uB4A4\uB85C",
|
|
1264
|
+
cancel: "\uCDE8\uC18C",
|
|
1176
1265
|
close: "\uB2EB\uAE30",
|
|
1177
1266
|
copied: "\uBCF5\uC0AC\uB428!",
|
|
1178
1267
|
copy: "\uBCF5\uC0AC",
|
|
@@ -1188,12 +1277,15 @@ var ko_default = {
|
|
|
1188
1277
|
},
|
|
1189
1278
|
networks: {
|
|
1190
1279
|
chainFallback: "\uCCB4\uC778 {{chainId}}",
|
|
1191
|
-
|
|
1192
|
-
min: "\uCD5C\uC18C ${{min}}"
|
|
1280
|
+
minimum: "\uCD5C\uC18C ${{min}}"
|
|
1193
1281
|
},
|
|
1194
1282
|
qrCode: {
|
|
1195
1283
|
title: "QR \uCF54\uB4DC"
|
|
1196
1284
|
},
|
|
1285
|
+
selectChain: {
|
|
1286
|
+
subtitle: "\uC785\uAE08\uD560 \uB124\uD2B8\uC6CC\uD06C\uB97C \uC120\uD0DD\uD558\uC138\uC694",
|
|
1287
|
+
title: "\uC554\uD638\uD654\uD3D0 \uC785\uAE08"
|
|
1288
|
+
},
|
|
1197
1289
|
selectMethod: {
|
|
1198
1290
|
crypto: "\uC554\uD638\uD654\uD3D0",
|
|
1199
1291
|
depositTo: "\uC785\uAE08 \uB300\uC0C1",
|
|
@@ -1205,9 +1297,10 @@ var ko_default = {
|
|
|
1205
1297
|
title: "\uC790\uAE08 \uCD94\uAC00"
|
|
1206
1298
|
},
|
|
1207
1299
|
transferCrypto: {
|
|
1208
|
-
|
|
1300
|
+
changeChain: "\uCCB4\uC778 \uBCC0\uACBD",
|
|
1209
1301
|
depositAddressLabel: "\uB0B4 \uC785\uAE08 \uC8FC\uC18C",
|
|
1210
1302
|
generating: "\uC0DD\uC131 \uC911\u2026",
|
|
1303
|
+
selectedChain: "\uC120\uD0DD\uB41C \uCCB4\uC778",
|
|
1211
1304
|
share: "\uACF5\uC720",
|
|
1212
1305
|
shareAddress: "\uC8FC\uC18C \uACF5\uC720",
|
|
1213
1306
|
showQrCode: "QR \uCF54\uB4DC \uD45C\uC2DC",
|
|
@@ -1216,17 +1309,23 @@ var ko_default = {
|
|
|
1216
1309
|
withdraw: {
|
|
1217
1310
|
belowMinimumMessage: "\uC794\uC561\uC774 \uD604\uAE08 \uCD9C\uAE08 \uCD5C\uC18C \uAE08\uC561\uBCF4\uB2E4 \uC801\uC2B5\uB2C8\uB2E4.",
|
|
1218
1311
|
belowMinimumTitle: "\uC794\uC561 \uBD80\uC871",
|
|
1312
|
+
cashMethodsError: "\uD604\uAE08 \uCD9C\uAE08 \uC218\uB2E8\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uC554\uD638\uD654\uD3D0\uB85C\uB294 \uCD9C\uAE08\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
|
|
1313
|
+
noCashMethods: "\uC740\uD589 \uBC0F \uCE74\uB4DC \uCD9C\uAE08\uC740 \uD604\uC7AC \uC9C0\uC5ED\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC554\uD638\uD654\uD3D0\uB85C\uB294 \uCD9C\uAE08\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
|
|
1219
1314
|
title: "\uCD9C\uAE08",
|
|
1220
1315
|
unavailableMessage: "\uD604\uC7AC \uADC0\uD558\uC758 \uC9C0\uC5ED\uC5D0\uC11C\uB294 \uD604\uAE08 \uCD9C\uAE08\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
1221
1316
|
unavailableTitle: "\uCD9C\uAE08 \uBD88\uAC00"
|
|
1317
|
+
},
|
|
1318
|
+
withdrawCrypto: {
|
|
1319
|
+
methodSubtitle: "\uD55C\uB3C4 \uC5C6\uC74C",
|
|
1320
|
+
methodTitle: "\uC554\uD638\uD654\uD3D0 \uC8FC\uC18C",
|
|
1321
|
+
title: "\uC554\uD638\uD654\uD3D0 \uCD9C\uAE08"
|
|
1222
1322
|
}
|
|
1223
1323
|
};
|
|
1224
1324
|
|
|
1225
1325
|
// src/locales/translations/ru.json
|
|
1226
1326
|
var ru_default = {
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
title: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 {{networkLabel}}"
|
|
1327
|
+
changeChain: {
|
|
1328
|
+
title: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0435\u0442\u044C"
|
|
1230
1329
|
},
|
|
1231
1330
|
checkoutBlocked: {
|
|
1232
1331
|
notAvailable: "\u041D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E",
|
|
@@ -1236,6 +1335,7 @@ var ru_default = {
|
|
|
1236
1335
|
common: {
|
|
1237
1336
|
addressCopied: "\u0410\u0434\u0440\u0435\u0441 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D",
|
|
1238
1337
|
back: "\u041D\u0430\u0437\u0430\u0434",
|
|
1338
|
+
cancel: "\u041E\u0442\u043C\u0435\u043D\u0430",
|
|
1239
1339
|
close: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C",
|
|
1240
1340
|
copied: "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E!",
|
|
1241
1341
|
copy: "\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C",
|
|
@@ -1251,12 +1351,15 @@ var ru_default = {
|
|
|
1251
1351
|
},
|
|
1252
1352
|
networks: {
|
|
1253
1353
|
chainFallback: "\u0421\u0435\u0442\u044C {{chainId}}",
|
|
1254
|
-
|
|
1255
|
-
min: "\u041C\u0438\u043D. ${{min}}"
|
|
1354
|
+
minimum: "\u041C\u0438\u043D\u0438\u043C\u0443\u043C ${{min}}"
|
|
1256
1355
|
},
|
|
1257
1356
|
qrCode: {
|
|
1258
1357
|
title: "QR-\u043A\u043E\u0434"
|
|
1259
1358
|
},
|
|
1359
|
+
selectChain: {
|
|
1360
|
+
subtitle: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0435\u0442\u044C \u0434\u043B\u044F \u0432\u043D\u0435\u0441\u0435\u043D\u0438\u044F \u0441\u0440\u0435\u0434\u0441\u0442\u0432",
|
|
1361
|
+
title: "\u0412\u043D\u0435\u0441\u0442\u0438 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u0443"
|
|
1362
|
+
},
|
|
1260
1363
|
selectMethod: {
|
|
1261
1364
|
crypto: "\u041A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u0430",
|
|
1262
1365
|
depositTo: "\u0417\u0430\u0447\u0438\u0441\u043B\u0438\u0442\u044C \u043D\u0430",
|
|
@@ -1268,9 +1371,10 @@ var ru_default = {
|
|
|
1268
1371
|
title: "\u041F\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u044C"
|
|
1269
1372
|
},
|
|
1270
1373
|
transferCrypto: {
|
|
1271
|
-
|
|
1374
|
+
changeChain: "\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u0435\u0442\u044C",
|
|
1272
1375
|
depositAddressLabel: "\u0412\u0430\u0448 \u0430\u0434\u0440\u0435\u0441 \u0434\u043B\u044F \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430",
|
|
1273
1376
|
generating: "\u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F\u2026",
|
|
1377
|
+
selectedChain: "\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u0441\u0435\u0442\u044C",
|
|
1274
1378
|
share: "\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F",
|
|
1275
1379
|
shareAddress: "\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F \u0430\u0434\u0440\u0435\u0441\u043E\u043C",
|
|
1276
1380
|
showQrCode: "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C QR-\u043A\u043E\u0434",
|
|
@@ -1279,17 +1383,23 @@ var ru_default = {
|
|
|
1279
1383
|
withdraw: {
|
|
1280
1384
|
belowMinimumMessage: "\u0412\u0430\u0448 \u0431\u0430\u043B\u0430\u043D\u0441 \u043D\u0438\u0436\u0435 \u043C\u0438\u043D\u0438\u043C\u0443\u043C\u0430 \u0434\u043B\u044F \u0432\u044B\u0432\u043E\u0434\u0430 \u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0445.",
|
|
1281
1385
|
belowMinimumTitle: "\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u044B\u0439 \u0431\u0430\u043B\u0430\u043D\u0441",
|
|
1386
|
+
cashMethodsError: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043F\u043E\u0441\u043E\u0431\u044B \u0432\u044B\u0432\u043E\u0434\u0430 \u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0445. \u0412\u044B\u0432\u043E\u0434 \u0432 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u0435 \u043F\u043E-\u043F\u0440\u0435\u0436\u043D\u0435\u043C\u0443 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.",
|
|
1387
|
+
noCashMethods: "\u0412\u044B\u0432\u043E\u0434 \u043D\u0430 \u0431\u0430\u043D\u043A \u0438\u043B\u0438 \u043A\u0430\u0440\u0442\u0443 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0432 \u0432\u0430\u0448\u0435\u043C \u0440\u0435\u0433\u0438\u043E\u043D\u0435. \u0412\u044B\u0432\u043E\u0434 \u0432 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u0435 \u043F\u043E-\u043F\u0440\u0435\u0436\u043D\u0435\u043C\u0443 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.",
|
|
1282
1388
|
title: "\u0412\u044B\u0432\u0435\u0441\u0442\u0438",
|
|
1283
1389
|
unavailableMessage: "\u0412\u044B\u0432\u043E\u0434 \u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0445 \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0432 \u0432\u0430\u0448\u0435\u043C \u0440\u0435\u0433\u0438\u043E\u043D\u0435.",
|
|
1284
1390
|
unavailableTitle: "\u0412\u044B\u0432\u043E\u0434 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D"
|
|
1391
|
+
},
|
|
1392
|
+
withdrawCrypto: {
|
|
1393
|
+
methodSubtitle: "\u0411\u0435\u0437 \u043B\u0438\u043C\u0438\u0442\u0430",
|
|
1394
|
+
methodTitle: "\u041A\u0440\u0438\u043F\u0442\u043E-\u0430\u0434\u0440\u0435\u0441",
|
|
1395
|
+
title: "\u0412\u044B\u0432\u043E\u0434 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u044B"
|
|
1285
1396
|
}
|
|
1286
1397
|
};
|
|
1287
1398
|
|
|
1288
1399
|
// src/locales/translations/tr.json
|
|
1289
1400
|
var tr_default = {
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
title: "Kullan\u0131labilir {{networkLabel}}"
|
|
1401
|
+
changeChain: {
|
|
1402
|
+
title: "Bir zincir se\xE7in"
|
|
1293
1403
|
},
|
|
1294
1404
|
checkoutBlocked: {
|
|
1295
1405
|
notAvailable: "Kullan\u0131lam\u0131yor",
|
|
@@ -1299,6 +1409,7 @@ var tr_default = {
|
|
|
1299
1409
|
common: {
|
|
1300
1410
|
addressCopied: "Adres kopyaland\u0131",
|
|
1301
1411
|
back: "Geri",
|
|
1412
|
+
cancel: "\u0130ptal",
|
|
1302
1413
|
close: "Kapat",
|
|
1303
1414
|
copied: "Kopyaland\u0131!",
|
|
1304
1415
|
copy: "Kopyala",
|
|
@@ -1314,12 +1425,15 @@ var tr_default = {
|
|
|
1314
1425
|
},
|
|
1315
1426
|
networks: {
|
|
1316
1427
|
chainFallback: "Zincir {{chainId}}",
|
|
1317
|
-
|
|
1318
|
-
min: "Min ${{min}}"
|
|
1428
|
+
minimum: "En az ${{min}}"
|
|
1319
1429
|
},
|
|
1320
1430
|
qrCode: {
|
|
1321
1431
|
title: "QR Kodu"
|
|
1322
1432
|
},
|
|
1433
|
+
selectChain: {
|
|
1434
|
+
subtitle: "Yat\u0131rma yapaca\u011F\u0131n\u0131z a\u011F\u0131 se\xE7in",
|
|
1435
|
+
title: "Kripto yat\u0131r"
|
|
1436
|
+
},
|
|
1323
1437
|
selectMethod: {
|
|
1324
1438
|
crypto: "Kripto",
|
|
1325
1439
|
depositTo: "\u015Euraya yat\u0131r",
|
|
@@ -1331,9 +1445,10 @@ var tr_default = {
|
|
|
1331
1445
|
title: "Para ekle"
|
|
1332
1446
|
},
|
|
1333
1447
|
transferCrypto: {
|
|
1334
|
-
|
|
1448
|
+
changeChain: "Zinciri de\u011Fi\u015Ftir",
|
|
1335
1449
|
depositAddressLabel: "Yat\u0131rma adresiniz",
|
|
1336
1450
|
generating: "Olu\u015Fturuluyor\u2026",
|
|
1451
|
+
selectedChain: "Se\xE7ili zincir",
|
|
1337
1452
|
share: "Payla\u015F",
|
|
1338
1453
|
shareAddress: "Adresi payla\u015F",
|
|
1339
1454
|
showQrCode: "QR kodunu g\xF6ster",
|
|
@@ -1342,17 +1457,23 @@ var tr_default = {
|
|
|
1342
1457
|
withdraw: {
|
|
1343
1458
|
belowMinimumMessage: "Bakiyeniz nakit \xE7ekim i\xE7in gereken minimumun alt\u0131nda.",
|
|
1344
1459
|
belowMinimumTitle: "Bakiye \xE7ok d\xFC\u015F\xFCk",
|
|
1460
|
+
cashMethodsError: "Nakit \xE7ekim y\xF6ntemleri y\xFCklenemedi. Kripto ile \xE7ekim yapmaya devam edebilirsiniz.",
|
|
1461
|
+
noCashMethods: "Banka ve kart ile \xE7ekim b\xF6lgenizde kullan\u0131lam\u0131yor. Kripto ile \xE7ekim yapmaya devam edebilirsiniz.",
|
|
1345
1462
|
title: "Para \xE7ek",
|
|
1346
1463
|
unavailableMessage: "Nakit \xE7ekimler \u015Fu anda b\xF6lgenizde kullan\u0131lam\u0131yor.",
|
|
1347
1464
|
unavailableTitle: "\xC7ekimler kullan\u0131lam\u0131yor"
|
|
1465
|
+
},
|
|
1466
|
+
withdrawCrypto: {
|
|
1467
|
+
methodSubtitle: "Limit yok",
|
|
1468
|
+
methodTitle: "Kripto adresi",
|
|
1469
|
+
title: "Kripto \xE7ek"
|
|
1348
1470
|
}
|
|
1349
1471
|
};
|
|
1350
1472
|
|
|
1351
1473
|
// src/locales/translations/zh.json
|
|
1352
1474
|
var zh_default = {
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
title: "\u53EF\u7528{{networkLabel}}"
|
|
1475
|
+
changeChain: {
|
|
1476
|
+
title: "\u9009\u62E9\u94FE"
|
|
1356
1477
|
},
|
|
1357
1478
|
checkoutBlocked: {
|
|
1358
1479
|
notAvailable: "\u4E0D\u53EF\u7528",
|
|
@@ -1362,6 +1483,7 @@ var zh_default = {
|
|
|
1362
1483
|
common: {
|
|
1363
1484
|
addressCopied: "\u5730\u5740\u5DF2\u590D\u5236",
|
|
1364
1485
|
back: "\u8FD4\u56DE",
|
|
1486
|
+
cancel: "\u53D6\u6D88",
|
|
1365
1487
|
close: "\u5173\u95ED",
|
|
1366
1488
|
copied: "\u5DF2\u590D\u5236\uFF01",
|
|
1367
1489
|
copy: "\u590D\u5236",
|
|
@@ -1377,12 +1499,15 @@ var zh_default = {
|
|
|
1377
1499
|
},
|
|
1378
1500
|
networks: {
|
|
1379
1501
|
chainFallback: "\u94FE {{chainId}}",
|
|
1380
|
-
|
|
1381
|
-
min: "\u6700\u4F4E ${{min}}"
|
|
1502
|
+
minimum: "\u6700\u4F4E ${{min}}"
|
|
1382
1503
|
},
|
|
1383
1504
|
qrCode: {
|
|
1384
1505
|
title: "\u4E8C\u7EF4\u7801"
|
|
1385
1506
|
},
|
|
1507
|
+
selectChain: {
|
|
1508
|
+
subtitle: "\u9009\u62E9\u5B58\u5165\u7684\u7F51\u7EDC",
|
|
1509
|
+
title: "\u5B58\u5165\u52A0\u5BC6\u8D27\u5E01"
|
|
1510
|
+
},
|
|
1386
1511
|
selectMethod: {
|
|
1387
1512
|
crypto: "\u52A0\u5BC6\u8D27\u5E01",
|
|
1388
1513
|
depositTo: "\u5B58\u5165",
|
|
@@ -1394,9 +1519,10 @@ var zh_default = {
|
|
|
1394
1519
|
title: "\u6DFB\u52A0\u8D44\u91D1"
|
|
1395
1520
|
},
|
|
1396
1521
|
transferCrypto: {
|
|
1397
|
-
|
|
1522
|
+
changeChain: "\u66F4\u6539\u94FE",
|
|
1398
1523
|
depositAddressLabel: "\u60A8\u7684\u5165\u91D1\u5730\u5740",
|
|
1399
1524
|
generating: "\u751F\u6210\u4E2D\u2026",
|
|
1525
|
+
selectedChain: "\u5DF2\u9009\u62E9\u7684\u94FE",
|
|
1400
1526
|
share: "\u5206\u4EAB",
|
|
1401
1527
|
shareAddress: "\u5206\u4EAB\u5730\u5740",
|
|
1402
1528
|
showQrCode: "\u663E\u793A\u4E8C\u7EF4\u7801",
|
|
@@ -1405,9 +1531,16 @@ var zh_default = {
|
|
|
1405
1531
|
withdraw: {
|
|
1406
1532
|
belowMinimumMessage: "\u60A8\u7684\u4F59\u989D\u4F4E\u4E8E\u73B0\u91D1\u63D0\u6B3E\u7684\u6700\u4F4E\u9650\u989D\u3002",
|
|
1407
1533
|
belowMinimumTitle: "\u4F59\u989D\u4E0D\u8DB3",
|
|
1534
|
+
cashMethodsError: "\u52A0\u8F7D\u73B0\u91D1\u63D0\u53D6\u65B9\u5F0F\u5931\u8D25\u3002\u4F60\u4ECD\u53EF\u901A\u8FC7\u52A0\u5BC6\u8D27\u5E01\u63D0\u53D6\u3002",
|
|
1535
|
+
noCashMethods: "\u94F6\u884C\u548C\u94F6\u884C\u5361\u63D0\u73B0\u5728\u4F60\u6240\u5728\u5730\u533A\u4E0D\u53EF\u7528\u3002\u4F60\u4ECD\u53EF\u901A\u8FC7\u52A0\u5BC6\u8D27\u5E01\u63D0\u53D6\u3002",
|
|
1408
1536
|
title: "\u63D0\u6B3E",
|
|
1409
1537
|
unavailableMessage: "\u73B0\u91D1\u63D0\u6B3E\u76EE\u524D\u5728\u60A8\u6240\u5728\u7684\u5730\u533A\u4E0D\u53EF\u7528\u3002",
|
|
1410
1538
|
unavailableTitle: "\u63D0\u6B3E\u4E0D\u53EF\u7528"
|
|
1539
|
+
},
|
|
1540
|
+
withdrawCrypto: {
|
|
1541
|
+
methodSubtitle: "\u65E0\u9650\u989D",
|
|
1542
|
+
methodTitle: "\u52A0\u5BC6\u8D27\u5E01\u5730\u5740",
|
|
1543
|
+
title: "\u63D0\u53D6\u52A0\u5BC6\u8D27\u5E01"
|
|
1411
1544
|
}
|
|
1412
1545
|
};
|
|
1413
1546
|
|
|
@@ -1445,9 +1578,9 @@ void i18n.init({
|
|
|
1445
1578
|
});
|
|
1446
1579
|
|
|
1447
1580
|
// src/providers/FunkitI18nProvider.tsx
|
|
1448
|
-
import { jsx as
|
|
1581
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
1449
1582
|
var DEFAULT_VALUE = { t: i18n.t.bind(i18n), locale: "en" };
|
|
1450
|
-
var FunkitI18nContext =
|
|
1583
|
+
var FunkitI18nContext = createContext3(DEFAULT_VALUE);
|
|
1451
1584
|
function FunkitI18nProvider({
|
|
1452
1585
|
children,
|
|
1453
1586
|
locale = "en"
|
|
@@ -1464,19 +1597,19 @@ function FunkitI18nProvider({
|
|
|
1464
1597
|
}, [locale]);
|
|
1465
1598
|
const t = useMemo4(() => i18n.getFixedT(language), [language]);
|
|
1466
1599
|
const value = useMemo4(() => ({ t, locale }), [t, locale]);
|
|
1467
|
-
return /* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ jsx6(FunkitI18nContext.Provider, { value, children });
|
|
1468
1601
|
}
|
|
1469
1602
|
function useFunkitTranslation() {
|
|
1470
|
-
return
|
|
1603
|
+
return useContext3(FunkitI18nContext);
|
|
1471
1604
|
}
|
|
1472
1605
|
|
|
1473
1606
|
// src/icons/CryptoBitcoinIcon.tsx
|
|
1474
1607
|
import { SvgXml as SvgXml3 } from "react-native-svg";
|
|
1475
|
-
import { jsx as
|
|
1608
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1476
1609
|
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>`;
|
|
1477
1610
|
function CryptoBitcoinIcon({ size = 28 }) {
|
|
1478
1611
|
const theme = useTheme();
|
|
1479
|
-
return /* @__PURE__ */
|
|
1612
|
+
return /* @__PURE__ */ jsx7(
|
|
1480
1613
|
SvgXml3,
|
|
1481
1614
|
{
|
|
1482
1615
|
xml: CIRCLE_BITCOIN_SVG,
|
|
@@ -1493,7 +1626,7 @@ var chainIconUri = (chainKey) => `${CDN_BASE}/${chainKey}.svg`;
|
|
|
1493
1626
|
var tokenLogoUri = (symbol) => ASSET_LOGO_SRCS[symbol.toUpperCase()] ?? `${CDN_BASE}/${symbol.toLowerCase()}.svg`;
|
|
1494
1627
|
|
|
1495
1628
|
// src/icons/QrChainCluster.tsx
|
|
1496
|
-
import { jsx as
|
|
1629
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1497
1630
|
function toIconUri(icon) {
|
|
1498
1631
|
return icon.startsWith("http") ? icon : chainIconUri(icon);
|
|
1499
1632
|
}
|
|
@@ -1509,7 +1642,7 @@ function QrChainCluster({ iconKeys, max = 4 }) {
|
|
|
1509
1642
|
return null;
|
|
1510
1643
|
}
|
|
1511
1644
|
if (keys.length === 1) {
|
|
1512
|
-
return /* @__PURE__ */
|
|
1645
|
+
return /* @__PURE__ */ jsx8(Box, { alignItems: "center", justifyContent: "center", style: card, children: /* @__PURE__ */ jsx8(Box, { style: ring(SINGLE_SIZE), children: /* @__PURE__ */ jsx8(
|
|
1513
1646
|
FunIcon,
|
|
1514
1647
|
{
|
|
1515
1648
|
uri: toIconUri(first),
|
|
@@ -1518,7 +1651,7 @@ function QrChainCluster({ iconKeys, max = 4 }) {
|
|
|
1518
1651
|
}
|
|
1519
1652
|
) }) });
|
|
1520
1653
|
}
|
|
1521
|
-
return /* @__PURE__ */
|
|
1654
|
+
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(
|
|
1522
1655
|
FunIcon,
|
|
1523
1656
|
{
|
|
1524
1657
|
uri: toIconUri(key),
|
|
@@ -1547,13 +1680,13 @@ var ring = (iconSize) => ({
|
|
|
1547
1680
|
|
|
1548
1681
|
// src/icons/FigmaSystemIcons.tsx
|
|
1549
1682
|
import { SvgXml as SvgXml4 } from "react-native-svg";
|
|
1550
|
-
import { jsx as
|
|
1683
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1551
1684
|
function useIconColor(color) {
|
|
1552
1685
|
const theme = useTheme();
|
|
1553
1686
|
return color ?? theme.content.elements.primary;
|
|
1554
1687
|
}
|
|
1555
1688
|
function renderIcon(svg, size, color) {
|
|
1556
|
-
return /* @__PURE__ */
|
|
1689
|
+
return /* @__PURE__ */ jsx9(
|
|
1557
1690
|
SvgXml4,
|
|
1558
1691
|
{
|
|
1559
1692
|
xml: svg.replace(/currentColor/g, color),
|
|
@@ -1586,7 +1719,7 @@ function FigmaChevronLeftIcon({ size = 20, color }) {
|
|
|
1586
1719
|
return renderIcon(CHEVRON_LEFT_SVG, size, useIconColor(color));
|
|
1587
1720
|
}
|
|
1588
1721
|
function FigmaSuccessCheckIcon({ size = 16 }) {
|
|
1589
|
-
return /* @__PURE__ */
|
|
1722
|
+
return /* @__PURE__ */ jsx9(SvgXml4, { xml: SUCCESS_CHECK_SVG, width: size, height: size });
|
|
1590
1723
|
}
|
|
1591
1724
|
function FigmaChevronDownIcon({ size = 16, color }) {
|
|
1592
1725
|
return renderIcon(CHEVRON_DOWN_SVG, size, useIconColor(color));
|
|
@@ -1604,7 +1737,7 @@ function FigmaAlertCircleIcon({ size = 22, color }) {
|
|
|
1604
1737
|
}
|
|
1605
1738
|
|
|
1606
1739
|
// src/icons/SourceTokenCluster.tsx
|
|
1607
|
-
import { jsx as
|
|
1740
|
+
import { jsx as jsx10, jsxs } from "react/jsx-runtime";
|
|
1608
1741
|
function toIconUri2(icon) {
|
|
1609
1742
|
return icon.startsWith("http") ? icon : chainIconUri(icon);
|
|
1610
1743
|
}
|
|
@@ -1619,14 +1752,14 @@ function SourceTokenCluster({
|
|
|
1619
1752
|
const visible = icons.slice(0, maxVisible);
|
|
1620
1753
|
const overflow = icons.length - visible.length;
|
|
1621
1754
|
return /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "center", style: { gap }, children: [
|
|
1622
|
-
visible.map((icon) => /* @__PURE__ */
|
|
1755
|
+
visible.map((icon) => /* @__PURE__ */ jsx10(
|
|
1623
1756
|
Box,
|
|
1624
1757
|
{
|
|
1625
1758
|
style: [
|
|
1626
1759
|
iconRing(size),
|
|
1627
1760
|
{ backgroundColor: theme.background.secondary }
|
|
1628
1761
|
],
|
|
1629
|
-
children: /* @__PURE__ */
|
|
1762
|
+
children: /* @__PURE__ */ jsx10(
|
|
1630
1763
|
FunIcon,
|
|
1631
1764
|
{
|
|
1632
1765
|
uri: toIconUri2(icon),
|
|
@@ -1641,7 +1774,7 @@ function SourceTokenCluster({
|
|
|
1641
1774
|
// Both chips are a fixed `size`×`size` circle (Figma). The "+" glyph sits
|
|
1642
1775
|
// on `bgSecondary` (Add money `crypto2`); the "+N" count on `pillPressed`
|
|
1643
1776
|
// (Transfer `tap-target`).
|
|
1644
|
-
/* @__PURE__ */
|
|
1777
|
+
/* @__PURE__ */ jsx10(
|
|
1645
1778
|
Box,
|
|
1646
1779
|
{
|
|
1647
1780
|
alignItems: "center",
|
|
@@ -1654,14 +1787,14 @@ function SourceTokenCluster({
|
|
|
1654
1787
|
],
|
|
1655
1788
|
children: overflowMode === "plus" ? (
|
|
1656
1789
|
// The geometric "+" glyph centers cleanly; the text "+" did not.
|
|
1657
|
-
/* @__PURE__ */
|
|
1790
|
+
/* @__PURE__ */ jsx10(
|
|
1658
1791
|
FigmaPlusIcon,
|
|
1659
1792
|
{
|
|
1660
1793
|
size,
|
|
1661
1794
|
color: theme.content.elements.secondary
|
|
1662
1795
|
}
|
|
1663
1796
|
)
|
|
1664
|
-
) : /* @__PURE__ */
|
|
1797
|
+
) : /* @__PURE__ */ jsx10(
|
|
1665
1798
|
Text,
|
|
1666
1799
|
{
|
|
1667
1800
|
variant: "bodyMedium",
|
|
@@ -1700,7 +1833,7 @@ var overflowText = (size) => ({
|
|
|
1700
1833
|
});
|
|
1701
1834
|
|
|
1702
1835
|
// src/icons/TokenChainIcon.tsx
|
|
1703
|
-
import { jsx as
|
|
1836
|
+
import { jsx as jsx11, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1704
1837
|
function TokenChainIcon({
|
|
1705
1838
|
symbol,
|
|
1706
1839
|
iconSrc,
|
|
@@ -1710,7 +1843,7 @@ function TokenChainIcon({
|
|
|
1710
1843
|
const theme = useTheme();
|
|
1711
1844
|
const badge = Math.round(size * 0.5);
|
|
1712
1845
|
return /* @__PURE__ */ jsxs2(Box, { width: size, height: size, children: [
|
|
1713
|
-
/* @__PURE__ */
|
|
1846
|
+
/* @__PURE__ */ jsx11(
|
|
1714
1847
|
FunIcon,
|
|
1715
1848
|
{
|
|
1716
1849
|
uri: iconSrc ?? tokenLogoUri(symbol),
|
|
@@ -1718,7 +1851,7 @@ function TokenChainIcon({
|
|
|
1718
1851
|
fallbackUri: FALLBACK_ASSET_LOGO
|
|
1719
1852
|
}
|
|
1720
1853
|
),
|
|
1721
|
-
chainKey ? /* @__PURE__ */
|
|
1854
|
+
chainKey ? /* @__PURE__ */ jsx11(
|
|
1722
1855
|
Box,
|
|
1723
1856
|
{
|
|
1724
1857
|
borderRadius: "rounded",
|
|
@@ -1728,7 +1861,7 @@ function TokenChainIcon({
|
|
|
1728
1861
|
badgeRing(badge),
|
|
1729
1862
|
{ backgroundColor: theme.background.modal }
|
|
1730
1863
|
],
|
|
1731
|
-
children: /* @__PURE__ */
|
|
1864
|
+
children: /* @__PURE__ */ jsx11(
|
|
1732
1865
|
FunIcon,
|
|
1733
1866
|
{
|
|
1734
1867
|
uri: chainIconUri(chainKey),
|
|
@@ -1761,17 +1894,17 @@ import Reanimated, {
|
|
|
1761
1894
|
|
|
1762
1895
|
// src/icons/StatusIcon.tsx
|
|
1763
1896
|
import { StyleSheet } from "react-native";
|
|
1764
|
-
import { jsx as
|
|
1897
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1765
1898
|
function StatusIcon() {
|
|
1766
1899
|
const theme = useTheme();
|
|
1767
|
-
return /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ jsx12(
|
|
1768
1901
|
Box,
|
|
1769
1902
|
{
|
|
1770
1903
|
borderRadius: "rounded",
|
|
1771
1904
|
alignItems: "center",
|
|
1772
1905
|
justifyContent: "center",
|
|
1773
1906
|
style: [styles.circle, { backgroundColor: theme.background.secondary }],
|
|
1774
|
-
children: /* @__PURE__ */
|
|
1907
|
+
children: /* @__PURE__ */ jsx12(
|
|
1775
1908
|
FigmaAlertCircleIcon,
|
|
1776
1909
|
{
|
|
1777
1910
|
size: 20,
|
|
@@ -1786,7 +1919,7 @@ var styles = StyleSheet.create({
|
|
|
1786
1919
|
});
|
|
1787
1920
|
|
|
1788
1921
|
// src/screens/SelectMethodScreen.tsx
|
|
1789
|
-
import { Fragment, jsx as
|
|
1922
|
+
import { Fragment, jsx as jsx13, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1790
1923
|
var DROPDOWN_OPEN_DURATION = 250;
|
|
1791
1924
|
var DROPDOWN_CLOSE_DURATION = 150;
|
|
1792
1925
|
var DROPDOWN_EASING = Easing.bezier(0.22, 1, 0.36, 1);
|
|
@@ -1839,6 +1972,7 @@ function SelectMethodScreen(props) {
|
|
|
1839
1972
|
skeletonCount,
|
|
1840
1973
|
error = false,
|
|
1841
1974
|
onRetry,
|
|
1975
|
+
note,
|
|
1842
1976
|
errorTitle,
|
|
1843
1977
|
errorMessage,
|
|
1844
1978
|
receiveTokens,
|
|
@@ -1851,6 +1985,29 @@ function SelectMethodScreen(props) {
|
|
|
1851
1985
|
const showDropdown = receiveTokens && receiveTokens.length > 0 && selected;
|
|
1852
1986
|
const [dropdownOpen, setDropdownOpen] = useState5(initialDropdownOpen);
|
|
1853
1987
|
const scrimVisible = !error && showDropdown && dropdownOpen;
|
|
1988
|
+
const methodRows = methods.map((method, i) => /* @__PURE__ */ jsxs3(Box, { children: [
|
|
1989
|
+
i > 0 ? /* @__PURE__ */ jsx13(MethodDivider, {}) : null,
|
|
1990
|
+
/* @__PURE__ */ jsx13(
|
|
1991
|
+
Pressable,
|
|
1992
|
+
{
|
|
1993
|
+
onPress: method.disabled ? void 0 : () => onSelectMethod(method.id),
|
|
1994
|
+
disabled: method.disabled,
|
|
1995
|
+
accessibilityRole: "button",
|
|
1996
|
+
accessibilityLabel: method.title,
|
|
1997
|
+
accessibilityState: { disabled: !!method.disabled },
|
|
1998
|
+
style: method.disabled ? { opacity: theme.opacity.disabled / 100 } : void 0,
|
|
1999
|
+
children: /* @__PURE__ */ jsx13(PaymentMethodRow, { method })
|
|
2000
|
+
}
|
|
2001
|
+
)
|
|
2002
|
+
] }, method.id));
|
|
2003
|
+
const noteText = note ? /* @__PURE__ */ jsx13(Box, { style: noteBox, children: /* @__PURE__ */ jsx13(
|
|
2004
|
+
Text,
|
|
2005
|
+
{
|
|
2006
|
+
variant: "detail",
|
|
2007
|
+
style: { color: theme.content.elements.secondary },
|
|
2008
|
+
children: note
|
|
2009
|
+
}
|
|
2010
|
+
) }) : null;
|
|
1854
2011
|
return /* @__PURE__ */ jsxs3(
|
|
1855
2012
|
Box,
|
|
1856
2013
|
{
|
|
@@ -1859,7 +2016,7 @@ function SelectMethodScreen(props) {
|
|
|
1859
2016
|
style: { backgroundColor: theme.background.modal },
|
|
1860
2017
|
children: [
|
|
1861
2018
|
/* @__PURE__ */ jsxs3(Box, { alignItems: "center", style: topBar, children: [
|
|
1862
|
-
/* @__PURE__ */
|
|
2019
|
+
/* @__PURE__ */ jsx13(
|
|
1863
2020
|
Box,
|
|
1864
2021
|
{
|
|
1865
2022
|
style: [
|
|
@@ -1868,7 +2025,7 @@ function SelectMethodScreen(props) {
|
|
|
1868
2025
|
]
|
|
1869
2026
|
}
|
|
1870
2027
|
),
|
|
1871
|
-
/* @__PURE__ */
|
|
2028
|
+
/* @__PURE__ */ jsx13(
|
|
1872
2029
|
Text,
|
|
1873
2030
|
{
|
|
1874
2031
|
variant: "bodyMedium",
|
|
@@ -1877,14 +2034,14 @@ function SelectMethodScreen(props) {
|
|
|
1877
2034
|
}
|
|
1878
2035
|
)
|
|
1879
2036
|
] }),
|
|
1880
|
-
error ? /* @__PURE__ */
|
|
2037
|
+
error ? /* @__PURE__ */ jsx13(
|
|
1881
2038
|
SelectMethodError,
|
|
1882
2039
|
{
|
|
1883
2040
|
title: errorTitle,
|
|
1884
2041
|
message: errorMessage,
|
|
1885
2042
|
onRetry
|
|
1886
2043
|
}
|
|
1887
|
-
) : loading ? /* @__PURE__ */
|
|
2044
|
+
) : loading ? /* @__PURE__ */ jsx13(
|
|
1888
2045
|
SelectMethodLoading,
|
|
1889
2046
|
{
|
|
1890
2047
|
count: skeletonCount,
|
|
@@ -1892,7 +2049,7 @@ function SelectMethodScreen(props) {
|
|
|
1892
2049
|
}
|
|
1893
2050
|
) : /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
1894
2051
|
showDropdown ? /* @__PURE__ */ jsxs3(Box, { style: depositSection, children: [
|
|
1895
|
-
/* @__PURE__ */
|
|
2052
|
+
/* @__PURE__ */ jsx13(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx13(
|
|
1896
2053
|
Text,
|
|
1897
2054
|
{
|
|
1898
2055
|
variant: "detail",
|
|
@@ -1901,7 +2058,7 @@ function SelectMethodScreen(props) {
|
|
|
1901
2058
|
children: t("selectMethod.depositTo")
|
|
1902
2059
|
}
|
|
1903
2060
|
) }),
|
|
1904
|
-
/* @__PURE__ */
|
|
2061
|
+
/* @__PURE__ */ jsx13(
|
|
1905
2062
|
ReceiveTokenDropdown,
|
|
1906
2063
|
{
|
|
1907
2064
|
tokens: receiveTokens,
|
|
@@ -1919,7 +2076,7 @@ function SelectMethodScreen(props) {
|
|
|
1919
2076
|
// "Pay with" section: a labeled, bordered card wrapping the method
|
|
1920
2077
|
// rows with hairline dividers between them (Figma node 11202:8282).
|
|
1921
2078
|
/* @__PURE__ */ jsxs3(Box, { style: payWithSection, children: [
|
|
1922
|
-
/* @__PURE__ */
|
|
2079
|
+
/* @__PURE__ */ jsx13(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx13(
|
|
1923
2080
|
Text,
|
|
1924
2081
|
{
|
|
1925
2082
|
variant: "detail",
|
|
@@ -1928,7 +2085,7 @@ function SelectMethodScreen(props) {
|
|
|
1928
2085
|
children: t("selectMethod.payWith")
|
|
1929
2086
|
}
|
|
1930
2087
|
) }),
|
|
1931
|
-
/* @__PURE__ */
|
|
2088
|
+
/* @__PURE__ */ jsx13(
|
|
1932
2089
|
Box,
|
|
1933
2090
|
{
|
|
1934
2091
|
borderWidth: 1,
|
|
@@ -1940,46 +2097,28 @@ function SelectMethodScreen(props) {
|
|
|
1940
2097
|
borderColor: theme.border.elements.default.color
|
|
1941
2098
|
}
|
|
1942
2099
|
],
|
|
1943
|
-
children:
|
|
1944
|
-
i > 0 ? /* @__PURE__ */ jsx12(MethodDivider, {}) : null,
|
|
1945
|
-
/* @__PURE__ */ jsx12(
|
|
1946
|
-
Pressable,
|
|
1947
|
-
{
|
|
1948
|
-
onPress: () => onSelectMethod(method.id),
|
|
1949
|
-
accessibilityRole: "button",
|
|
1950
|
-
accessibilityLabel: method.title,
|
|
1951
|
-
children: /* @__PURE__ */ jsx12(PaymentMethodRow, { method })
|
|
1952
|
-
}
|
|
1953
|
-
)
|
|
1954
|
-
] }, method.id))
|
|
2100
|
+
children: methodRows
|
|
1955
2101
|
}
|
|
1956
|
-
)
|
|
2102
|
+
),
|
|
2103
|
+
noteText
|
|
1957
2104
|
] })
|
|
1958
2105
|
) : (
|
|
1959
2106
|
// Methods-only: bare rows with full-width hairline dividers, no
|
|
1960
2107
|
// outer border (Figma node 11202:8632).
|
|
1961
|
-
/* @__PURE__ */
|
|
2108
|
+
/* @__PURE__ */ jsxs3(
|
|
1962
2109
|
ScrollView,
|
|
1963
2110
|
{
|
|
1964
2111
|
contentContainerStyle: listContent,
|
|
1965
2112
|
showsVerticalScrollIndicator: false,
|
|
1966
|
-
children:
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
{
|
|
1971
|
-
onPress: () => onSelectMethod(method.id),
|
|
1972
|
-
accessibilityRole: "button",
|
|
1973
|
-
accessibilityLabel: method.title,
|
|
1974
|
-
children: /* @__PURE__ */ jsx12(PaymentMethodRow, { method })
|
|
1975
|
-
}
|
|
1976
|
-
)
|
|
1977
|
-
] }, method.id))
|
|
2113
|
+
children: [
|
|
2114
|
+
methodRows,
|
|
2115
|
+
noteText
|
|
2116
|
+
]
|
|
1978
2117
|
}
|
|
1979
2118
|
)
|
|
1980
2119
|
)
|
|
1981
2120
|
] }),
|
|
1982
|
-
scrimVisible ? /* @__PURE__ */
|
|
2121
|
+
scrimVisible ? /* @__PURE__ */ jsx13(
|
|
1983
2122
|
AnimatedPressable,
|
|
1984
2123
|
{
|
|
1985
2124
|
entering: scrimEnter,
|
|
@@ -2003,9 +2142,9 @@ function SelectMethodError({
|
|
|
2003
2142
|
const theme = useTheme();
|
|
2004
2143
|
const retryLabel = t("common.tryAgain");
|
|
2005
2144
|
return /* @__PURE__ */ jsxs3(Box, { alignItems: "center", justifyContent: "center", style: errorContainer, children: [
|
|
2006
|
-
/* @__PURE__ */
|
|
2145
|
+
/* @__PURE__ */ jsx13(StatusIcon, {}),
|
|
2007
2146
|
/* @__PURE__ */ jsxs3(Box, { alignItems: "center", style: errorText, children: [
|
|
2008
|
-
/* @__PURE__ */
|
|
2147
|
+
/* @__PURE__ */ jsx13(
|
|
2009
2148
|
Text,
|
|
2010
2149
|
{
|
|
2011
2150
|
variant: "bodyMedium",
|
|
@@ -2013,7 +2152,7 @@ function SelectMethodError({
|
|
|
2013
2152
|
children: title
|
|
2014
2153
|
}
|
|
2015
2154
|
),
|
|
2016
|
-
/* @__PURE__ */
|
|
2155
|
+
/* @__PURE__ */ jsx13(
|
|
2017
2156
|
Text,
|
|
2018
2157
|
{
|
|
2019
2158
|
variant: "detail",
|
|
@@ -2025,13 +2164,13 @@ function SelectMethodError({
|
|
|
2025
2164
|
}
|
|
2026
2165
|
)
|
|
2027
2166
|
] }),
|
|
2028
|
-
onRetry ? /* @__PURE__ */
|
|
2167
|
+
onRetry ? /* @__PURE__ */ jsx13(
|
|
2029
2168
|
Pressable,
|
|
2030
2169
|
{
|
|
2031
2170
|
onPress: onRetry,
|
|
2032
2171
|
accessibilityRole: "button",
|
|
2033
2172
|
accessibilityLabel: retryLabel,
|
|
2034
|
-
children: /* @__PURE__ */
|
|
2173
|
+
children: /* @__PURE__ */ jsx13(
|
|
2035
2174
|
Box,
|
|
2036
2175
|
{
|
|
2037
2176
|
borderRadius: "button",
|
|
@@ -2041,7 +2180,7 @@ function SelectMethodError({
|
|
|
2041
2180
|
retryButton,
|
|
2042
2181
|
{ backgroundColor: theme.background.button.primary.default }
|
|
2043
2182
|
],
|
|
2044
|
-
children: /* @__PURE__ */
|
|
2183
|
+
children: /* @__PURE__ */ jsx13(
|
|
2045
2184
|
Text,
|
|
2046
2185
|
{
|
|
2047
2186
|
variant: "bodyMedium",
|
|
@@ -2065,9 +2204,9 @@ function PaymentMethodRow({ method }) {
|
|
|
2065
2204
|
gap: "elementsHorizontal",
|
|
2066
2205
|
style: row,
|
|
2067
2206
|
children: [
|
|
2068
|
-
/* @__PURE__ */
|
|
2207
|
+
/* @__PURE__ */ jsx13(Box, { width: 48, height: 48, alignItems: "center", justifyContent: "center", children: method.icon }),
|
|
2069
2208
|
/* @__PURE__ */ jsxs3(Box, { flex: 1, style: details, children: [
|
|
2070
|
-
/* @__PURE__ */
|
|
2209
|
+
/* @__PURE__ */ jsx13(
|
|
2071
2210
|
Text,
|
|
2072
2211
|
{
|
|
2073
2212
|
variant: "bodyMedium",
|
|
@@ -2075,7 +2214,7 @@ function PaymentMethodRow({ method }) {
|
|
|
2075
2214
|
children: method.title
|
|
2076
2215
|
}
|
|
2077
2216
|
),
|
|
2078
|
-
method.subtitle ? /* @__PURE__ */
|
|
2217
|
+
method.subtitle ? /* @__PURE__ */ jsx13(
|
|
2079
2218
|
Text,
|
|
2080
2219
|
{
|
|
2081
2220
|
variant: "detail",
|
|
@@ -2091,7 +2230,7 @@ function PaymentMethodRow({ method }) {
|
|
|
2091
2230
|
}
|
|
2092
2231
|
function MethodDivider() {
|
|
2093
2232
|
const theme = useTheme();
|
|
2094
|
-
return /* @__PURE__ */
|
|
2233
|
+
return /* @__PURE__ */ jsx13(
|
|
2095
2234
|
Box,
|
|
2096
2235
|
{
|
|
2097
2236
|
style: [
|
|
@@ -2111,7 +2250,7 @@ function ReceiveTokenDropdown({
|
|
|
2111
2250
|
const theme = useTheme();
|
|
2112
2251
|
const selectable = tokens.length > 1;
|
|
2113
2252
|
return /* @__PURE__ */ jsxs3(Box, { style: dropdownAnchor, children: [
|
|
2114
|
-
/* @__PURE__ */
|
|
2253
|
+
/* @__PURE__ */ jsx13(
|
|
2115
2254
|
Pressable,
|
|
2116
2255
|
{
|
|
2117
2256
|
onPress: selectable ? onToggle : void 0,
|
|
@@ -2134,8 +2273,8 @@ function ReceiveTokenDropdown({
|
|
|
2134
2273
|
],
|
|
2135
2274
|
children: [
|
|
2136
2275
|
/* @__PURE__ */ jsxs3(Box, { flexDirection: "row", alignItems: "center", style: triggerLeft, children: [
|
|
2137
|
-
selected.icon ?? /* @__PURE__ */
|
|
2138
|
-
/* @__PURE__ */
|
|
2276
|
+
selected.icon ?? /* @__PURE__ */ jsx13(ReceiveTokenIconFallback, {}),
|
|
2277
|
+
/* @__PURE__ */ jsx13(
|
|
2139
2278
|
Text,
|
|
2140
2279
|
{
|
|
2141
2280
|
variant: "bodyMedium",
|
|
@@ -2145,24 +2284,24 @@ function ReceiveTokenDropdown({
|
|
|
2145
2284
|
}
|
|
2146
2285
|
)
|
|
2147
2286
|
] }),
|
|
2148
|
-
selectable ? /* @__PURE__ */
|
|
2287
|
+
selectable ? /* @__PURE__ */ jsx13(AnimatedChevron, { open }) : null
|
|
2149
2288
|
]
|
|
2150
2289
|
}
|
|
2151
2290
|
)
|
|
2152
2291
|
}
|
|
2153
2292
|
),
|
|
2154
|
-
open && selectable ? /* @__PURE__ */
|
|
2293
|
+
open && selectable ? /* @__PURE__ */ jsx13(
|
|
2155
2294
|
Reanimated.View,
|
|
2156
2295
|
{
|
|
2157
2296
|
entering: menuEnter,
|
|
2158
2297
|
exiting: menuExit,
|
|
2159
2298
|
style: dropdownMenuOverlay,
|
|
2160
|
-
children: /* @__PURE__ */
|
|
2299
|
+
children: /* @__PURE__ */ jsx13(
|
|
2161
2300
|
Box,
|
|
2162
2301
|
{
|
|
2163
2302
|
borderRadius: "element",
|
|
2164
2303
|
style: [dropdownMenu, { backgroundColor: theme.background.modal }],
|
|
2165
|
-
children: tokens.map((token) => /* @__PURE__ */
|
|
2304
|
+
children: tokens.map((token) => /* @__PURE__ */ jsx13(
|
|
2166
2305
|
Pressable,
|
|
2167
2306
|
{
|
|
2168
2307
|
onPress: () => onSelect(token.id),
|
|
@@ -2183,8 +2322,8 @@ function ReceiveTokenDropdown({
|
|
|
2183
2322
|
alignItems: "center",
|
|
2184
2323
|
style: triggerLeft,
|
|
2185
2324
|
children: [
|
|
2186
|
-
token.icon ?? /* @__PURE__ */
|
|
2187
|
-
/* @__PURE__ */
|
|
2325
|
+
token.icon ?? /* @__PURE__ */ jsx13(ReceiveTokenIconFallback, {}),
|
|
2326
|
+
/* @__PURE__ */ jsx13(
|
|
2188
2327
|
Text,
|
|
2189
2328
|
{
|
|
2190
2329
|
variant: "bodyMedium",
|
|
@@ -2195,7 +2334,7 @@ function ReceiveTokenDropdown({
|
|
|
2195
2334
|
]
|
|
2196
2335
|
}
|
|
2197
2336
|
),
|
|
2198
|
-
token.id === selected.id ? /* @__PURE__ */
|
|
2337
|
+
token.id === selected.id ? /* @__PURE__ */ jsx13(CheckIcon, {}) : null
|
|
2199
2338
|
]
|
|
2200
2339
|
}
|
|
2201
2340
|
)
|
|
@@ -2210,7 +2349,7 @@ function ReceiveTokenDropdown({
|
|
|
2210
2349
|
}
|
|
2211
2350
|
function ReceiveTokenIconFallback() {
|
|
2212
2351
|
const theme = useTheme();
|
|
2213
|
-
return /* @__PURE__ */
|
|
2352
|
+
return /* @__PURE__ */ jsx13(
|
|
2214
2353
|
Box,
|
|
2215
2354
|
{
|
|
2216
2355
|
width: 24,
|
|
@@ -2221,7 +2360,7 @@ function ReceiveTokenIconFallback() {
|
|
|
2221
2360
|
);
|
|
2222
2361
|
}
|
|
2223
2362
|
function ChevronDownIcon() {
|
|
2224
|
-
return /* @__PURE__ */
|
|
2363
|
+
return /* @__PURE__ */ jsx13(FigmaChevronDownIcon, { size: 16 });
|
|
2225
2364
|
}
|
|
2226
2365
|
function AnimatedChevron({ open }) {
|
|
2227
2366
|
const rotation = useSharedValue(open ? 1 : 0);
|
|
@@ -2234,10 +2373,10 @@ function AnimatedChevron({ open }) {
|
|
|
2234
2373
|
const style = useAnimatedStyle(() => ({
|
|
2235
2374
|
transform: [{ rotate: `${rotation.value * 180}deg` }]
|
|
2236
2375
|
}));
|
|
2237
|
-
return /* @__PURE__ */
|
|
2376
|
+
return /* @__PURE__ */ jsx13(Reanimated.View, { style, children: /* @__PURE__ */ jsx13(FigmaChevronDownIcon, { size: 16 }) });
|
|
2238
2377
|
}
|
|
2239
2378
|
function CheckIcon() {
|
|
2240
|
-
return /* @__PURE__ */
|
|
2379
|
+
return /* @__PURE__ */ jsx13(FigmaCheckIcon, { size: 16 });
|
|
2241
2380
|
}
|
|
2242
2381
|
function SelectMethodLoading({
|
|
2243
2382
|
count,
|
|
@@ -2249,7 +2388,7 @@ function SelectMethodLoading({
|
|
|
2249
2388
|
const rowCount = count ?? (showDropdown ? 5 : 6);
|
|
2250
2389
|
return /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
2251
2390
|
showDropdown ? /* @__PURE__ */ jsxs3(Box, { style: depositSection, children: [
|
|
2252
|
-
/* @__PURE__ */
|
|
2391
|
+
/* @__PURE__ */ jsx13(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx13(
|
|
2253
2392
|
Text,
|
|
2254
2393
|
{
|
|
2255
2394
|
variant: "detail",
|
|
@@ -2274,7 +2413,7 @@ function SelectMethodLoading({
|
|
|
2274
2413
|
],
|
|
2275
2414
|
children: [
|
|
2276
2415
|
/* @__PURE__ */ jsxs3(Animated.View, { style: [loadingSelectorLeft, { opacity }], children: [
|
|
2277
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ jsx13(
|
|
2278
2417
|
Box,
|
|
2279
2418
|
{
|
|
2280
2419
|
width: 20,
|
|
@@ -2283,7 +2422,7 @@ function SelectMethodLoading({
|
|
|
2283
2422
|
style: { backgroundColor: theme.background.pill.pressed }
|
|
2284
2423
|
}
|
|
2285
2424
|
),
|
|
2286
|
-
/* @__PURE__ */
|
|
2425
|
+
/* @__PURE__ */ jsx13(
|
|
2287
2426
|
Box,
|
|
2288
2427
|
{
|
|
2289
2428
|
style: [
|
|
@@ -2293,13 +2432,13 @@ function SelectMethodLoading({
|
|
|
2293
2432
|
}
|
|
2294
2433
|
)
|
|
2295
2434
|
] }),
|
|
2296
|
-
/* @__PURE__ */
|
|
2435
|
+
/* @__PURE__ */ jsx13(ChevronDownIcon, {})
|
|
2297
2436
|
]
|
|
2298
2437
|
}
|
|
2299
2438
|
)
|
|
2300
2439
|
] }) : null,
|
|
2301
2440
|
showDropdown ? /* @__PURE__ */ jsxs3(Box, { style: payWithSection, children: [
|
|
2302
|
-
/* @__PURE__ */
|
|
2441
|
+
/* @__PURE__ */ jsx13(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx13(
|
|
2303
2442
|
Text,
|
|
2304
2443
|
{
|
|
2305
2444
|
variant: "detail",
|
|
@@ -2307,7 +2446,7 @@ function SelectMethodLoading({
|
|
|
2307
2446
|
children: t("selectMethod.payWith")
|
|
2308
2447
|
}
|
|
2309
2448
|
) }),
|
|
2310
|
-
/* @__PURE__ */
|
|
2449
|
+
/* @__PURE__ */ jsx13(
|
|
2311
2450
|
Box,
|
|
2312
2451
|
{
|
|
2313
2452
|
borderWidth: 1,
|
|
@@ -2319,22 +2458,22 @@ function SelectMethodLoading({
|
|
|
2319
2458
|
borderColor: theme.border.elements.default.color
|
|
2320
2459
|
}
|
|
2321
2460
|
],
|
|
2322
|
-
children: /* @__PURE__ */
|
|
2461
|
+
children: /* @__PURE__ */ jsx13(
|
|
2323
2462
|
Animated.View,
|
|
2324
2463
|
{
|
|
2325
2464
|
style: { opacity },
|
|
2326
2465
|
accessibilityLabel: t("selectMethod.loadingMethods"),
|
|
2327
|
-
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */
|
|
2466
|
+
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */ jsx13(PaymentMethodRowSkeleton, {}, i))
|
|
2328
2467
|
}
|
|
2329
2468
|
)
|
|
2330
2469
|
}
|
|
2331
2470
|
)
|
|
2332
|
-
] }) : /* @__PURE__ */
|
|
2471
|
+
] }) : /* @__PURE__ */ jsx13(Box, { style: skeletonListContent, children: /* @__PURE__ */ jsx13(
|
|
2333
2472
|
Animated.View,
|
|
2334
2473
|
{
|
|
2335
2474
|
style: { opacity },
|
|
2336
2475
|
accessibilityLabel: t("selectMethod.loadingMethods"),
|
|
2337
|
-
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */
|
|
2476
|
+
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */ jsx13(PaymentMethodRowSkeleton, {}, i))
|
|
2338
2477
|
}
|
|
2339
2478
|
) })
|
|
2340
2479
|
] });
|
|
@@ -2349,7 +2488,7 @@ function PaymentMethodRowSkeleton() {
|
|
|
2349
2488
|
gap: "elementsHorizontal",
|
|
2350
2489
|
style: skeletonRow,
|
|
2351
2490
|
children: [
|
|
2352
|
-
/* @__PURE__ */
|
|
2491
|
+
/* @__PURE__ */ jsx13(
|
|
2353
2492
|
Box,
|
|
2354
2493
|
{
|
|
2355
2494
|
width: 48,
|
|
@@ -2359,7 +2498,7 @@ function PaymentMethodRowSkeleton() {
|
|
|
2359
2498
|
}
|
|
2360
2499
|
),
|
|
2361
2500
|
/* @__PURE__ */ jsxs3(Box, { flex: 1, style: skeletonDetails, children: [
|
|
2362
|
-
/* @__PURE__ */
|
|
2501
|
+
/* @__PURE__ */ jsx13(
|
|
2363
2502
|
Box,
|
|
2364
2503
|
{
|
|
2365
2504
|
style: [
|
|
@@ -2368,7 +2507,7 @@ function PaymentMethodRowSkeleton() {
|
|
|
2368
2507
|
]
|
|
2369
2508
|
}
|
|
2370
2509
|
),
|
|
2371
|
-
/* @__PURE__ */
|
|
2510
|
+
/* @__PURE__ */ jsx13(
|
|
2372
2511
|
Box,
|
|
2373
2512
|
{
|
|
2374
2513
|
style: [
|
|
@@ -2430,6 +2569,7 @@ var payWithSection = {
|
|
|
2430
2569
|
};
|
|
2431
2570
|
var sectionLabel = { paddingHorizontal: 12, paddingBottom: 6 };
|
|
2432
2571
|
var methodsCard = { paddingVertical: 2, overflow: "hidden" };
|
|
2572
|
+
var noteBox = { paddingHorizontal: 12, paddingTop: 12 };
|
|
2433
2573
|
var divider = { height: 1 };
|
|
2434
2574
|
var dropdownAnchor = { position: "relative" };
|
|
2435
2575
|
var dropdownTrigger = { height: 48, paddingHorizontal: 12 };
|
|
@@ -2487,342 +2627,82 @@ var skeletonSubtitleBar = {
|
|
|
2487
2627
|
borderRadius: 4
|
|
2488
2628
|
};
|
|
2489
2629
|
|
|
2490
|
-
// src/screens/
|
|
2491
|
-
import {
|
|
2492
|
-
import {
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
View,
|
|
2496
|
-
useWindowDimensions
|
|
2497
|
-
} from "react-native";
|
|
2498
|
-
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
2499
|
-
import Svg, { Defs, LinearGradient, Rect, Stop } from "react-native-svg";
|
|
2500
|
-
import { jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2501
|
-
var SCROLL_FADE_HEIGHT = 42;
|
|
2502
|
-
var SCROLL_EPSILON = 1;
|
|
2503
|
-
function AvailableChainsScreen(props) {
|
|
2630
|
+
// src/screens/CheckoutBlockedScreen.tsx
|
|
2631
|
+
import { Linking, Pressable as Pressable2, StyleSheet as StyleSheet2 } from "react-native";
|
|
2632
|
+
import { jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2633
|
+
var FUN_REGIONAL_RESTRICTIONS_URL = "https://intercom.help/funxyz/en/articles/9827689-regional-restrictions";
|
|
2634
|
+
function CheckoutBlockedScreen() {
|
|
2504
2635
|
const { t } = useFunkitTranslation();
|
|
2505
|
-
const {
|
|
2506
|
-
networkLabel,
|
|
2507
|
-
chains,
|
|
2508
|
-
loading = false,
|
|
2509
|
-
skeletonCount = 8,
|
|
2510
|
-
onClose
|
|
2511
|
-
} = props;
|
|
2512
|
-
const title = t("availableChains.title", { networkLabel });
|
|
2513
|
-
const gotItLabel = t("availableChains.gotIt");
|
|
2514
|
-
const { height } = useWindowDimensions();
|
|
2515
2636
|
const theme = useTheme();
|
|
2516
|
-
const insets = useSafeAreaInsets();
|
|
2517
|
-
const [showTopFade, setShowTopFade] = useState6(false);
|
|
2518
|
-
const [showBottomFade, setShowBottomFade] = useState6(false);
|
|
2519
|
-
const metrics = useRef2({ scrollY: 0, viewportH: 0, contentH: 0 });
|
|
2520
|
-
const recomputeFades = () => {
|
|
2521
|
-
const { scrollY, viewportH, contentH } = metrics.current;
|
|
2522
|
-
const overflows = contentH > viewportH + SCROLL_EPSILON;
|
|
2523
|
-
setShowTopFade(overflows && scrollY > SCROLL_EPSILON);
|
|
2524
|
-
setShowBottomFade(
|
|
2525
|
-
overflows && scrollY + viewportH < contentH - SCROLL_EPSILON
|
|
2526
|
-
);
|
|
2527
|
-
};
|
|
2528
|
-
const onScroll = (e) => {
|
|
2529
|
-
metrics.current.scrollY = e.nativeEvent.contentOffset.y;
|
|
2530
|
-
recomputeFades();
|
|
2531
|
-
};
|
|
2532
|
-
const onViewportLayout = (e) => {
|
|
2533
|
-
metrics.current.viewportH = e.nativeEvent.layout.height;
|
|
2534
|
-
recomputeFades();
|
|
2535
|
-
};
|
|
2536
|
-
const onContentSizeChange = (_w, h) => {
|
|
2537
|
-
metrics.current.contentH = h;
|
|
2538
|
-
metrics.current.scrollY = Math.min(
|
|
2539
|
-
metrics.current.scrollY,
|
|
2540
|
-
Math.max(0, h - metrics.current.viewportH)
|
|
2541
|
-
);
|
|
2542
|
-
recomputeFades();
|
|
2543
|
-
};
|
|
2544
2637
|
return /* @__PURE__ */ jsxs4(
|
|
2545
2638
|
Box,
|
|
2546
2639
|
{
|
|
2547
2640
|
borderTopLeftRadius: "modal",
|
|
2548
2641
|
borderTopRightRadius: "modal",
|
|
2549
|
-
style: {
|
|
2550
|
-
backgroundColor: theme.background.modal,
|
|
2551
|
-
// 16px gap above the home indicator (design review), device-aware.
|
|
2552
|
-
paddingBottom: insets.bottom + 16
|
|
2553
|
-
},
|
|
2642
|
+
style: { backgroundColor: theme.background.modal },
|
|
2554
2643
|
children: [
|
|
2555
|
-
/* @__PURE__ */ jsxs4(Box, {
|
|
2556
|
-
/* @__PURE__ */
|
|
2557
|
-
|
|
2644
|
+
/* @__PURE__ */ jsxs4(Box, { alignItems: "center", style: styles2.topBar, children: [
|
|
2645
|
+
/* @__PURE__ */ jsx14(
|
|
2646
|
+
Box,
|
|
2647
|
+
{
|
|
2648
|
+
style: [
|
|
2649
|
+
styles2.grabber,
|
|
2650
|
+
{ backgroundColor: theme.border.elements.default.color }
|
|
2651
|
+
]
|
|
2652
|
+
}
|
|
2653
|
+
),
|
|
2654
|
+
/* @__PURE__ */ jsx14(
|
|
2558
2655
|
Text,
|
|
2559
2656
|
{
|
|
2560
2657
|
variant: "bodyMedium",
|
|
2561
2658
|
style: { color: theme.content.elements.primary },
|
|
2562
|
-
children: title
|
|
2563
|
-
}
|
|
2564
|
-
) }),
|
|
2565
|
-
/* @__PURE__ */ jsx13(Box, { style: topBarSpacer })
|
|
2566
|
-
] }),
|
|
2567
|
-
/* @__PURE__ */ jsxs4(View, { style: scrollArea, children: [
|
|
2568
|
-
/* @__PURE__ */ jsx13(
|
|
2569
|
-
ScrollView2,
|
|
2570
|
-
{
|
|
2571
|
-
style: [list, { maxHeight: height * 0.72 }],
|
|
2572
|
-
showsVerticalScrollIndicator: false,
|
|
2573
|
-
contentContainerStyle: listContent2,
|
|
2574
|
-
onScroll,
|
|
2575
|
-
onLayout: onViewportLayout,
|
|
2576
|
-
onContentSizeChange,
|
|
2577
|
-
scrollEventThrottle: 16,
|
|
2578
|
-
children: loading ? Array.from({ length: skeletonCount }, (_, index) => /* @__PURE__ */ jsx13(AvailableChainSkeleton, {}, index)) : chains.map((chain) => /* @__PURE__ */ jsxs4(
|
|
2579
|
-
Box,
|
|
2580
|
-
{
|
|
2581
|
-
flexDirection: "row",
|
|
2582
|
-
alignItems: "center",
|
|
2583
|
-
style: row2,
|
|
2584
|
-
children: [
|
|
2585
|
-
/* @__PURE__ */ jsx13(Box, { style: iconRing2, children: /* @__PURE__ */ jsx13(
|
|
2586
|
-
FunIcon,
|
|
2587
|
-
{
|
|
2588
|
-
uri: chain.iconUri,
|
|
2589
|
-
size: 36,
|
|
2590
|
-
fallbackUri: FALLBACK_ASSET_LOGO
|
|
2591
|
-
}
|
|
2592
|
-
) }),
|
|
2593
|
-
/* @__PURE__ */ jsx13(Box, { flex: 1, children: /* @__PURE__ */ jsx13(
|
|
2594
|
-
Text,
|
|
2595
|
-
{
|
|
2596
|
-
variant: "bodyMedium",
|
|
2597
|
-
style: { color: theme.content.elements.primary },
|
|
2598
|
-
children: chain.name
|
|
2599
|
-
}
|
|
2600
|
-
) }),
|
|
2601
|
-
chain.minLabel ? /* @__PURE__ */ jsx13(
|
|
2602
|
-
Text,
|
|
2603
|
-
{
|
|
2604
|
-
variant: "detail",
|
|
2605
|
-
style: { color: theme.content.elements.secondary },
|
|
2606
|
-
children: chain.minLabel
|
|
2607
|
-
}
|
|
2608
|
-
) : null
|
|
2609
|
-
]
|
|
2610
|
-
},
|
|
2611
|
-
chain.id
|
|
2612
|
-
))
|
|
2659
|
+
children: t("selectMethod.title")
|
|
2613
2660
|
}
|
|
2614
|
-
)
|
|
2615
|
-
showTopFade ? /* @__PURE__ */ jsx13(ScrollFade, { edge: "top", color: theme.background.modal }) : null,
|
|
2616
|
-
showBottomFade ? /* @__PURE__ */ jsx13(ScrollFade, { edge: "bottom", color: theme.background.modal }) : null
|
|
2661
|
+
)
|
|
2617
2662
|
] }),
|
|
2618
|
-
/* @__PURE__ */
|
|
2619
|
-
|
|
2620
|
-
{
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
accessibilityLabel: gotItLabel,
|
|
2624
|
-
children: /* @__PURE__ */ jsx13(
|
|
2625
|
-
Box,
|
|
2663
|
+
/* @__PURE__ */ jsxs4(Box, { alignItems: "center", justifyContent: "center", style: styles2.content, children: [
|
|
2664
|
+
/* @__PURE__ */ jsx14(StatusIcon, {}),
|
|
2665
|
+
/* @__PURE__ */ jsxs4(Box, { alignItems: "center", style: styles2.textGroup, children: [
|
|
2666
|
+
/* @__PURE__ */ jsx14(
|
|
2667
|
+
Text,
|
|
2626
2668
|
{
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
borderRadius: "button",
|
|
2631
|
-
style: [
|
|
2632
|
-
gotItButton,
|
|
2633
|
-
{ backgroundColor: theme.background.button.primary.default }
|
|
2634
|
-
],
|
|
2635
|
-
children: /* @__PURE__ */ jsx13(
|
|
2636
|
-
Text,
|
|
2637
|
-
{
|
|
2638
|
-
variant: "bodyMedium",
|
|
2639
|
-
style: { color: theme.content.button.primary.default },
|
|
2640
|
-
children: gotItLabel
|
|
2641
|
-
}
|
|
2642
|
-
)
|
|
2669
|
+
variant: "bodyMedium",
|
|
2670
|
+
style: { color: theme.content.elements.primary },
|
|
2671
|
+
children: t("checkoutBlocked.notAvailable")
|
|
2643
2672
|
}
|
|
2644
|
-
)
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
{ backgroundColor: theme.background.pill.pressed }
|
|
2678
|
-
]
|
|
2679
|
-
}
|
|
2680
|
-
)
|
|
2681
|
-
] });
|
|
2682
|
-
}
|
|
2683
|
-
function ScrollFade({
|
|
2684
|
-
edge,
|
|
2685
|
-
color
|
|
2686
|
-
}) {
|
|
2687
|
-
const id = `chains-fade-${edge}`;
|
|
2688
|
-
const topOpaque = edge === "top";
|
|
2689
|
-
return /* @__PURE__ */ jsx13(
|
|
2690
|
-
View,
|
|
2691
|
-
{
|
|
2692
|
-
pointerEvents: "none",
|
|
2693
|
-
style: [fade, edge === "top" ? { top: 0 } : { bottom: 0 }],
|
|
2694
|
-
children: /* @__PURE__ */ jsxs4(Svg, { width: "100%", height: "100%", children: [
|
|
2695
|
-
/* @__PURE__ */ jsx13(Defs, { children: /* @__PURE__ */ jsxs4(LinearGradient, { id, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
2696
|
-
/* @__PURE__ */ jsx13(
|
|
2697
|
-
Stop,
|
|
2698
|
-
{
|
|
2699
|
-
offset: "0",
|
|
2700
|
-
stopColor: color,
|
|
2701
|
-
stopOpacity: topOpaque ? 1 : 0
|
|
2702
|
-
}
|
|
2703
|
-
),
|
|
2704
|
-
/* @__PURE__ */ jsx13(
|
|
2705
|
-
Stop,
|
|
2706
|
-
{
|
|
2707
|
-
offset: "1",
|
|
2708
|
-
stopColor: color,
|
|
2709
|
-
stopOpacity: topOpaque ? 0 : 1
|
|
2710
|
-
}
|
|
2711
|
-
)
|
|
2712
|
-
] }) }),
|
|
2713
|
-
/* @__PURE__ */ jsx13(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${id})` })
|
|
2714
|
-
] })
|
|
2715
|
-
}
|
|
2716
|
-
);
|
|
2717
|
-
}
|
|
2718
|
-
var scrollArea = { position: "relative" };
|
|
2719
|
-
var fade = {
|
|
2720
|
-
position: "absolute",
|
|
2721
|
-
left: 0,
|
|
2722
|
-
right: 0,
|
|
2723
|
-
height: SCROLL_FADE_HEIGHT
|
|
2724
|
-
};
|
|
2725
|
-
var topBar2 = {
|
|
2726
|
-
paddingBottom: 12,
|
|
2727
|
-
paddingHorizontal: 24,
|
|
2728
|
-
gap: 4
|
|
2729
|
-
};
|
|
2730
|
-
var topBarSpacer = { width: 32, height: 32 };
|
|
2731
|
-
var list = { width: "100%" };
|
|
2732
|
-
var listContent2 = { paddingHorizontal: 20 };
|
|
2733
|
-
var buttonContainer = { paddingHorizontal: 20, paddingTop: 16 };
|
|
2734
|
-
var gotItButton = { height: 56, paddingHorizontal: 24 };
|
|
2735
|
-
var row2 = { gap: 12, paddingVertical: 10 };
|
|
2736
|
-
var skeletonIcon = { width: 36, height: 36, borderRadius: 999 };
|
|
2737
|
-
var skeletonName = { width: 157, height: 16, borderRadius: 4 };
|
|
2738
|
-
var skeletonMin = { width: 46, height: 16, borderRadius: 4 };
|
|
2739
|
-
var iconRing2 = {
|
|
2740
|
-
width: 36,
|
|
2741
|
-
height: 36,
|
|
2742
|
-
borderRadius: 999,
|
|
2743
|
-
borderWidth: 1,
|
|
2744
|
-
borderColor: "rgba(0,0,0,0.1)",
|
|
2745
|
-
overflow: "hidden",
|
|
2746
|
-
alignItems: "center",
|
|
2747
|
-
justifyContent: "center"
|
|
2748
|
-
};
|
|
2749
|
-
|
|
2750
|
-
// src/screens/CheckoutBlockedScreen.tsx
|
|
2751
|
-
import { Linking, Pressable as Pressable3, StyleSheet as StyleSheet2 } from "react-native";
|
|
2752
|
-
import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2753
|
-
var FUN_REGIONAL_RESTRICTIONS_URL = "https://intercom.help/funxyz/en/articles/9827689-regional-restrictions";
|
|
2754
|
-
function CheckoutBlockedScreen() {
|
|
2755
|
-
const { t } = useFunkitTranslation();
|
|
2756
|
-
const theme = useTheme();
|
|
2757
|
-
return /* @__PURE__ */ jsxs5(
|
|
2758
|
-
Box,
|
|
2759
|
-
{
|
|
2760
|
-
borderTopLeftRadius: "modal",
|
|
2761
|
-
borderTopRightRadius: "modal",
|
|
2762
|
-
style: { backgroundColor: theme.background.modal },
|
|
2763
|
-
children: [
|
|
2764
|
-
/* @__PURE__ */ jsxs5(Box, { alignItems: "center", style: styles2.topBar, children: [
|
|
2765
|
-
/* @__PURE__ */ jsx14(
|
|
2766
|
-
Box,
|
|
2767
|
-
{
|
|
2768
|
-
style: [
|
|
2769
|
-
styles2.grabber,
|
|
2770
|
-
{ backgroundColor: theme.border.elements.default.color }
|
|
2771
|
-
]
|
|
2772
|
-
}
|
|
2773
|
-
),
|
|
2774
|
-
/* @__PURE__ */ jsx14(
|
|
2775
|
-
Text,
|
|
2776
|
-
{
|
|
2777
|
-
variant: "bodyMedium",
|
|
2778
|
-
style: { color: theme.content.elements.primary },
|
|
2779
|
-
children: t("selectMethod.title")
|
|
2780
|
-
}
|
|
2781
|
-
)
|
|
2782
|
-
] }),
|
|
2783
|
-
/* @__PURE__ */ jsxs5(Box, { alignItems: "center", justifyContent: "center", style: styles2.content, children: [
|
|
2784
|
-
/* @__PURE__ */ jsx14(StatusIcon, {}),
|
|
2785
|
-
/* @__PURE__ */ jsxs5(Box, { alignItems: "center", style: styles2.textGroup, children: [
|
|
2786
|
-
/* @__PURE__ */ jsx14(
|
|
2787
|
-
Text,
|
|
2788
|
-
{
|
|
2789
|
-
variant: "bodyMedium",
|
|
2790
|
-
style: { color: theme.content.elements.primary },
|
|
2791
|
-
children: t("checkoutBlocked.notAvailable")
|
|
2792
|
-
}
|
|
2793
|
-
),
|
|
2794
|
-
/* @__PURE__ */ jsxs5(Box, { alignItems: "center", children: [
|
|
2795
|
-
/* @__PURE__ */ jsx14(
|
|
2796
|
-
Text,
|
|
2797
|
-
{
|
|
2798
|
-
variant: "detail",
|
|
2799
|
-
style: [
|
|
2800
|
-
styles2.descriptionText,
|
|
2801
|
-
{ color: theme.content.elements.secondary }
|
|
2802
|
-
],
|
|
2803
|
-
children: t("checkoutBlocked.regionMessage")
|
|
2804
|
-
}
|
|
2805
|
-
),
|
|
2806
|
-
/* @__PURE__ */ jsx14(
|
|
2807
|
-
Pressable3,
|
|
2808
|
-
{
|
|
2809
|
-
onPress: () => Linking.openURL(FUN_REGIONAL_RESTRICTIONS_URL),
|
|
2810
|
-
children: /* @__PURE__ */ jsx14(
|
|
2811
|
-
Text,
|
|
2812
|
-
{
|
|
2813
|
-
variant: "detail",
|
|
2814
|
-
style: [
|
|
2815
|
-
styles2.linkText,
|
|
2816
|
-
{ color: theme.content.elements.secondary }
|
|
2817
|
-
],
|
|
2818
|
-
children: t("checkoutBlocked.viewRegions")
|
|
2819
|
-
}
|
|
2820
|
-
)
|
|
2821
|
-
}
|
|
2822
|
-
)
|
|
2823
|
-
] })
|
|
2824
|
-
] })
|
|
2825
|
-
] })
|
|
2673
|
+
),
|
|
2674
|
+
/* @__PURE__ */ jsxs4(Box, { alignItems: "center", children: [
|
|
2675
|
+
/* @__PURE__ */ jsx14(
|
|
2676
|
+
Text,
|
|
2677
|
+
{
|
|
2678
|
+
variant: "detail",
|
|
2679
|
+
style: [
|
|
2680
|
+
styles2.descriptionText,
|
|
2681
|
+
{ color: theme.content.elements.secondary }
|
|
2682
|
+
],
|
|
2683
|
+
children: t("checkoutBlocked.regionMessage")
|
|
2684
|
+
}
|
|
2685
|
+
),
|
|
2686
|
+
/* @__PURE__ */ jsx14(
|
|
2687
|
+
Pressable2,
|
|
2688
|
+
{
|
|
2689
|
+
onPress: () => Linking.openURL(FUN_REGIONAL_RESTRICTIONS_URL),
|
|
2690
|
+
children: /* @__PURE__ */ jsx14(
|
|
2691
|
+
Text,
|
|
2692
|
+
{
|
|
2693
|
+
variant: "detail",
|
|
2694
|
+
style: [
|
|
2695
|
+
styles2.linkText,
|
|
2696
|
+
{ color: theme.content.elements.secondary }
|
|
2697
|
+
],
|
|
2698
|
+
children: t("checkoutBlocked.viewRegions")
|
|
2699
|
+
}
|
|
2700
|
+
)
|
|
2701
|
+
}
|
|
2702
|
+
)
|
|
2703
|
+
] })
|
|
2704
|
+
] })
|
|
2705
|
+
] })
|
|
2826
2706
|
]
|
|
2827
2707
|
}
|
|
2828
2708
|
);
|
|
@@ -2848,24 +2728,53 @@ var styles2 = StyleSheet2.create({
|
|
|
2848
2728
|
});
|
|
2849
2729
|
|
|
2850
2730
|
// src/screens/QrCodeScreen.tsx
|
|
2851
|
-
import { useEffect as useEffect6, useRef as
|
|
2852
|
-
import { Pressable as
|
|
2731
|
+
import { useEffect as useEffect6, useRef as useRef2, useState as useState6 } from "react";
|
|
2732
|
+
import { Pressable as Pressable3 } from "react-native";
|
|
2733
|
+
|
|
2734
|
+
// src/components/Grabber.tsx
|
|
2735
|
+
import { StyleSheet as StyleSheet3 } from "react-native";
|
|
2736
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
2737
|
+
function Grabber() {
|
|
2738
|
+
const theme = useTheme();
|
|
2739
|
+
return /* @__PURE__ */ jsx15(
|
|
2740
|
+
Box,
|
|
2741
|
+
{
|
|
2742
|
+
testID: "grabber",
|
|
2743
|
+
alignItems: "center",
|
|
2744
|
+
pointerEvents: "none",
|
|
2745
|
+
style: styles3.overlay,
|
|
2746
|
+
children: /* @__PURE__ */ jsx15(
|
|
2747
|
+
Box,
|
|
2748
|
+
{
|
|
2749
|
+
style: [
|
|
2750
|
+
styles3.bar,
|
|
2751
|
+
{ backgroundColor: theme.border.elements.default.color }
|
|
2752
|
+
]
|
|
2753
|
+
}
|
|
2754
|
+
)
|
|
2755
|
+
}
|
|
2756
|
+
);
|
|
2757
|
+
}
|
|
2758
|
+
var styles3 = StyleSheet3.create({
|
|
2759
|
+
overlay: { position: "absolute", top: 8, left: 0, right: 0 },
|
|
2760
|
+
bar: { width: 36, height: 5, borderRadius: 999 }
|
|
2761
|
+
});
|
|
2853
2762
|
|
|
2854
2763
|
// src/hooks/useScreenSize.ts
|
|
2855
|
-
import { useWindowDimensions
|
|
2764
|
+
import { useWindowDimensions } from "react-native";
|
|
2856
2765
|
function useScreenSize() {
|
|
2857
|
-
const { height } =
|
|
2766
|
+
const { height } = useWindowDimensions();
|
|
2858
2767
|
const isShort = height < 700;
|
|
2859
2768
|
return { isShort };
|
|
2860
2769
|
}
|
|
2861
2770
|
|
|
2862
2771
|
// src/icons/CopyAddressIcon.tsx
|
|
2863
2772
|
import { SvgXml as SvgXml5 } from "react-native-svg";
|
|
2864
|
-
import { jsx as
|
|
2773
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
2865
2774
|
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>`;
|
|
2866
2775
|
function CopyAddressIcon({ size = 16 }) {
|
|
2867
2776
|
const theme = useTheme();
|
|
2868
|
-
return /* @__PURE__ */
|
|
2777
|
+
return /* @__PURE__ */ jsx16(
|
|
2869
2778
|
SvgXml5,
|
|
2870
2779
|
{
|
|
2871
2780
|
xml: COPY_ADDRESS_SVG,
|
|
@@ -2877,7 +2786,7 @@ function CopyAddressIcon({ size = 16 }) {
|
|
|
2877
2786
|
}
|
|
2878
2787
|
|
|
2879
2788
|
// src/screens/QrCodeScreen.tsx
|
|
2880
|
-
import { jsx as
|
|
2789
|
+
import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2881
2790
|
function QrCodeScreen(props) {
|
|
2882
2791
|
const { t } = useFunkitTranslation();
|
|
2883
2792
|
const {
|
|
@@ -2891,8 +2800,8 @@ function QrCodeScreen(props) {
|
|
|
2891
2800
|
const doneLabel = t("common.done");
|
|
2892
2801
|
const { isShort } = useScreenSize();
|
|
2893
2802
|
const theme = useTheme();
|
|
2894
|
-
const [copied, setCopied] =
|
|
2895
|
-
const copyTimer =
|
|
2803
|
+
const [copied, setCopied] = useState6(false);
|
|
2804
|
+
const copyTimer = useRef2(void 0);
|
|
2896
2805
|
useEffect6(() => () => clearTimeout(copyTimer.current), []);
|
|
2897
2806
|
const handleCopy = async () => {
|
|
2898
2807
|
const ok = await onCopyAddress?.();
|
|
@@ -2901,34 +2810,33 @@ function QrCodeScreen(props) {
|
|
|
2901
2810
|
clearTimeout(copyTimer.current);
|
|
2902
2811
|
copyTimer.current = setTimeout(() => setCopied(false), copiedFeedbackMs);
|
|
2903
2812
|
};
|
|
2904
|
-
return /* @__PURE__ */
|
|
2813
|
+
return /* @__PURE__ */ jsxs5(
|
|
2905
2814
|
Box,
|
|
2906
2815
|
{
|
|
2907
2816
|
borderTopLeftRadius: "modal",
|
|
2908
2817
|
borderTopRightRadius: "modal",
|
|
2909
2818
|
style: [sheet, { backgroundColor: theme.background.modal }],
|
|
2910
2819
|
children: [
|
|
2911
|
-
/* @__PURE__ */
|
|
2912
|
-
/* @__PURE__ */
|
|
2913
|
-
/* @__PURE__ */
|
|
2820
|
+
/* @__PURE__ */ jsxs5(Box, { alignItems: "center", style: topBar2, children: [
|
|
2821
|
+
/* @__PURE__ */ jsx17(Grabber, {}),
|
|
2822
|
+
/* @__PURE__ */ jsx17(
|
|
2914
2823
|
Text,
|
|
2915
2824
|
{
|
|
2916
2825
|
variant: "bodyMedium",
|
|
2917
2826
|
style: { color: theme.content.elements.primary },
|
|
2918
2827
|
children: t("qrCode.title")
|
|
2919
2828
|
}
|
|
2920
|
-
)
|
|
2921
|
-
/* @__PURE__ */ jsx16(Box, { style: topBarSpacer2 })
|
|
2829
|
+
)
|
|
2922
2830
|
] }),
|
|
2923
|
-
/* @__PURE__ */
|
|
2924
|
-
/* @__PURE__ */
|
|
2831
|
+
/* @__PURE__ */ jsxs5(Box, { style: { paddingVertical: isShort ? 0 : 16 }, children: [
|
|
2832
|
+
/* @__PURE__ */ jsxs5(
|
|
2925
2833
|
Box,
|
|
2926
2834
|
{
|
|
2927
2835
|
alignItems: "center",
|
|
2928
2836
|
justifyContent: "center",
|
|
2929
2837
|
style: [content, { paddingVertical: isShort ? 24 : 82 }],
|
|
2930
2838
|
children: [
|
|
2931
|
-
/* @__PURE__ */
|
|
2839
|
+
/* @__PURE__ */ jsxs5(
|
|
2932
2840
|
Box,
|
|
2933
2841
|
{
|
|
2934
2842
|
borderWidth: 1.5,
|
|
@@ -2943,7 +2851,7 @@ function QrCodeScreen(props) {
|
|
|
2943
2851
|
],
|
|
2944
2852
|
children: [
|
|
2945
2853
|
qrCode,
|
|
2946
|
-
centerIcon ? /* @__PURE__ */
|
|
2854
|
+
centerIcon ? /* @__PURE__ */ jsx17(
|
|
2947
2855
|
Box,
|
|
2948
2856
|
{
|
|
2949
2857
|
alignItems: "center",
|
|
@@ -2955,8 +2863,8 @@ function QrCodeScreen(props) {
|
|
|
2955
2863
|
]
|
|
2956
2864
|
}
|
|
2957
2865
|
),
|
|
2958
|
-
address ? /* @__PURE__ */
|
|
2959
|
-
/* @__PURE__ */
|
|
2866
|
+
address ? /* @__PURE__ */ jsxs5(Box, { alignItems: "center", style: addressGroup, children: [
|
|
2867
|
+
/* @__PURE__ */ jsx17(
|
|
2960
2868
|
Text,
|
|
2961
2869
|
{
|
|
2962
2870
|
variant: "body",
|
|
@@ -2967,13 +2875,13 @@ function QrCodeScreen(props) {
|
|
|
2967
2875
|
children: address
|
|
2968
2876
|
}
|
|
2969
2877
|
),
|
|
2970
|
-
onCopyAddress ? /* @__PURE__ */
|
|
2971
|
-
|
|
2878
|
+
onCopyAddress ? /* @__PURE__ */ jsx17(
|
|
2879
|
+
Pressable3,
|
|
2972
2880
|
{
|
|
2973
2881
|
onPress: handleCopy,
|
|
2974
2882
|
accessibilityRole: "button",
|
|
2975
2883
|
accessibilityLabel: copied ? t("common.addressCopied") : t("common.copyAddress"),
|
|
2976
|
-
children: /* @__PURE__ */
|
|
2884
|
+
children: /* @__PURE__ */ jsxs5(
|
|
2977
2885
|
Box,
|
|
2978
2886
|
{
|
|
2979
2887
|
flexDirection: "row",
|
|
@@ -2989,8 +2897,8 @@ function QrCodeScreen(props) {
|
|
|
2989
2897
|
}
|
|
2990
2898
|
],
|
|
2991
2899
|
children: [
|
|
2992
|
-
/* @__PURE__ */
|
|
2993
|
-
/* @__PURE__ */
|
|
2900
|
+
/* @__PURE__ */ jsx17(CopyAddressIcon, {}),
|
|
2901
|
+
/* @__PURE__ */ jsx17(
|
|
2994
2902
|
Text,
|
|
2995
2903
|
{
|
|
2996
2904
|
variant: "bodyMedium",
|
|
@@ -3007,13 +2915,13 @@ function QrCodeScreen(props) {
|
|
|
3007
2915
|
]
|
|
3008
2916
|
}
|
|
3009
2917
|
),
|
|
3010
|
-
/* @__PURE__ */
|
|
3011
|
-
|
|
2918
|
+
/* @__PURE__ */ jsx17(Box, { style: buttonContainer, children: /* @__PURE__ */ jsx17(
|
|
2919
|
+
Pressable3,
|
|
3012
2920
|
{
|
|
3013
2921
|
onPress: onClose,
|
|
3014
2922
|
accessibilityRole: "button",
|
|
3015
2923
|
accessibilityLabel: doneLabel,
|
|
3016
|
-
children: /* @__PURE__ */
|
|
2924
|
+
children: /* @__PURE__ */ jsx17(
|
|
3017
2925
|
Box,
|
|
3018
2926
|
{
|
|
3019
2927
|
flexDirection: "row",
|
|
@@ -3024,7 +2932,7 @@ function QrCodeScreen(props) {
|
|
|
3024
2932
|
doneButton,
|
|
3025
2933
|
{ backgroundColor: theme.background.button.primary.default }
|
|
3026
2934
|
],
|
|
3027
|
-
children: /* @__PURE__ */
|
|
2935
|
+
children: /* @__PURE__ */ jsx17(
|
|
3028
2936
|
Text,
|
|
3029
2937
|
{
|
|
3030
2938
|
variant: "bodyMedium",
|
|
@@ -3042,12 +2950,12 @@ function QrCodeScreen(props) {
|
|
|
3042
2950
|
);
|
|
3043
2951
|
}
|
|
3044
2952
|
var sheet = { paddingBottom: 34 };
|
|
3045
|
-
var
|
|
2953
|
+
var topBar2 = {
|
|
2954
|
+
height: 64,
|
|
2955
|
+
paddingTop: 25,
|
|
3046
2956
|
paddingBottom: 12,
|
|
3047
|
-
paddingHorizontal: 24
|
|
3048
|
-
gap: 4
|
|
2957
|
+
paddingHorizontal: 24
|
|
3049
2958
|
};
|
|
3050
|
-
var topBarSpacer2 = { width: 32, height: 32 };
|
|
3051
2959
|
var content = {
|
|
3052
2960
|
paddingHorizontal: 20,
|
|
3053
2961
|
gap: 40
|
|
@@ -3079,198 +2987,555 @@ var copyButton = {
|
|
|
3079
2987
|
paddingHorizontal: 20,
|
|
3080
2988
|
gap: 8
|
|
3081
2989
|
};
|
|
3082
|
-
var
|
|
2990
|
+
var buttonContainer = { paddingHorizontal: 20 };
|
|
3083
2991
|
var doneButton = { height: 56, paddingHorizontal: 24 };
|
|
3084
2992
|
|
|
3085
|
-
// src/screens/
|
|
3086
|
-
import {
|
|
3087
|
-
|
|
3088
|
-
|
|
2993
|
+
// src/screens/SelectChainScreen.tsx
|
|
2994
|
+
import {
|
|
2995
|
+
Pressable as Pressable4,
|
|
2996
|
+
ScrollView as ScrollView2,
|
|
2997
|
+
StyleSheet as StyleSheet6,
|
|
2998
|
+
View as View2,
|
|
2999
|
+
useWindowDimensions as useWindowDimensions2
|
|
3000
|
+
} from "react-native";
|
|
3001
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
3089
3002
|
|
|
3090
|
-
// src/
|
|
3091
|
-
import {
|
|
3092
|
-
import {
|
|
3093
|
-
import
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
return icon.startsWith("http") ? icon : chainIconUri(icon);
|
|
3102
|
-
}
|
|
3103
|
-
function NetworkSelector({
|
|
3104
|
-
networks,
|
|
3105
|
-
selectedId,
|
|
3106
|
-
onSelect
|
|
3003
|
+
// src/components/ScrollFade.tsx
|
|
3004
|
+
import { useRef as useRef3, useState as useState7 } from "react";
|
|
3005
|
+
import { StyleSheet as StyleSheet4, View } from "react-native";
|
|
3006
|
+
import Svg, { Defs, LinearGradient, Rect, Stop } from "react-native-svg";
|
|
3007
|
+
import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3008
|
+
var SCROLL_FADE_HEIGHT = 42;
|
|
3009
|
+
var SCROLL_EPSILON = 1;
|
|
3010
|
+
function ScrollFade({
|
|
3011
|
+
edge,
|
|
3012
|
+
color,
|
|
3013
|
+
id
|
|
3107
3014
|
}) {
|
|
3108
|
-
const
|
|
3109
|
-
|
|
3015
|
+
const gradientId = `${id}-fade-${edge}`;
|
|
3016
|
+
const topOpaque = edge === "top";
|
|
3017
|
+
return /* @__PURE__ */ jsx18(
|
|
3018
|
+
View,
|
|
3019
|
+
{
|
|
3020
|
+
pointerEvents: "none",
|
|
3021
|
+
style: [styles4.fade, edge === "top" ? { top: 0 } : { bottom: 0 }],
|
|
3022
|
+
children: /* @__PURE__ */ jsxs6(Svg, { width: "100%", height: "100%", children: [
|
|
3023
|
+
/* @__PURE__ */ jsx18(Defs, { children: /* @__PURE__ */ jsxs6(LinearGradient, { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
3024
|
+
/* @__PURE__ */ jsx18(
|
|
3025
|
+
Stop,
|
|
3026
|
+
{
|
|
3027
|
+
offset: "0",
|
|
3028
|
+
stopColor: color,
|
|
3029
|
+
stopOpacity: topOpaque ? 1 : 0
|
|
3030
|
+
}
|
|
3031
|
+
),
|
|
3032
|
+
/* @__PURE__ */ jsx18(
|
|
3033
|
+
Stop,
|
|
3034
|
+
{
|
|
3035
|
+
offset: "1",
|
|
3036
|
+
stopColor: color,
|
|
3037
|
+
stopOpacity: topOpaque ? 0 : 1
|
|
3038
|
+
}
|
|
3039
|
+
)
|
|
3040
|
+
] }) }),
|
|
3041
|
+
/* @__PURE__ */ jsx18(
|
|
3042
|
+
Rect,
|
|
3043
|
+
{
|
|
3044
|
+
x: "0",
|
|
3045
|
+
y: "0",
|
|
3046
|
+
width: "100%",
|
|
3047
|
+
height: "100%",
|
|
3048
|
+
fill: `url(#${gradientId})`
|
|
3049
|
+
}
|
|
3050
|
+
)
|
|
3051
|
+
] })
|
|
3052
|
+
}
|
|
3053
|
+
);
|
|
3054
|
+
}
|
|
3055
|
+
function useScrollEdgeFades() {
|
|
3056
|
+
const [showTopFade, setShowTopFade] = useState7(false);
|
|
3057
|
+
const [showBottomFade, setShowBottomFade] = useState7(false);
|
|
3058
|
+
const metrics = useRef3({ scrollY: 0, viewportH: 0, contentH: 0 });
|
|
3059
|
+
const recomputeFades = () => {
|
|
3060
|
+
const { scrollY, viewportH, contentH } = metrics.current;
|
|
3061
|
+
const overflows = contentH > viewportH + SCROLL_EPSILON;
|
|
3062
|
+
setShowTopFade(overflows && scrollY > SCROLL_EPSILON);
|
|
3063
|
+
setShowBottomFade(
|
|
3064
|
+
overflows && scrollY + viewportH < contentH - SCROLL_EPSILON
|
|
3065
|
+
);
|
|
3066
|
+
};
|
|
3067
|
+
const onScroll = (e) => {
|
|
3068
|
+
metrics.current.scrollY = e.nativeEvent.contentOffset.y;
|
|
3069
|
+
recomputeFades();
|
|
3070
|
+
};
|
|
3071
|
+
const onLayout = (e) => {
|
|
3072
|
+
metrics.current.viewportH = e.nativeEvent.layout.height;
|
|
3073
|
+
recomputeFades();
|
|
3074
|
+
};
|
|
3075
|
+
const onContentSizeChange = (_w, h) => {
|
|
3076
|
+
metrics.current.contentH = h;
|
|
3077
|
+
metrics.current.scrollY = Math.min(
|
|
3078
|
+
metrics.current.scrollY,
|
|
3079
|
+
Math.max(0, h - metrics.current.viewportH)
|
|
3080
|
+
);
|
|
3081
|
+
recomputeFades();
|
|
3082
|
+
};
|
|
3083
|
+
return {
|
|
3084
|
+
showTopFade,
|
|
3085
|
+
showBottomFade,
|
|
3086
|
+
scrollProps: { onScroll, onLayout, onContentSizeChange }
|
|
3087
|
+
};
|
|
3088
|
+
}
|
|
3089
|
+
var styles4 = StyleSheet4.create({
|
|
3090
|
+
fade: {
|
|
3091
|
+
position: "absolute",
|
|
3092
|
+
left: 0,
|
|
3093
|
+
right: 0,
|
|
3094
|
+
height: SCROLL_FADE_HEIGHT
|
|
3095
|
+
}
|
|
3096
|
+
});
|
|
3097
|
+
|
|
3098
|
+
// src/icons/ChainAvatar.tsx
|
|
3099
|
+
import { StyleSheet as StyleSheet5 } from "react-native";
|
|
3100
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
3101
|
+
function ChainAvatar({ uri, size = 36 }) {
|
|
3102
|
+
return /* @__PURE__ */ jsx19(Box, { style: [styles5.ring, { width: size, height: size }], children: /* @__PURE__ */ jsx19(FunIcon, { uri, size, fallbackUri: FALLBACK_ASSET_LOGO }) });
|
|
3103
|
+
}
|
|
3104
|
+
var styles5 = StyleSheet5.create({
|
|
3105
|
+
// `border/icon` has no dark-mode counterpart in the token export, so it isn't
|
|
3106
|
+
// in tokens.ts and the hairline stays a literal.
|
|
3107
|
+
ring: {
|
|
3108
|
+
borderRadius: 999,
|
|
3109
|
+
borderWidth: 1,
|
|
3110
|
+
borderColor: "rgba(0,0,0,0.1)",
|
|
3111
|
+
overflow: "hidden",
|
|
3112
|
+
alignItems: "center",
|
|
3113
|
+
justifyContent: "center"
|
|
3114
|
+
}
|
|
3115
|
+
});
|
|
3116
|
+
|
|
3117
|
+
// src/screens/SelectChainScreen.tsx
|
|
3118
|
+
import { jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3119
|
+
function SelectChainScreen(props) {
|
|
3120
|
+
const { t } = useFunkitTranslation();
|
|
3121
|
+
const { onBack, ...chainList } = props;
|
|
3110
3122
|
const theme = useTheme();
|
|
3111
|
-
|
|
3123
|
+
const insets = useSafeAreaInsets();
|
|
3124
|
+
return /* @__PURE__ */ jsxs7(
|
|
3112
3125
|
Box,
|
|
3113
3126
|
{
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3127
|
+
borderTopLeftRadius: "modal",
|
|
3128
|
+
borderTopRightRadius: "modal",
|
|
3129
|
+
style: {
|
|
3130
|
+
backgroundColor: theme.background.modal,
|
|
3131
|
+
paddingBottom: bottomInset(insets.bottom)
|
|
3132
|
+
},
|
|
3133
|
+
children: [
|
|
3134
|
+
/* @__PURE__ */ jsxs7(Box, { style: styles6.backTopBar, children: [
|
|
3135
|
+
/* @__PURE__ */ jsx20(Grabber, {}),
|
|
3136
|
+
/* @__PURE__ */ jsx20(
|
|
3137
|
+
Pressable4,
|
|
3138
|
+
{
|
|
3139
|
+
onPress: onBack,
|
|
3140
|
+
hitSlop: 8,
|
|
3141
|
+
accessibilityRole: "button",
|
|
3142
|
+
accessibilityLabel: t("common.back"),
|
|
3143
|
+
style: styles6.backPress,
|
|
3144
|
+
children: /* @__PURE__ */ jsx20(
|
|
3145
|
+
Box,
|
|
3146
|
+
{
|
|
3147
|
+
alignItems: "center",
|
|
3148
|
+
justifyContent: "center",
|
|
3149
|
+
style: [
|
|
3150
|
+
styles6.backButton,
|
|
3151
|
+
{
|
|
3152
|
+
backgroundColor: theme.background.secondary,
|
|
3153
|
+
borderColor: theme.border.elements.default.color
|
|
3154
|
+
}
|
|
3155
|
+
],
|
|
3156
|
+
children: /* @__PURE__ */ jsx20(
|
|
3157
|
+
FigmaChevronLeftIcon,
|
|
3158
|
+
{
|
|
3159
|
+
size: 24,
|
|
3160
|
+
color: theme.content.button.icon.default
|
|
3161
|
+
}
|
|
3162
|
+
)
|
|
3163
|
+
}
|
|
3164
|
+
)
|
|
3165
|
+
}
|
|
3166
|
+
)
|
|
3167
|
+
] }),
|
|
3168
|
+
/* @__PURE__ */ jsx20(
|
|
3169
|
+
ChainList,
|
|
3170
|
+
{
|
|
3171
|
+
...chainList,
|
|
3172
|
+
reservedHeight: FIRST_PICK_CHROME,
|
|
3173
|
+
header: /* @__PURE__ */ jsxs7(Box, { style: styles6.titleBlock, children: [
|
|
3174
|
+
/* @__PURE__ */ jsx20(
|
|
3175
|
+
Text,
|
|
3176
|
+
{
|
|
3177
|
+
variant: "bodyMedium",
|
|
3178
|
+
style: [
|
|
3179
|
+
styles6.titleText,
|
|
3180
|
+
{ color: theme.content.elements.primary }
|
|
3181
|
+
],
|
|
3182
|
+
children: t("selectChain.title")
|
|
3183
|
+
}
|
|
3184
|
+
),
|
|
3185
|
+
/* @__PURE__ */ jsx20(
|
|
3186
|
+
Text,
|
|
3187
|
+
{
|
|
3188
|
+
variant: "body",
|
|
3189
|
+
style: { color: theme.content.elements.secondary },
|
|
3190
|
+
children: t("selectChain.subtitle")
|
|
3191
|
+
}
|
|
3192
|
+
)
|
|
3193
|
+
] })
|
|
3194
|
+
}
|
|
3195
|
+
)
|
|
3196
|
+
]
|
|
3197
|
+
}
|
|
3198
|
+
);
|
|
3199
|
+
}
|
|
3200
|
+
function ChangeChainScreen(props) {
|
|
3201
|
+
const { t } = useFunkitTranslation();
|
|
3202
|
+
const { onCancel, ...chainList } = props;
|
|
3203
|
+
const theme = useTheme();
|
|
3204
|
+
const insets = useSafeAreaInsets();
|
|
3205
|
+
const cancelLabel = t("common.cancel");
|
|
3206
|
+
return /* @__PURE__ */ jsxs7(
|
|
3207
|
+
Box,
|
|
3208
|
+
{
|
|
3209
|
+
borderTopLeftRadius: "modal",
|
|
3210
|
+
borderTopRightRadius: "modal",
|
|
3211
|
+
style: {
|
|
3212
|
+
backgroundColor: theme.background.modal,
|
|
3213
|
+
paddingBottom: bottomInset(insets.bottom)
|
|
3214
|
+
},
|
|
3215
|
+
children: [
|
|
3216
|
+
/* @__PURE__ */ jsxs7(Box, { alignItems: "center", style: styles6.titleTopBar, children: [
|
|
3217
|
+
/* @__PURE__ */ jsx20(Grabber, {}),
|
|
3218
|
+
/* @__PURE__ */ jsx20(
|
|
3219
|
+
Text,
|
|
3220
|
+
{
|
|
3221
|
+
variant: "bodyMedium",
|
|
3222
|
+
style: { color: theme.content.elements.primary },
|
|
3223
|
+
children: t("changeChain.title")
|
|
3224
|
+
}
|
|
3225
|
+
)
|
|
3226
|
+
] }),
|
|
3227
|
+
/* @__PURE__ */ jsx20(ChainList, { ...chainList, reservedHeight: RE_PICK_CHROME }),
|
|
3228
|
+
/* @__PURE__ */ jsx20(Box, { style: styles6.buttonContainer, children: /* @__PURE__ */ jsx20(
|
|
3229
|
+
Pressable4,
|
|
3129
3230
|
{
|
|
3130
|
-
onPress:
|
|
3231
|
+
onPress: onCancel,
|
|
3131
3232
|
accessibilityRole: "button",
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
layout: animate ? segmentLayout : void 0,
|
|
3136
|
-
children: selected ? /* @__PURE__ */ jsx17(
|
|
3137
|
-
Animated2.View,
|
|
3233
|
+
accessibilityLabel: cancelLabel,
|
|
3234
|
+
children: /* @__PURE__ */ jsx20(
|
|
3235
|
+
Box,
|
|
3138
3236
|
{
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3237
|
+
alignItems: "center",
|
|
3238
|
+
justifyContent: "center",
|
|
3239
|
+
borderRadius: "button",
|
|
3240
|
+
style: [
|
|
3241
|
+
styles6.cancelButton,
|
|
3242
|
+
{ backgroundColor: theme.background.button.primary.default }
|
|
3243
|
+
],
|
|
3244
|
+
children: /* @__PURE__ */ jsx20(
|
|
3245
|
+
Text,
|
|
3246
|
+
{
|
|
3247
|
+
variant: "bodyMedium",
|
|
3248
|
+
style: { color: theme.content.button.primary.default },
|
|
3249
|
+
children: cancelLabel
|
|
3250
|
+
}
|
|
3251
|
+
)
|
|
3252
|
+
}
|
|
3253
|
+
)
|
|
3254
|
+
}
|
|
3255
|
+
) })
|
|
3256
|
+
]
|
|
3257
|
+
}
|
|
3258
|
+
);
|
|
3259
|
+
}
|
|
3260
|
+
function ChainList({
|
|
3261
|
+
chains,
|
|
3262
|
+
selectedChain,
|
|
3263
|
+
onSelectChain,
|
|
3264
|
+
loading = false,
|
|
3265
|
+
skeletonCount = 8,
|
|
3266
|
+
header,
|
|
3267
|
+
reservedHeight
|
|
3268
|
+
}) {
|
|
3269
|
+
const theme = useTheme();
|
|
3270
|
+
const { height } = useWindowDimensions2();
|
|
3271
|
+
const insets = useSafeAreaInsets();
|
|
3272
|
+
const { showTopFade, showBottomFade, scrollProps } = useScrollEdgeFades();
|
|
3273
|
+
const maxHeight = height - insets.top - bottomInset(insets.bottom) - reservedHeight;
|
|
3274
|
+
return /* @__PURE__ */ jsxs7(View2, { style: styles6.scrollArea, children: [
|
|
3275
|
+
/* @__PURE__ */ jsxs7(
|
|
3276
|
+
ScrollView2,
|
|
3277
|
+
{
|
|
3278
|
+
style: [styles6.list, { maxHeight }],
|
|
3279
|
+
showsVerticalScrollIndicator: false,
|
|
3280
|
+
contentContainerStyle: styles6.listContent,
|
|
3281
|
+
scrollEventThrottle: 16,
|
|
3282
|
+
...scrollProps,
|
|
3283
|
+
children: [
|
|
3284
|
+
header,
|
|
3285
|
+
loading ? Array.from({ length: skeletonCount }, (_, index) => /* @__PURE__ */ jsx20(ChainRowSkeleton, {}, index)) : chains.map((chain) => /* @__PURE__ */ jsx20(
|
|
3286
|
+
ChainRow,
|
|
3287
|
+
{
|
|
3288
|
+
chain,
|
|
3289
|
+
selected: chain.id === selectedChain?.id,
|
|
3290
|
+
onPress: onSelectChain
|
|
3291
|
+
},
|
|
3292
|
+
chain.id
|
|
3293
|
+
))
|
|
3294
|
+
]
|
|
3295
|
+
}
|
|
3296
|
+
),
|
|
3297
|
+
showTopFade ? /* @__PURE__ */ jsx20(ScrollFade, { edge: "top", color: theme.background.modal, id: "chain-list" }) : null,
|
|
3298
|
+
showBottomFade ? /* @__PURE__ */ jsx20(
|
|
3299
|
+
ScrollFade,
|
|
3300
|
+
{
|
|
3301
|
+
edge: "bottom",
|
|
3302
|
+
color: theme.background.modal,
|
|
3303
|
+
id: "chain-list"
|
|
3304
|
+
}
|
|
3305
|
+
) : null
|
|
3306
|
+
] });
|
|
3307
|
+
}
|
|
3308
|
+
function ChainRow({
|
|
3309
|
+
chain,
|
|
3310
|
+
selected,
|
|
3311
|
+
onPress
|
|
3312
|
+
}) {
|
|
3313
|
+
const theme = useTheme();
|
|
3314
|
+
return /* @__PURE__ */ jsx20(
|
|
3315
|
+
Pressable4,
|
|
3316
|
+
{
|
|
3317
|
+
onPress: () => onPress?.(chain),
|
|
3318
|
+
accessibilityRole: "button",
|
|
3319
|
+
accessibilityLabel: chain.name,
|
|
3320
|
+
accessibilityState: { selected },
|
|
3321
|
+
children: /* @__PURE__ */ jsxs7(
|
|
3322
|
+
Box,
|
|
3323
|
+
{
|
|
3324
|
+
flexDirection: "row",
|
|
3325
|
+
alignItems: "center",
|
|
3326
|
+
borderRadius: "element",
|
|
3327
|
+
style: [
|
|
3328
|
+
styles6.row,
|
|
3329
|
+
selected ? { backgroundColor: theme.background.secondary } : null
|
|
3330
|
+
],
|
|
3331
|
+
children: [
|
|
3332
|
+
/* @__PURE__ */ jsx20(ChainAvatar, { uri: chain.iconUri }),
|
|
3333
|
+
/* @__PURE__ */ jsx20(Box, { flex: 1, children: /* @__PURE__ */ jsx20(
|
|
3334
|
+
Text,
|
|
3335
|
+
{
|
|
3336
|
+
variant: "bodyMedium",
|
|
3337
|
+
numberOfLines: 1,
|
|
3338
|
+
style: { color: theme.content.elements.primary },
|
|
3339
|
+
children: chain.name
|
|
3340
|
+
}
|
|
3341
|
+
) }),
|
|
3342
|
+
selected ? /* @__PURE__ */ jsx20(FigmaCheckIcon, { size: 20, color: theme.content.elements.secondary }) : null
|
|
3343
|
+
]
|
|
3344
|
+
}
|
|
3345
|
+
)
|
|
3346
|
+
}
|
|
3347
|
+
);
|
|
3348
|
+
}
|
|
3349
|
+
function ChainRowSkeleton() {
|
|
3350
|
+
const theme = useTheme();
|
|
3351
|
+
return /* @__PURE__ */ jsxs7(Box, { flexDirection: "row", alignItems: "center", style: styles6.row, children: [
|
|
3352
|
+
/* @__PURE__ */ jsx20(
|
|
3353
|
+
Box,
|
|
3354
|
+
{
|
|
3355
|
+
style: [
|
|
3356
|
+
styles6.skeletonIcon,
|
|
3357
|
+
{ backgroundColor: theme.background.pill.pressed }
|
|
3358
|
+
]
|
|
3359
|
+
}
|
|
3360
|
+
),
|
|
3361
|
+
/* @__PURE__ */ jsx20(Box, { flex: 1, children: /* @__PURE__ */ jsx20(
|
|
3362
|
+
Box,
|
|
3363
|
+
{
|
|
3364
|
+
style: [
|
|
3365
|
+
styles6.skeletonName,
|
|
3366
|
+
{ backgroundColor: theme.background.pill.pressed }
|
|
3367
|
+
]
|
|
3368
|
+
}
|
|
3369
|
+
) })
|
|
3370
|
+
] });
|
|
3371
|
+
}
|
|
3372
|
+
var FIRST_PICK_CHROME = 80;
|
|
3373
|
+
var RE_PICK_CHROME = 128;
|
|
3374
|
+
var MIN_BOTTOM_INSET = 16;
|
|
3375
|
+
var bottomInset = (inset) => Math.max(inset, MIN_BOTTOM_INSET);
|
|
3376
|
+
var styles6 = StyleSheet6.create({
|
|
3377
|
+
backTopBar: { paddingHorizontal: 20, paddingTop: 20, paddingBottom: 12 },
|
|
3378
|
+
backPress: { alignSelf: "flex-start" },
|
|
3379
|
+
// A white fill on the white sheet reads as nothing on device, so the circle
|
|
3380
|
+
// takes the secondary surface + hairline.
|
|
3381
|
+
backButton: {
|
|
3382
|
+
width: 48,
|
|
3383
|
+
height: 48,
|
|
3384
|
+
borderRadius: 999,
|
|
3385
|
+
borderWidth: 1,
|
|
3386
|
+
shadowColor: "#000",
|
|
3387
|
+
shadowOpacity: 0.05,
|
|
3388
|
+
shadowOffset: { width: 0, height: 4 },
|
|
3389
|
+
shadowRadius: 8,
|
|
3390
|
+
elevation: 2
|
|
3391
|
+
},
|
|
3392
|
+
// Same geometry as the Add money sheet.
|
|
3393
|
+
titleTopBar: { height: 64, paddingTop: 25, paddingBottom: 12 },
|
|
3394
|
+
// Inside the list's 16 inset, so 12 more lines it up with the row text.
|
|
3395
|
+
titleBlock: {
|
|
3396
|
+
paddingHorizontal: 12,
|
|
3397
|
+
paddingTop: 12,
|
|
3398
|
+
paddingBottom: 24,
|
|
3399
|
+
gap: 2
|
|
3400
|
+
},
|
|
3401
|
+
// No theme variant for 21/25; the medium cut rides on `bodyMedium` because an
|
|
3402
|
+
// inline fontWeight can't select a custom font's cut in RN/Expo.
|
|
3403
|
+
titleText: { fontSize: 21, lineHeight: 25 },
|
|
3404
|
+
scrollArea: { position: "relative" },
|
|
3405
|
+
list: { width: "100%" },
|
|
3406
|
+
// The trailing buffer keeps the last row clear of the sheet edge.
|
|
3407
|
+
listContent: { paddingHorizontal: 16, paddingBottom: 16 },
|
|
3408
|
+
row: { gap: 12, paddingHorizontal: 12, paddingVertical: 10 },
|
|
3409
|
+
buttonContainer: { paddingHorizontal: 20, paddingTop: 8 },
|
|
3410
|
+
cancelButton: { height: 56, paddingHorizontal: 24 },
|
|
3411
|
+
skeletonIcon: { width: 36, height: 36, borderRadius: 999 },
|
|
3412
|
+
skeletonName: { width: 157, height: 16, borderRadius: 4 }
|
|
3413
|
+
});
|
|
3414
|
+
|
|
3415
|
+
// src/screens/TransferCryptoScreen.tsx
|
|
3416
|
+
import { useEffect as useEffect7, useRef as useRef4, useState as useState8 } from "react";
|
|
3417
|
+
import { Pressable as Pressable6, StyleSheet as StyleSheet8 } from "react-native";
|
|
3418
|
+
import { useSafeAreaInsets as useSafeAreaInsets2 } from "react-native-safe-area-context";
|
|
3419
|
+
|
|
3420
|
+
// src/components/SelectedChainRow.tsx
|
|
3421
|
+
import { Pressable as Pressable5, StyleSheet as StyleSheet7 } from "react-native";
|
|
3422
|
+
import { jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3423
|
+
function SelectedChainRow({
|
|
3424
|
+
label,
|
|
3425
|
+
name,
|
|
3426
|
+
iconUri,
|
|
3427
|
+
accessibilityLabel,
|
|
3428
|
+
onPress
|
|
3429
|
+
}) {
|
|
3430
|
+
const theme = useTheme();
|
|
3431
|
+
return /* @__PURE__ */ jsx21(
|
|
3432
|
+
Pressable5,
|
|
3433
|
+
{
|
|
3434
|
+
onPress,
|
|
3435
|
+
accessibilityRole: "button",
|
|
3436
|
+
accessibilityLabel,
|
|
3437
|
+
children: /* @__PURE__ */ jsxs8(
|
|
3438
|
+
Box,
|
|
3439
|
+
{
|
|
3440
|
+
flexDirection: "row",
|
|
3441
|
+
alignItems: "center",
|
|
3442
|
+
justifyContent: "space-between",
|
|
3443
|
+
borderRadius: "element",
|
|
3444
|
+
style: [styles7.card, { backgroundColor: theme.background.secondary }],
|
|
3445
|
+
children: [
|
|
3446
|
+
/* @__PURE__ */ jsxs8(Box, { flexDirection: "row", alignItems: "center", style: styles7.chain, children: [
|
|
3447
|
+
/* @__PURE__ */ jsx21(ChainAvatar, { uri: iconUri, size: 32 }),
|
|
3448
|
+
/* @__PURE__ */ jsxs8(Box, { children: [
|
|
3449
|
+
/* @__PURE__ */ jsx21(
|
|
3450
|
+
Text,
|
|
3144
3451
|
{
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
children: [
|
|
3158
|
-
/* @__PURE__ */ jsx17(ChainGlyph, { iconKeys: network.iconKeys }),
|
|
3159
|
-
/* @__PURE__ */ jsx17(
|
|
3160
|
-
Text,
|
|
3161
|
-
{
|
|
3162
|
-
variant: "bodyMedium",
|
|
3163
|
-
style: { color: theme.content.elements.primary },
|
|
3164
|
-
children: network.label
|
|
3165
|
-
}
|
|
3166
|
-
)
|
|
3167
|
-
]
|
|
3452
|
+
variant: "detail",
|
|
3453
|
+
style: { color: theme.content.elements.secondary },
|
|
3454
|
+
children: label
|
|
3455
|
+
}
|
|
3456
|
+
),
|
|
3457
|
+
/* @__PURE__ */ jsx21(
|
|
3458
|
+
Text,
|
|
3459
|
+
{
|
|
3460
|
+
variant: "bodyMedium",
|
|
3461
|
+
numberOfLines: 1,
|
|
3462
|
+
style: { color: theme.content.elements.primary },
|
|
3463
|
+
children: name
|
|
3168
3464
|
}
|
|
3169
3465
|
)
|
|
3466
|
+
] })
|
|
3467
|
+
] }),
|
|
3468
|
+
/* @__PURE__ */ jsx21(
|
|
3469
|
+
FigmaChevronRightIcon,
|
|
3470
|
+
{
|
|
3471
|
+
size: 20,
|
|
3472
|
+
color: theme.content.button.icon.default
|
|
3170
3473
|
}
|
|
3171
|
-
)
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
})
|
|
3474
|
+
)
|
|
3475
|
+
]
|
|
3476
|
+
}
|
|
3477
|
+
)
|
|
3176
3478
|
}
|
|
3177
3479
|
);
|
|
3178
3480
|
}
|
|
3179
|
-
var
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
Easing2.bezier(0.22, 1, 0.36, 1)
|
|
3184
|
-
);
|
|
3185
|
-
function ChainGlyph({ iconKeys }) {
|
|
3186
|
-
if (iconKeys.length <= 1) {
|
|
3187
|
-
return /* @__PURE__ */ jsx17(
|
|
3188
|
-
FunIcon,
|
|
3189
|
-
{
|
|
3190
|
-
uri: toIconUri3(iconKeys[0] ?? ""),
|
|
3191
|
-
size: 24,
|
|
3192
|
-
fallbackUri: FALLBACK_ASSET_LOGO
|
|
3193
|
-
}
|
|
3194
|
-
);
|
|
3195
|
-
}
|
|
3196
|
-
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(
|
|
3197
|
-
FunIcon,
|
|
3198
|
-
{
|
|
3199
|
-
uri: toIconUri3(key),
|
|
3200
|
-
size: 11,
|
|
3201
|
-
fallbackUri: FALLBACK_ASSET_LOGO
|
|
3202
|
-
},
|
|
3203
|
-
key
|
|
3204
|
-
)) }) });
|
|
3205
|
-
}
|
|
3206
|
-
var track = { height: 54, padding: 2 };
|
|
3207
|
-
var selectedPress = { flex: 1, height: "100%" };
|
|
3208
|
-
var selectedFill = { flex: 1 };
|
|
3209
|
-
var selectedPill = {
|
|
3210
|
-
height: "100%",
|
|
3211
|
-
paddingHorizontal: 16,
|
|
3212
|
-
gap: 10
|
|
3213
|
-
};
|
|
3214
|
-
var iconPress = {
|
|
3215
|
-
width: 50,
|
|
3216
|
-
height: "100%",
|
|
3217
|
-
alignItems: "center",
|
|
3218
|
-
justifyContent: "center"
|
|
3219
|
-
};
|
|
3220
|
-
var miniGrid = { width: 23.5, gap: 1.5 };
|
|
3481
|
+
var styles7 = StyleSheet7.create({
|
|
3482
|
+
card: { padding: 16 },
|
|
3483
|
+
chain: { gap: 12, flex: 1 }
|
|
3484
|
+
});
|
|
3221
3485
|
|
|
3222
3486
|
// src/screens/TransferCryptoScreen.tsx
|
|
3223
|
-
import { jsx as
|
|
3487
|
+
import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3224
3488
|
function TransferCryptoScreen(props) {
|
|
3225
3489
|
const { t } = useFunkitTranslation();
|
|
3226
3490
|
const {
|
|
3227
3491
|
depositAddress,
|
|
3228
|
-
|
|
3229
|
-
selectedNetworkId,
|
|
3230
|
-
onSelectNetwork,
|
|
3231
|
-
supportedTokenIcons,
|
|
3232
|
-
minimumDepositLabel,
|
|
3492
|
+
selectedChain,
|
|
3233
3493
|
copiedFeedbackMs = 1800,
|
|
3234
3494
|
onBack,
|
|
3235
3495
|
onShowQrCode,
|
|
3236
|
-
|
|
3496
|
+
onChangeChain,
|
|
3237
3497
|
onCopyAddress,
|
|
3238
3498
|
onShareAddress
|
|
3239
3499
|
} = props;
|
|
3240
3500
|
const theme = useTheme();
|
|
3241
3501
|
const insets = useSafeAreaInsets2();
|
|
3242
|
-
const [copied, setCopied] =
|
|
3502
|
+
const [copied, setCopied] = useState8(false);
|
|
3243
3503
|
const copyTimer = useRef4(void 0);
|
|
3244
|
-
|
|
3504
|
+
useEffect7(() => () => clearTimeout(copyTimer.current), []);
|
|
3245
3505
|
const handleCopy = () => {
|
|
3246
3506
|
onCopyAddress?.();
|
|
3247
3507
|
setCopied(true);
|
|
3248
3508
|
clearTimeout(copyTimer.current);
|
|
3249
3509
|
copyTimer.current = setTimeout(() => setCopied(false), copiedFeedbackMs);
|
|
3250
3510
|
};
|
|
3251
|
-
|
|
3252
|
-
const selectedNetwork = networks.find(
|
|
3253
|
-
(network) => network.id === selectedNetworkId
|
|
3254
|
-
);
|
|
3255
|
-
return /* @__PURE__ */ jsxs8(
|
|
3511
|
+
return /* @__PURE__ */ jsxs9(
|
|
3256
3512
|
Box,
|
|
3257
3513
|
{
|
|
3258
3514
|
borderTopLeftRadius: "modal",
|
|
3259
3515
|
borderTopRightRadius: "modal",
|
|
3260
3516
|
style: { backgroundColor: theme.background.modal },
|
|
3261
3517
|
children: [
|
|
3262
|
-
/* @__PURE__ */
|
|
3263
|
-
/* @__PURE__ */
|
|
3518
|
+
/* @__PURE__ */ jsxs9(Box, { flexDirection: "row", alignItems: "center", style: styles8.topBar, children: [
|
|
3519
|
+
/* @__PURE__ */ jsx22(Grabber, {}),
|
|
3520
|
+
/* @__PURE__ */ jsx22(
|
|
3264
3521
|
Pressable6,
|
|
3265
3522
|
{
|
|
3266
3523
|
onPress: onBack,
|
|
3267
3524
|
hitSlop: 12,
|
|
3268
3525
|
accessibilityRole: "button",
|
|
3269
3526
|
accessibilityLabel: t("common.back"),
|
|
3270
|
-
children: /* @__PURE__ */
|
|
3527
|
+
children: /* @__PURE__ */ jsx22(
|
|
3528
|
+
Box,
|
|
3529
|
+
{
|
|
3530
|
+
alignItems: "center",
|
|
3531
|
+
justifyContent: "center",
|
|
3532
|
+
style: styles8.iconButton,
|
|
3533
|
+
children: /* @__PURE__ */ jsx22(FigmaChevronLeftIcon, {})
|
|
3534
|
+
}
|
|
3535
|
+
)
|
|
3271
3536
|
}
|
|
3272
3537
|
),
|
|
3273
|
-
/* @__PURE__ */
|
|
3538
|
+
/* @__PURE__ */ jsx22(Box, { flex: 1, alignItems: "center", children: /* @__PURE__ */ jsx22(
|
|
3274
3539
|
Text,
|
|
3275
3540
|
{
|
|
3276
3541
|
variant: "bodyMedium",
|
|
@@ -3278,167 +3543,110 @@ function TransferCryptoScreen(props) {
|
|
|
3278
3543
|
children: t("transferCrypto.title")
|
|
3279
3544
|
}
|
|
3280
3545
|
) }),
|
|
3281
|
-
/* @__PURE__ */
|
|
3546
|
+
/* @__PURE__ */ jsx22(
|
|
3282
3547
|
Pressable6,
|
|
3283
3548
|
{
|
|
3284
3549
|
onPress: onShowQrCode,
|
|
3285
3550
|
hitSlop: 12,
|
|
3286
3551
|
accessibilityRole: "button",
|
|
3287
3552
|
accessibilityLabel: t("transferCrypto.showQrCode"),
|
|
3288
|
-
children: /* @__PURE__ */
|
|
3553
|
+
children: /* @__PURE__ */ jsx22(
|
|
3554
|
+
Box,
|
|
3555
|
+
{
|
|
3556
|
+
alignItems: "center",
|
|
3557
|
+
justifyContent: "center",
|
|
3558
|
+
style: styles8.iconButton,
|
|
3559
|
+
children: /* @__PURE__ */ jsx22(FigmaQrScanIcon, {})
|
|
3560
|
+
}
|
|
3561
|
+
)
|
|
3289
3562
|
}
|
|
3290
3563
|
)
|
|
3291
3564
|
] }),
|
|
3292
|
-
/* @__PURE__ */
|
|
3293
|
-
/* @__PURE__ */
|
|
3294
|
-
|
|
3565
|
+
/* @__PURE__ */ jsxs9(Box, { style: [styles8.content, { paddingBottom: insets.bottom + 16 }], children: [
|
|
3566
|
+
/* @__PURE__ */ jsx22(
|
|
3567
|
+
SelectedChainRow,
|
|
3295
3568
|
{
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3569
|
+
label: t("transferCrypto.selectedChain"),
|
|
3570
|
+
name: selectedChain.name,
|
|
3571
|
+
iconUri: selectedChain.iconUri,
|
|
3572
|
+
accessibilityLabel: t("transferCrypto.changeChain"),
|
|
3573
|
+
onPress: onChangeChain
|
|
3299
3574
|
}
|
|
3300
3575
|
),
|
|
3301
|
-
/* @__PURE__ */
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3576
|
+
/* @__PURE__ */ jsxs9(Box, { alignItems: "center", style: styles8.addressRegion, children: [
|
|
3577
|
+
/* @__PURE__ */ jsx22(
|
|
3578
|
+
Box,
|
|
3579
|
+
{
|
|
3580
|
+
alignItems: "center",
|
|
3581
|
+
justifyContent: "center",
|
|
3582
|
+
borderWidth: 1,
|
|
3583
|
+
borderRadius: "element",
|
|
3584
|
+
style: [
|
|
3585
|
+
styles8.addressCard,
|
|
3310
3586
|
{
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3587
|
+
backgroundColor: theme.background.modal,
|
|
3588
|
+
borderColor: theme.border.elements.default.color
|
|
3589
|
+
}
|
|
3590
|
+
],
|
|
3591
|
+
children: /* @__PURE__ */ jsxs9(Box, { alignItems: "center", style: styles8.addressColumn, children: [
|
|
3592
|
+
/* @__PURE__ */ jsxs9(Box, { alignItems: "center", style: styles8.addressGroup, children: [
|
|
3593
|
+
/* @__PURE__ */ jsx22(
|
|
3594
|
+
Text,
|
|
3318
3595
|
{
|
|
3319
|
-
|
|
3320
|
-
|
|
3596
|
+
variant: "detail",
|
|
3597
|
+
style: { color: theme.content.elements.secondary },
|
|
3598
|
+
children: t("transferCrypto.depositAddressLabel")
|
|
3321
3599
|
}
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
style: [
|
|
3338
|
-
addressText2,
|
|
3339
|
-
{ color: theme.content.elements.primary }
|
|
3340
|
-
],
|
|
3341
|
-
children: depositAddress
|
|
3342
|
-
}
|
|
3343
|
-
)
|
|
3344
|
-
] }),
|
|
3345
|
-
showPreview ? /* @__PURE__ */ jsx18(
|
|
3346
|
-
Pressable6,
|
|
3347
|
-
{
|
|
3348
|
-
onPress: onShowChains,
|
|
3349
|
-
accessibilityRole: "button",
|
|
3350
|
-
accessibilityLabel: t("transferCrypto.availableChains"),
|
|
3351
|
-
children: /* @__PURE__ */ jsxs8(
|
|
3352
|
-
Box,
|
|
3353
|
-
{
|
|
3354
|
-
flexDirection: "row",
|
|
3355
|
-
alignItems: "center",
|
|
3356
|
-
style: [
|
|
3357
|
-
previewPill,
|
|
3358
|
-
{ backgroundColor: theme.background.secondary }
|
|
3359
|
-
],
|
|
3360
|
-
children: [
|
|
3361
|
-
/* @__PURE__ */ jsx18(
|
|
3362
|
-
SourceTokenCluster,
|
|
3363
|
-
{
|
|
3364
|
-
icons: supportedTokenIcons,
|
|
3365
|
-
size: 20,
|
|
3366
|
-
gap: 4
|
|
3367
|
-
}
|
|
3368
|
-
),
|
|
3369
|
-
/* @__PURE__ */ jsx18(
|
|
3370
|
-
FigmaChevronRightIcon,
|
|
3371
|
-
{
|
|
3372
|
-
size: 16,
|
|
3373
|
-
color: theme.content.elements.secondary
|
|
3374
|
-
}
|
|
3375
|
-
)
|
|
3376
|
-
]
|
|
3377
|
-
}
|
|
3378
|
-
)
|
|
3379
|
-
}
|
|
3380
|
-
) : minimumDepositLabel ? /* @__PURE__ */ jsx18(
|
|
3381
|
-
MinimumDepositPill,
|
|
3382
|
-
{
|
|
3383
|
-
label: minimumDepositLabel,
|
|
3384
|
-
iconKey: selectedNetwork?.iconKeys[0]
|
|
3385
|
-
}
|
|
3386
|
-
) : null
|
|
3387
|
-
] })
|
|
3388
|
-
}
|
|
3389
|
-
),
|
|
3390
|
-
/* @__PURE__ */ jsxs8(Box, { flexDirection: "row", style: buttonsRow, children: [
|
|
3391
|
-
/* @__PURE__ */ jsx18(
|
|
3392
|
-
PillButton,
|
|
3393
|
-
{
|
|
3394
|
-
label: copied ? t("common.copied") : t("common.copy"),
|
|
3395
|
-
accessibilityLabel: copied ? t("common.addressCopied") : t("common.copyAddress"),
|
|
3396
|
-
icon: /* @__PURE__ */ jsx18(FigmaCopyIcon, { color: theme.content.button.primary.default }),
|
|
3397
|
-
onPress: handleCopy
|
|
3398
|
-
}
|
|
3399
|
-
),
|
|
3400
|
-
/* @__PURE__ */ jsx18(
|
|
3401
|
-
PillButton,
|
|
3600
|
+
),
|
|
3601
|
+
/* @__PURE__ */ jsx22(
|
|
3602
|
+
Text,
|
|
3603
|
+
{
|
|
3604
|
+
variant: "bodyMedium",
|
|
3605
|
+
style: [
|
|
3606
|
+
styles8.addressText,
|
|
3607
|
+
{ color: theme.content.elements.primary }
|
|
3608
|
+
],
|
|
3609
|
+
children: depositAddress
|
|
3610
|
+
}
|
|
3611
|
+
)
|
|
3612
|
+
] }),
|
|
3613
|
+
selectedChain.minLabel ? /* @__PURE__ */ jsx22(
|
|
3614
|
+
Text,
|
|
3402
3615
|
{
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
onPress: onShareAddress
|
|
3616
|
+
variant: "body",
|
|
3617
|
+
style: { color: theme.content.elements.secondary },
|
|
3618
|
+
children: selectedChain.minLabel
|
|
3407
3619
|
}
|
|
3408
|
-
)
|
|
3620
|
+
) : null
|
|
3409
3621
|
] })
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3622
|
+
}
|
|
3623
|
+
),
|
|
3624
|
+
/* @__PURE__ */ jsxs9(Box, { flexDirection: "row", style: styles8.buttonsRow, children: [
|
|
3625
|
+
/* @__PURE__ */ jsx22(
|
|
3626
|
+
PillButton,
|
|
3627
|
+
{
|
|
3628
|
+
label: copied ? t("common.copied") : t("common.copy"),
|
|
3629
|
+
accessibilityLabel: copied ? t("common.addressCopied") : t("common.copyAddress"),
|
|
3630
|
+
icon: /* @__PURE__ */ jsx22(FigmaCopyIcon, { color: theme.content.button.primary.default }),
|
|
3631
|
+
onPress: handleCopy
|
|
3632
|
+
}
|
|
3633
|
+
),
|
|
3634
|
+
/* @__PURE__ */ jsx22(
|
|
3635
|
+
PillButton,
|
|
3636
|
+
{
|
|
3637
|
+
label: t("transferCrypto.share"),
|
|
3638
|
+
accessibilityLabel: t("transferCrypto.shareAddress"),
|
|
3639
|
+
icon: /* @__PURE__ */ jsx22(FigmaShareIcon, { color: theme.content.button.primary.default }),
|
|
3640
|
+
onPress: onShareAddress
|
|
3641
|
+
}
|
|
3642
|
+
)
|
|
3643
|
+
] })
|
|
3644
|
+
] })
|
|
3413
3645
|
] })
|
|
3414
3646
|
]
|
|
3415
3647
|
}
|
|
3416
3648
|
);
|
|
3417
3649
|
}
|
|
3418
|
-
function MinimumDepositPill({
|
|
3419
|
-
label,
|
|
3420
|
-
iconKey
|
|
3421
|
-
}) {
|
|
3422
|
-
const theme = useTheme();
|
|
3423
|
-
return /* @__PURE__ */ jsx18(Box, { alignItems: "center", justifyContent: "flex-start", style: minimumPill, children: /* @__PURE__ */ jsxs8(Box, { flexDirection: "row", alignItems: "center", style: minimumPillRow, children: [
|
|
3424
|
-
iconKey ? /* @__PURE__ */ jsx18(
|
|
3425
|
-
FunIcon,
|
|
3426
|
-
{
|
|
3427
|
-
uri: iconKey.startsWith("http") ? iconKey : chainIconUri(iconKey),
|
|
3428
|
-
size: 16,
|
|
3429
|
-
fallbackUri: FALLBACK_ASSET_LOGO
|
|
3430
|
-
}
|
|
3431
|
-
) : null,
|
|
3432
|
-
/* @__PURE__ */ jsx18(
|
|
3433
|
-
Text,
|
|
3434
|
-
{
|
|
3435
|
-
variant: "detail",
|
|
3436
|
-
style: { color: theme.content.elements.secondary },
|
|
3437
|
-
children: label
|
|
3438
|
-
}
|
|
3439
|
-
)
|
|
3440
|
-
] }) });
|
|
3441
|
-
}
|
|
3442
3650
|
function PillButton({
|
|
3443
3651
|
label,
|
|
3444
3652
|
accessibilityLabel,
|
|
@@ -3446,14 +3654,14 @@ function PillButton({
|
|
|
3446
3654
|
onPress
|
|
3447
3655
|
}) {
|
|
3448
3656
|
const theme = useTheme();
|
|
3449
|
-
return /* @__PURE__ */
|
|
3657
|
+
return /* @__PURE__ */ jsx22(
|
|
3450
3658
|
Pressable6,
|
|
3451
3659
|
{
|
|
3452
3660
|
onPress,
|
|
3453
3661
|
accessibilityRole: "button",
|
|
3454
3662
|
accessibilityLabel,
|
|
3455
|
-
style: pillButtonPress,
|
|
3456
|
-
children: /* @__PURE__ */
|
|
3663
|
+
style: styles8.pillButtonPress,
|
|
3664
|
+
children: /* @__PURE__ */ jsxs9(
|
|
3457
3665
|
Box,
|
|
3458
3666
|
{
|
|
3459
3667
|
flexDirection: "row",
|
|
@@ -3461,12 +3669,12 @@ function PillButton({
|
|
|
3461
3669
|
justifyContent: "center",
|
|
3462
3670
|
borderRadius: "button",
|
|
3463
3671
|
style: [
|
|
3464
|
-
pillButton,
|
|
3672
|
+
styles8.pillButton,
|
|
3465
3673
|
{ backgroundColor: theme.background.button.primary.default }
|
|
3466
3674
|
],
|
|
3467
3675
|
children: [
|
|
3468
3676
|
icon,
|
|
3469
|
-
/* @__PURE__ */
|
|
3677
|
+
/* @__PURE__ */ jsx22(
|
|
3470
3678
|
Text,
|
|
3471
3679
|
{
|
|
3472
3680
|
variant: "bodyMedium",
|
|
@@ -3480,52 +3688,102 @@ function PillButton({
|
|
|
3480
3688
|
}
|
|
3481
3689
|
);
|
|
3482
3690
|
}
|
|
3483
|
-
var
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3691
|
+
var styles8 = StyleSheet8.create({
|
|
3692
|
+
topBar: {
|
|
3693
|
+
paddingTop: 16,
|
|
3694
|
+
paddingBottom: 16,
|
|
3695
|
+
paddingHorizontal: 24,
|
|
3696
|
+
gap: 4
|
|
3697
|
+
},
|
|
3698
|
+
// 32px touch target centers the 20px glyph so it visually aligns with the
|
|
3699
|
+
// px-20 content below.
|
|
3700
|
+
iconButton: { width: 32, height: 32 },
|
|
3701
|
+
content: {
|
|
3702
|
+
paddingHorizontal: 20,
|
|
3703
|
+
// paddingBottom is set inline: safe-area inset + 16 so the buttons keep a
|
|
3704
|
+
// 16px gap above the home indicator on every device.
|
|
3705
|
+
paddingTop: 8,
|
|
3706
|
+
gap: 16
|
|
3707
|
+
},
|
|
3708
|
+
addressRegion: { gap: 12, width: "100%" },
|
|
3709
|
+
addressCard: {
|
|
3710
|
+
width: "100%",
|
|
3711
|
+
// Centres the address block in the card at the designed height.
|
|
3712
|
+
paddingVertical: 148,
|
|
3713
|
+
paddingHorizontal: 20,
|
|
3714
|
+
// The card MUST keep an opaque `backgroundColor`: on Android `elevation`
|
|
3715
|
+
// draws its shadow from the view outline, and without a solid background it
|
|
3716
|
+
// can't clip to the rounded corners — it bleeds as a gray rectangular
|
|
3717
|
+
// border around the card.
|
|
3718
|
+
shadowColor: "#000",
|
|
3719
|
+
shadowOpacity: 0.02,
|
|
3720
|
+
shadowOffset: { width: 0, height: 8 },
|
|
3721
|
+
shadowRadius: 32,
|
|
3722
|
+
elevation: 1
|
|
3723
|
+
},
|
|
3724
|
+
// 6 inside the label+address pair, 8 out to the minimum.
|
|
3725
|
+
addressColumn: { gap: 8 },
|
|
3726
|
+
addressGroup: { gap: 6 },
|
|
3727
|
+
// Weight (medium) comes from the `bodyMedium` variant's Inter-Medium family —
|
|
3728
|
+
// an inline `fontWeight` wouldn't select the cut on a custom font in RN/Expo.
|
|
3729
|
+
addressText: { fontSize: 28, lineHeight: 39 },
|
|
3730
|
+
buttonsRow: { gap: 10, width: "100%" },
|
|
3731
|
+
pillButtonPress: { flex: 1 },
|
|
3732
|
+
pillButton: { height: 56, paddingHorizontal: 24, gap: 8 }
|
|
3733
|
+
});
|
|
3734
|
+
|
|
3735
|
+
// src/screens/WithdrawCryptoScreen.tsx
|
|
3736
|
+
import { Pressable as Pressable7, StyleSheet as StyleSheet9 } from "react-native";
|
|
3737
|
+
import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3738
|
+
function WithdrawCryptoScreen({
|
|
3739
|
+
title,
|
|
3740
|
+
backAccessibilityLabel,
|
|
3741
|
+
onBack,
|
|
3742
|
+
children
|
|
3743
|
+
}) {
|
|
3744
|
+
const theme = useTheme();
|
|
3745
|
+
return /* @__PURE__ */ jsxs10(Box, { children: [
|
|
3746
|
+
/* @__PURE__ */ jsx23(Grabber, {}),
|
|
3747
|
+
/* @__PURE__ */ jsxs10(
|
|
3748
|
+
Box,
|
|
3749
|
+
{
|
|
3750
|
+
flexDirection: "row",
|
|
3751
|
+
alignItems: "center",
|
|
3752
|
+
style: [styles9.topBar, { height: theme.sizes.topBar }],
|
|
3753
|
+
children: [
|
|
3754
|
+
/* @__PURE__ */ jsx23(
|
|
3755
|
+
Pressable7,
|
|
3756
|
+
{
|
|
3757
|
+
onPress: onBack,
|
|
3758
|
+
accessibilityRole: "button",
|
|
3759
|
+
accessibilityLabel: backAccessibilityLabel,
|
|
3760
|
+
hitSlop: 8,
|
|
3761
|
+
children: /* @__PURE__ */ jsx23(
|
|
3762
|
+
FigmaChevronLeftIcon,
|
|
3763
|
+
{
|
|
3764
|
+
size: 20,
|
|
3765
|
+
color: theme.content.button.icon.default
|
|
3766
|
+
}
|
|
3767
|
+
)
|
|
3768
|
+
}
|
|
3769
|
+
),
|
|
3770
|
+
/* @__PURE__ */ jsx23(Text, { variant: "headerTitle", style: styles9.title, children: title }),
|
|
3771
|
+
/* @__PURE__ */ jsx23(Box, { style: styles9.spacer })
|
|
3772
|
+
]
|
|
3773
|
+
}
|
|
3774
|
+
),
|
|
3775
|
+
/* @__PURE__ */ jsx23(Box, { style: styles9.body, children })
|
|
3776
|
+
] });
|
|
3777
|
+
}
|
|
3778
|
+
var styles9 = StyleSheet9.create({
|
|
3779
|
+
topBar: { paddingHorizontal: 16, gap: 12 },
|
|
3780
|
+
title: { flex: 1 },
|
|
3781
|
+
spacer: { width: 20 },
|
|
3782
|
+
body: { paddingHorizontal: 16, paddingBottom: 24, gap: 24 }
|
|
3783
|
+
});
|
|
3526
3784
|
|
|
3527
3785
|
// src/screens/WithdrawMethodScreen.tsx
|
|
3528
|
-
import { jsx as
|
|
3786
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
3529
3787
|
function getTerminalError(t, isBelowMinimum, isEmpty) {
|
|
3530
3788
|
if (isBelowMinimum) {
|
|
3531
3789
|
return {
|
|
@@ -3551,11 +3809,12 @@ function WithdrawMethodScreen(props) {
|
|
|
3551
3809
|
hasError = false,
|
|
3552
3810
|
onRetry,
|
|
3553
3811
|
isEmpty = false,
|
|
3554
|
-
isBelowMinimum = false
|
|
3812
|
+
isBelowMinimum = false,
|
|
3813
|
+
note
|
|
3555
3814
|
} = props;
|
|
3556
3815
|
const terminalError = getTerminalError(t, isBelowMinimum, isEmpty);
|
|
3557
3816
|
if (terminalError && !hasError && !loading) {
|
|
3558
|
-
return /* @__PURE__ */
|
|
3817
|
+
return /* @__PURE__ */ jsx24(
|
|
3559
3818
|
SelectMethodScreen,
|
|
3560
3819
|
{
|
|
3561
3820
|
title,
|
|
@@ -3567,7 +3826,7 @@ function WithdrawMethodScreen(props) {
|
|
|
3567
3826
|
}
|
|
3568
3827
|
);
|
|
3569
3828
|
}
|
|
3570
|
-
return /* @__PURE__ */
|
|
3829
|
+
return /* @__PURE__ */ jsx24(
|
|
3571
3830
|
SelectMethodScreen,
|
|
3572
3831
|
{
|
|
3573
3832
|
title,
|
|
@@ -3577,7 +3836,8 @@ function WithdrawMethodScreen(props) {
|
|
|
3577
3836
|
error: hasError,
|
|
3578
3837
|
onRetry,
|
|
3579
3838
|
errorTitle: t("selectMethod.errorTitle"),
|
|
3580
|
-
errorMessage: t("selectMethod.errorMessage")
|
|
3839
|
+
errorMessage: t("selectMethod.errorMessage"),
|
|
3840
|
+
note
|
|
3581
3841
|
}
|
|
3582
3842
|
);
|
|
3583
3843
|
}
|
|
@@ -3590,8 +3850,8 @@ import { useCallback as useCallback3 } from "react";
|
|
|
3590
3850
|
|
|
3591
3851
|
// src/swapped/SwappedWebView.tsx
|
|
3592
3852
|
import { useTheme as useTheme2 } from "@shopify/restyle";
|
|
3593
|
-
import { useCallback as useCallback2, useEffect as
|
|
3594
|
-
import { ActivityIndicator, View as
|
|
3853
|
+
import { useCallback as useCallback2, useEffect as useEffect8, useMemo as useMemo5, useRef as useRef5 } from "react";
|
|
3854
|
+
import { ActivityIndicator, View as View3 } from "react-native";
|
|
3595
3855
|
import {
|
|
3596
3856
|
WebView
|
|
3597
3857
|
} from "react-native-webview";
|
|
@@ -3600,12 +3860,12 @@ import {
|
|
|
3600
3860
|
var px = (value) => `${value}px`;
|
|
3601
3861
|
var toRawHex = (color) => color.replace(/^#/, "");
|
|
3602
3862
|
function buildSwappedThemeQueryParamsRN(theme) {
|
|
3603
|
-
const { background, content:
|
|
3863
|
+
const { background, content: content2, border, borderRadii } = theme;
|
|
3604
3864
|
return {
|
|
3605
3865
|
iframeBackground: toRawHex(background.modal),
|
|
3606
3866
|
widgetBackground: toRawHex(background.modal),
|
|
3607
|
-
textColor: toRawHex(
|
|
3608
|
-
spinnerColor: toRawHex(
|
|
3867
|
+
textColor: toRawHex(content2.elements.primary),
|
|
3868
|
+
spinnerColor: toRawHex(content2.elements.primary),
|
|
3609
3869
|
modalRadii: px(borderRadii.modal),
|
|
3610
3870
|
skeletonColor: toRawHex(border.elements.default.color),
|
|
3611
3871
|
skeletonSecondaryColor: toRawHex(background.secondary)
|
|
@@ -3614,7 +3874,7 @@ function buildSwappedThemeQueryParamsRN(theme) {
|
|
|
3614
3874
|
function buildSwappedThemeRN(theme, isDarkMode) {
|
|
3615
3875
|
const {
|
|
3616
3876
|
background,
|
|
3617
|
-
content:
|
|
3877
|
+
content: content2,
|
|
3618
3878
|
border,
|
|
3619
3879
|
brand,
|
|
3620
3880
|
borderRadii,
|
|
@@ -3625,9 +3885,9 @@ function buildSwappedThemeRN(theme, isDarkMode) {
|
|
|
3625
3885
|
return {
|
|
3626
3886
|
colors: {
|
|
3627
3887
|
// ── Core text ─────────────────────────────────────────────────────
|
|
3628
|
-
primaryText:
|
|
3629
|
-
secondaryText:
|
|
3630
|
-
tertiaryText:
|
|
3888
|
+
primaryText: content2.elements.primary,
|
|
3889
|
+
secondaryText: content2.elements.secondary,
|
|
3890
|
+
tertiaryText: content2.elements.secondary,
|
|
3631
3891
|
// ── Surfaces ──────────────────────────────────────────────────────
|
|
3632
3892
|
modalBackground: background.modal,
|
|
3633
3893
|
offBackground: background.secondary,
|
|
@@ -3641,12 +3901,12 @@ function buildSwappedThemeRN(theme, isDarkMode) {
|
|
|
3641
3901
|
// ── Accent / brand ────────────────────────────────────────────────
|
|
3642
3902
|
actionColor: brand.primary,
|
|
3643
3903
|
accentColor: brand.primary,
|
|
3644
|
-
accentColorForeground:
|
|
3904
|
+
accentColorForeground: content2.button.primary.default,
|
|
3645
3905
|
// ── Status ────────────────────────────────────────────────────────
|
|
3646
|
-
error:
|
|
3647
|
-
success:
|
|
3906
|
+
error: content2.elements.error,
|
|
3907
|
+
success: content2.elements.success,
|
|
3648
3908
|
// ── Spinner ───────────────────────────────────────────────────────
|
|
3649
|
-
spinnerIndicator:
|
|
3909
|
+
spinnerIndicator: content2.elements.primary,
|
|
3650
3910
|
spinnerBackground: border.elements.default.color,
|
|
3651
3911
|
// ── Primary button (hover ← pressed, disabled ← default fill) ─────
|
|
3652
3912
|
// web spreads both `buttonBackground*` (ThemeVars) and `buttonPrimary*`
|
|
@@ -3658,11 +3918,11 @@ function buildSwappedThemeRN(theme, isDarkMode) {
|
|
|
3658
3918
|
buttonPrimary: background.button.primary.default,
|
|
3659
3919
|
buttonPrimaryHover: background.button.primary.pressed,
|
|
3660
3920
|
buttonDisabled: background.button.primary.default,
|
|
3661
|
-
buttonTextPrimary:
|
|
3662
|
-
buttonTextHover:
|
|
3663
|
-
buttonTextDisabled:
|
|
3664
|
-
buttonTextSecondary:
|
|
3665
|
-
buttonTextSecondaryDisabled:
|
|
3921
|
+
buttonTextPrimary: content2.button.primary.default,
|
|
3922
|
+
buttonTextHover: content2.button.primary.default,
|
|
3923
|
+
buttonTextDisabled: content2.button.primary.default,
|
|
3924
|
+
buttonTextSecondary: content2.button.secondary.default,
|
|
3925
|
+
buttonTextSecondaryDisabled: content2.button.secondary.default,
|
|
3666
3926
|
buttonFocusedOutline: "none",
|
|
3667
3927
|
buttonBorderGradient: "none",
|
|
3668
3928
|
buttonHoverBorderGradient: "none",
|
|
@@ -3671,16 +3931,16 @@ function buildSwappedThemeRN(theme, isDarkMode) {
|
|
|
3671
3931
|
buttonBackgroundTertiary: background.button.tertiary.default,
|
|
3672
3932
|
buttonBackgroundHoverTertiary: background.button.tertiary.pressed,
|
|
3673
3933
|
buttonBackgroundDisabledTertiary: background.button.tertiary.default,
|
|
3674
|
-
buttonTextTertiary:
|
|
3675
|
-
buttonTextDisabledTertiary:
|
|
3934
|
+
buttonTextTertiary: content2.button.tertiary.default,
|
|
3935
|
+
buttonTextDisabledTertiary: content2.button.tertiary.default,
|
|
3676
3936
|
buttonBorderTertiary: "transparent",
|
|
3677
3937
|
buttonBorderFocusedTertiary: border.elements.selected.color,
|
|
3678
3938
|
// ── Icon button / top bar (hover ← pressed) ───────────────────────
|
|
3679
3939
|
headerButtonBackground: background.button.icon.default,
|
|
3680
3940
|
buttonIconBackgroundHover: background.button.icon.pressed,
|
|
3681
3941
|
buttonIconBackgroundPressed: background.button.icon.pressed,
|
|
3682
|
-
buttonIconStroke:
|
|
3683
|
-
modalTopbarIcon:
|
|
3942
|
+
buttonIconStroke: content2.button.icon.default,
|
|
3943
|
+
modalTopbarIcon: content2.button.icon.default,
|
|
3684
3944
|
modalTopbarIconBackground: background.button.icon.default,
|
|
3685
3945
|
modalTopbarIconBackgroundHover: background.button.icon.pressed,
|
|
3686
3946
|
modalTopbarIconBackgroundPressed: background.button.icon.pressed,
|
|
@@ -3689,20 +3949,20 @@ function buildSwappedThemeRN(theme, isDarkMode) {
|
|
|
3689
3949
|
inputBackgroundHover: background.secondary,
|
|
3690
3950
|
inputBorderBase: border.elements.default.color,
|
|
3691
3951
|
inputBorderHover: border.elements.selected.color,
|
|
3692
|
-
inputLabel:
|
|
3952
|
+
inputLabel: content2.elements.primary,
|
|
3693
3953
|
inputBorder: border.elements.default.color,
|
|
3694
|
-
inputBorderFocused:
|
|
3695
|
-
inputBorderActive:
|
|
3696
|
-
inputPlaceholder:
|
|
3954
|
+
inputBorderFocused: content2.elements.secondary,
|
|
3955
|
+
inputBorderActive: content2.elements.secondary,
|
|
3956
|
+
inputPlaceholder: content2.elements.secondary,
|
|
3697
3957
|
// ── Selection ─────────────────────────────────────────────────────
|
|
3698
3958
|
selectedOptionBorder: border.elements.selected.color,
|
|
3699
3959
|
focusedOptionBorder: border.elements.selected.color,
|
|
3700
3960
|
// ── Widget aliases (mirrors web buildSwappedTheme) ────────────────
|
|
3701
3961
|
boxBackground: background.secondary,
|
|
3702
3962
|
secondaryButtonBg: background.button.tertiary.default,
|
|
3703
|
-
secondaryButtonText:
|
|
3963
|
+
secondaryButtonText: content2.button.tertiary.default,
|
|
3704
3964
|
secondaryButtonHover: background.button.tertiary.pressed,
|
|
3705
|
-
secondaryButtonTextHover:
|
|
3965
|
+
secondaryButtonTextHover: content2.button.tertiary.default
|
|
3706
3966
|
},
|
|
3707
3967
|
radii: {
|
|
3708
3968
|
modal: px(borderRadii.modal),
|
|
@@ -3717,7 +3977,7 @@ function buildSwappedThemeRN(theme, isDarkMode) {
|
|
|
3717
3977
|
headerHeight: px(sizes.topBar),
|
|
3718
3978
|
headerFontWeight: String(textVariants.headerTitle.fontWeight ?? "500"),
|
|
3719
3979
|
// web: topbarIconColor ← modalTopbarIcon (the icon on the top-bar buttons)
|
|
3720
|
-
topbarIconColor:
|
|
3980
|
+
topbarIconColor: content2.button.icon.default,
|
|
3721
3981
|
topbarTextFontSize: px(textVariants.headerTitle.fontSize ?? 13),
|
|
3722
3982
|
headerIconWrapperSize: px(sizes.buttonXs),
|
|
3723
3983
|
headerIconSize: px(sizes.iconMd),
|
|
@@ -3850,7 +4110,7 @@ function createWebViewSwappedTransport({
|
|
|
3850
4110
|
}
|
|
3851
4111
|
|
|
3852
4112
|
// src/swapped/SwappedWebView.tsx
|
|
3853
|
-
import { jsx as
|
|
4113
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
3854
4114
|
function SwappedWebView({ url, onMessage, style }) {
|
|
3855
4115
|
const webViewRef = useRef5(null);
|
|
3856
4116
|
const lastCommittedUrlRef = useRef5(url);
|
|
@@ -3872,7 +4132,7 @@ function SwappedWebView({ url, onMessage, style }) {
|
|
|
3872
4132
|
colorSchemeRef.current = colorScheme;
|
|
3873
4133
|
const handlerRef = useRef5(onMessage);
|
|
3874
4134
|
handlerRef.current = onMessage;
|
|
3875
|
-
|
|
4135
|
+
useEffect8(
|
|
3876
4136
|
() => transport.onMessage((msg) => {
|
|
3877
4137
|
if (msg.type === "SWAPPED_READY") {
|
|
3878
4138
|
transport.send({
|
|
@@ -3899,11 +4159,11 @@ function SwappedWebView({ url, onMessage, style }) {
|
|
|
3899
4159
|
);
|
|
3900
4160
|
};
|
|
3901
4161
|
const renderLoading = useCallback2(
|
|
3902
|
-
() => /* @__PURE__ */
|
|
3903
|
-
|
|
4162
|
+
() => /* @__PURE__ */ jsx25(
|
|
4163
|
+
View3,
|
|
3904
4164
|
{
|
|
3905
4165
|
style: [loadingOverlay, { backgroundColor: theme.background.modal }],
|
|
3906
|
-
children: /* @__PURE__ */
|
|
4166
|
+
children: /* @__PURE__ */ jsx25(ActivityIndicator, { color: theme.content.elements.secondary })
|
|
3907
4167
|
}
|
|
3908
4168
|
),
|
|
3909
4169
|
[theme.background.modal, theme.content.elements.secondary]
|
|
@@ -3921,7 +4181,7 @@ function SwappedWebView({ url, onMessage, style }) {
|
|
|
3921
4181
|
url: event.nativeEvent.url
|
|
3922
4182
|
});
|
|
3923
4183
|
};
|
|
3924
|
-
return /* @__PURE__ */
|
|
4184
|
+
return /* @__PURE__ */ jsx25(
|
|
3925
4185
|
WebView,
|
|
3926
4186
|
{
|
|
3927
4187
|
ref: webViewRef,
|
|
@@ -3960,7 +4220,7 @@ var loadingOverlay = {
|
|
|
3960
4220
|
};
|
|
3961
4221
|
|
|
3962
4222
|
// src/swapped/SwappedScreenShell.tsx
|
|
3963
|
-
import { jsx as
|
|
4223
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
3964
4224
|
function SwappedScreenShell({
|
|
3965
4225
|
url,
|
|
3966
4226
|
onMessage
|
|
@@ -3977,13 +4237,13 @@ function SwappedScreenShell({
|
|
|
3977
4237
|
},
|
|
3978
4238
|
[onMessage]
|
|
3979
4239
|
);
|
|
3980
|
-
return /* @__PURE__ */
|
|
4240
|
+
return /* @__PURE__ */ jsx26(
|
|
3981
4241
|
Box,
|
|
3982
4242
|
{
|
|
3983
4243
|
borderTopLeftRadius: "modal",
|
|
3984
4244
|
borderTopRightRadius: "modal",
|
|
3985
4245
|
style: [sheet2, { backgroundColor: theme.background.modal }],
|
|
3986
|
-
children: /* @__PURE__ */
|
|
4246
|
+
children: /* @__PURE__ */ jsx26(SwappedWebView, { url, onMessage: handleMessage, style: fill })
|
|
3987
4247
|
}
|
|
3988
4248
|
);
|
|
3989
4249
|
}
|
|
@@ -3992,7 +4252,7 @@ var sheet2 = { height: SHEET_HEIGHT, overflow: "hidden" };
|
|
|
3992
4252
|
var fill = { flex: 1 };
|
|
3993
4253
|
|
|
3994
4254
|
// src/swapped/SwappedScreen.tsx
|
|
3995
|
-
import { jsx as
|
|
4255
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
3996
4256
|
function SwappedScreen({
|
|
3997
4257
|
url,
|
|
3998
4258
|
onClose,
|
|
@@ -4019,7 +4279,7 @@ function SwappedScreen({
|
|
|
4019
4279
|
},
|
|
4020
4280
|
[onBack, onClose, onSuccess]
|
|
4021
4281
|
);
|
|
4022
|
-
return /* @__PURE__ */
|
|
4282
|
+
return /* @__PURE__ */ jsx27(SwappedScreenShell, { url, onMessage: handleMessage });
|
|
4023
4283
|
}
|
|
4024
4284
|
|
|
4025
4285
|
// src/swapped/SwappedWithdrawScreen.tsx
|
|
@@ -4027,7 +4287,7 @@ import {
|
|
|
4027
4287
|
isValidOrderData
|
|
4028
4288
|
} from "@funkit/connect-core";
|
|
4029
4289
|
import { useCallback as useCallback5 } from "react";
|
|
4030
|
-
import { jsx as
|
|
4290
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4031
4291
|
function SwappedWithdrawScreen({
|
|
4032
4292
|
url,
|
|
4033
4293
|
onClose,
|
|
@@ -4071,36 +4331,23 @@ function SwappedWithdrawScreen({
|
|
|
4071
4331
|
},
|
|
4072
4332
|
[onBack, onClose, onNewWithdrawal, onWithdrawalSuccess, onOrderData]
|
|
4073
4333
|
);
|
|
4074
|
-
return /* @__PURE__ */
|
|
4334
|
+
return /* @__PURE__ */ jsx28(SwappedScreenShell, { url, onMessage: handleMessage });
|
|
4075
4335
|
}
|
|
4076
4336
|
|
|
4077
|
-
// src/flow/FunkitFlowProvider.tsx
|
|
4078
|
-
import { isEvmChainId as isEvmChainId2 } from "@funkit/connect-core";
|
|
4079
|
-
|
|
4080
4337
|
// src/transfer/availableChains.ts
|
|
4081
4338
|
import { chainMetadataById } from "@funkit/chains";
|
|
4082
4339
|
import {
|
|
4083
4340
|
getConfiguredMinDepositUsd,
|
|
4084
|
-
getMinTransferValueUsd
|
|
4085
|
-
isEvmChainId
|
|
4341
|
+
getMinTransferValueUsd
|
|
4086
4342
|
} from "@funkit/connect-core";
|
|
4087
|
-
var EVM_NETWORK_ID = "evm";
|
|
4088
|
-
function belongsToNetwork(chainId, networkChainId) {
|
|
4089
|
-
if (networkChainId == null) return true;
|
|
4090
|
-
if (!isEvmChainId(networkChainId)) {
|
|
4091
|
-
return chainId === networkChainId;
|
|
4092
|
-
}
|
|
4093
|
-
return isEvmChainId(chainId);
|
|
4094
|
-
}
|
|
4095
4343
|
function buildAvailableChains({
|
|
4096
4344
|
t,
|
|
4097
4345
|
chainFilters,
|
|
4098
|
-
networkChainId,
|
|
4099
4346
|
minTransferLimits,
|
|
4100
4347
|
target
|
|
4101
4348
|
}) {
|
|
4102
4349
|
const minDepositAddOn = getConfiguredMinDepositUsd(target);
|
|
4103
|
-
return chainFilters.filter((f) => f.id !== "all").map((f) => ({ chainId: Number(f.id), name: f.label })).
|
|
4350
|
+
return chainFilters.filter((f) => f.id !== "all").map((f) => ({ chainId: Number(f.id), name: f.label })).map(({ chainId, name }) => {
|
|
4104
4351
|
const meta = chainMetadataById[chainId];
|
|
4105
4352
|
const min = getMinTransferValueUsd(
|
|
4106
4353
|
chainId,
|
|
@@ -4111,36 +4358,10 @@ function buildAvailableChains({
|
|
|
4111
4358
|
id: String(chainId),
|
|
4112
4359
|
name: name || meta?.name || t("networks.chainFallback", { chainId }),
|
|
4113
4360
|
iconUri: meta?.iconUrl ?? FALLBACK_ASSET_LOGO,
|
|
4114
|
-
minLabel: t("networks.
|
|
4361
|
+
minLabel: t("networks.minimum", { min })
|
|
4115
4362
|
};
|
|
4116
4363
|
});
|
|
4117
4364
|
}
|
|
4118
|
-
function buildDepositNetworks(t, chainFilters) {
|
|
4119
|
-
const chains = chainFilters.filter((f) => f.id !== "all").map((f) => ({ chainId: Number(f.id), label: f.label }));
|
|
4120
|
-
const iconUrl = (chainId) => chainMetadataById[chainId]?.iconUrl ?? FALLBACK_ASSET_LOGO;
|
|
4121
|
-
const evmChains = chains.filter((c) => isEvmChainId(c.chainId));
|
|
4122
|
-
const networks = [];
|
|
4123
|
-
if (evmChains.length > 0) {
|
|
4124
|
-
networks.push({
|
|
4125
|
-
id: EVM_NETWORK_ID,
|
|
4126
|
-
label: t("networks.evmChains"),
|
|
4127
|
-
iconKeys: evmChains.map((c) => iconUrl(c.chainId)),
|
|
4128
|
-
// Any EVM chain selects the shared EVM deposit address.
|
|
4129
|
-
chainId: evmChains[0].chainId
|
|
4130
|
-
});
|
|
4131
|
-
}
|
|
4132
|
-
for (const c of chains) {
|
|
4133
|
-
if (isEvmChainId(c.chainId)) continue;
|
|
4134
|
-
const meta = chainMetadataById[c.chainId];
|
|
4135
|
-
networks.push({
|
|
4136
|
-
id: String(c.chainId),
|
|
4137
|
-
label: c.label || meta?.name || t("networks.chainFallback", { chainId: c.chainId }),
|
|
4138
|
-
iconKeys: [iconUrl(c.chainId)],
|
|
4139
|
-
chainId: c.chainId
|
|
4140
|
-
});
|
|
4141
|
-
}
|
|
4142
|
-
return networks;
|
|
4143
|
-
}
|
|
4144
4365
|
|
|
4145
4366
|
// src/transfer/clipboard.ts
|
|
4146
4367
|
async function copyToClipboard(value) {
|
|
@@ -4207,77 +4428,32 @@ function useFiatExchangeRates(enabled = true) {
|
|
|
4207
4428
|
gcTime: 1e3 * 60 * 60,
|
|
4208
4429
|
// 1 hour
|
|
4209
4430
|
enabled
|
|
4210
|
-
});
|
|
4211
|
-
return { data, isLoading, error };
|
|
4212
|
-
}
|
|
4213
|
-
|
|
4214
|
-
// src/transfer/hooks/useFops.ts
|
|
4215
|
-
import {
|
|
4216
|
-
getFops
|
|
4217
|
-
} from "@funkit/api-base";
|
|
4218
|
-
import {
|
|
4219
|
-
FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS,
|
|
4220
|
-
solanaChain
|
|
4221
|
-
} from "@funkit/chains";
|
|
4222
|
-
import {
|
|
4223
|
-
DEFAULT_FIAT_CURRENCY,
|
|
4224
|
-
FOPS_STALE_TIME,
|
|
4225
|
-
buildSwappedThirdPartyPaymentConfigs,
|
|
4226
|
-
getConfiguredMinDepositUsd as getConfiguredMinDepositUsd2,
|
|
4227
|
-
getDepositAddressForChain,
|
|
4228
|
-
getMinTransferValueEur,
|
|
4229
|
-
sortFops,
|
|
4230
|
-
useSwappedDefaultCurrencyQuery
|
|
4231
|
-
} from "@funkit/connect-core";
|
|
4232
|
-
import { useTheme as useTheme3 } from "@shopify/restyle";
|
|
4233
|
-
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
4234
|
-
import { useMemo as useMemo7 } from "react";
|
|
4235
|
-
|
|
4236
|
-
// src/identity/IdentityContext.tsx
|
|
4237
|
-
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
4238
|
-
|
|
4239
|
-
// src/utils/customers.ts
|
|
4240
|
-
import { MALLARD_API_KEY } from "@funkit/api-base";
|
|
4241
|
-
function isMallardApiKey(apiKey) {
|
|
4242
|
-
return apiKey === MALLARD_API_KEY;
|
|
4243
|
-
}
|
|
4244
|
-
|
|
4245
|
-
// src/identity/IdentityContext.tsx
|
|
4246
|
-
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
4247
|
-
function generateSyntheticUserId(apiKey, externalUserId) {
|
|
4248
|
-
if (isMallardApiKey(apiKey)) {
|
|
4249
|
-
return externalUserId;
|
|
4250
|
-
}
|
|
4251
|
-
return `${apiKey}|${externalUserId}`;
|
|
4252
|
-
}
|
|
4253
|
-
function resolveFunkitIdentity(config, walletAddress) {
|
|
4254
|
-
const address = walletAddress || "0x";
|
|
4255
|
-
const userId = config.externalUserId ? generateSyntheticUserId(config.apiKey, config.externalUserId) : address;
|
|
4256
|
-
return {
|
|
4257
|
-
apiKey: config.apiKey,
|
|
4258
|
-
userId,
|
|
4259
|
-
walletAddress: address,
|
|
4260
|
-
loginType: config.loginType,
|
|
4261
|
-
prefillFiatEmail: config.prefillFiatEmail
|
|
4262
|
-
};
|
|
4263
|
-
}
|
|
4264
|
-
var FunkitIdentityContext = createContext3(null);
|
|
4265
|
-
function FunkitIdentityProvider({
|
|
4266
|
-
identity,
|
|
4267
|
-
children
|
|
4268
|
-
}) {
|
|
4269
|
-
return /* @__PURE__ */ jsx24(FunkitIdentityContext.Provider, { value: identity, children });
|
|
4270
|
-
}
|
|
4271
|
-
function useFunkitIdentity() {
|
|
4272
|
-
const identity = useContext3(FunkitIdentityContext);
|
|
4273
|
-
if (identity == null) {
|
|
4274
|
-
throw new Error(
|
|
4275
|
-
"useFunkitIdentity must be used within a <FunkitIdentityProvider> (mounted by <FunkitProvider>)"
|
|
4276
|
-
);
|
|
4277
|
-
}
|
|
4278
|
-
return identity;
|
|
4431
|
+
});
|
|
4432
|
+
return { data, isLoading, error };
|
|
4279
4433
|
}
|
|
4280
4434
|
|
|
4435
|
+
// src/transfer/hooks/useFops.ts
|
|
4436
|
+
import {
|
|
4437
|
+
getFops
|
|
4438
|
+
} from "@funkit/api-base";
|
|
4439
|
+
import {
|
|
4440
|
+
FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS,
|
|
4441
|
+
solanaChain
|
|
4442
|
+
} from "@funkit/chains";
|
|
4443
|
+
import {
|
|
4444
|
+
DEFAULT_FIAT_CURRENCY,
|
|
4445
|
+
FOPS_STALE_TIME,
|
|
4446
|
+
buildSwappedThirdPartyPaymentConfigs,
|
|
4447
|
+
getConfiguredMinDepositUsd as getConfiguredMinDepositUsd2,
|
|
4448
|
+
getDepositAddressForChain,
|
|
4449
|
+
getMinTransferValueEur,
|
|
4450
|
+
sortFops,
|
|
4451
|
+
useSwappedDefaultCurrencyQuery
|
|
4452
|
+
} from "@funkit/connect-core";
|
|
4453
|
+
import { useTheme as useTheme3 } from "@shopify/restyle";
|
|
4454
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
4455
|
+
import { useMemo as useMemo7 } from "react";
|
|
4456
|
+
|
|
4281
4457
|
// src/transfer/hooks/useTransferInit.ts
|
|
4282
4458
|
import {
|
|
4283
4459
|
initializeCheckoutTokenTransferAddress
|
|
@@ -4828,6 +5004,46 @@ function useWithdrawalExecution({
|
|
|
4828
5004
|
return { executeOrder };
|
|
4829
5005
|
}
|
|
4830
5006
|
|
|
5007
|
+
// src/transfer/hooks/useCopyDepositAddress.ts
|
|
5008
|
+
import { useCallback as useCallback7, useEffect as useEffect9, useRef as useRef7 } from "react";
|
|
5009
|
+
function useCopyDepositAddress({
|
|
5010
|
+
copyToClipboard: copyToClipboard2,
|
|
5011
|
+
onCopySuccess,
|
|
5012
|
+
isTransferOpen,
|
|
5013
|
+
address
|
|
5014
|
+
}) {
|
|
5015
|
+
const copyAddress = useCallback7(
|
|
5016
|
+
async (value) => {
|
|
5017
|
+
try {
|
|
5018
|
+
const ok = await copyToClipboard2(value) !== false;
|
|
5019
|
+
if (ok) {
|
|
5020
|
+
onCopySuccess();
|
|
5021
|
+
}
|
|
5022
|
+
return ok;
|
|
5023
|
+
} catch (error) {
|
|
5024
|
+
logger.warn("connect-rn: clipboard write threw; address not copied", {
|
|
5025
|
+
error: error instanceof Error ? error.message : String(error)
|
|
5026
|
+
});
|
|
5027
|
+
return false;
|
|
5028
|
+
}
|
|
5029
|
+
},
|
|
5030
|
+
[copyToClipboard2, onCopySuccess]
|
|
5031
|
+
);
|
|
5032
|
+
const copiedAddressRef = useRef7(void 0);
|
|
5033
|
+
useEffect9(() => {
|
|
5034
|
+
if (!isTransferOpen) {
|
|
5035
|
+
copiedAddressRef.current = void 0;
|
|
5036
|
+
return;
|
|
5037
|
+
}
|
|
5038
|
+
if (!address || copiedAddressRef.current === address) {
|
|
5039
|
+
return;
|
|
5040
|
+
}
|
|
5041
|
+
copiedAddressRef.current = address;
|
|
5042
|
+
void copyAddress(address);
|
|
5043
|
+
}, [isTransferOpen, address, copyAddress]);
|
|
5044
|
+
return copyAddress;
|
|
5045
|
+
}
|
|
5046
|
+
|
|
4831
5047
|
// src/transfer/hooks/useSupportedTokens.ts
|
|
4832
5048
|
import { getSupportedAssets } from "@funkit/api-base";
|
|
4833
5049
|
import {
|
|
@@ -4951,9 +5167,9 @@ function useTokenTransfer({
|
|
|
4951
5167
|
|
|
4952
5168
|
// src/transfer/QrCode.tsx
|
|
4953
5169
|
import QRCode from "react-native-qrcode-svg";
|
|
4954
|
-
import { jsx as
|
|
5170
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4955
5171
|
function QrCode({ value, size = 220, ecl = "H" }) {
|
|
4956
|
-
return /* @__PURE__ */
|
|
5172
|
+
return /* @__PURE__ */ jsx29(
|
|
4957
5173
|
QRCode,
|
|
4958
5174
|
{
|
|
4959
5175
|
value,
|
|
@@ -4966,9 +5182,9 @@ function QrCode({ value, size = 220, ecl = "H" }) {
|
|
|
4966
5182
|
}
|
|
4967
5183
|
|
|
4968
5184
|
// src/flow/AddressCopiedToast.tsx
|
|
4969
|
-
import { StyleSheet as
|
|
4970
|
-
import
|
|
4971
|
-
import { jsx as
|
|
5185
|
+
import { StyleSheet as StyleSheet10 } from "react-native";
|
|
5186
|
+
import Animated2, { Easing as Easing2, FadeOutUp, Keyframe as Keyframe2 } from "react-native-reanimated";
|
|
5187
|
+
import { jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4972
5188
|
var enterAnimation = new Keyframe2({
|
|
4973
5189
|
0: {
|
|
4974
5190
|
opacity: 0,
|
|
@@ -4977,7 +5193,7 @@ var enterAnimation = new Keyframe2({
|
|
|
4977
5193
|
100: {
|
|
4978
5194
|
opacity: 1,
|
|
4979
5195
|
transform: [{ translateY: 0 }, { scale: 1 }],
|
|
4980
|
-
easing:
|
|
5196
|
+
easing: Easing2.bezier(0.34, 1.36, 0.64, 1)
|
|
4981
5197
|
}
|
|
4982
5198
|
}).duration(450);
|
|
4983
5199
|
var exitAnimation = FadeOutUp.duration(350);
|
|
@@ -4985,17 +5201,17 @@ function AddressCopiedToast() {
|
|
|
4985
5201
|
const { t } = useFunkitTranslation();
|
|
4986
5202
|
const label = t("common.addressCopied");
|
|
4987
5203
|
const theme = useTheme();
|
|
4988
|
-
return /* @__PURE__ */
|
|
4989
|
-
|
|
5204
|
+
return /* @__PURE__ */ jsxs11(
|
|
5205
|
+
Animated2.View,
|
|
4990
5206
|
{
|
|
4991
5207
|
entering: enterAnimation,
|
|
4992
5208
|
exiting: exitAnimation,
|
|
4993
|
-
style: [
|
|
5209
|
+
style: [styles10.pill, { backgroundColor: theme.background.pill.default }],
|
|
4994
5210
|
accessibilityRole: "alert",
|
|
4995
5211
|
accessibilityLabel: label,
|
|
4996
5212
|
children: [
|
|
4997
|
-
/* @__PURE__ */
|
|
4998
|
-
/* @__PURE__ */
|
|
5213
|
+
/* @__PURE__ */ jsx30(Text, { variant: "bodyMedium", children: label }),
|
|
5214
|
+
/* @__PURE__ */ jsx30(FigmaSuccessCheckIcon, { size: 16 })
|
|
4999
5215
|
]
|
|
5000
5216
|
}
|
|
5001
5217
|
);
|
|
@@ -5012,7 +5228,7 @@ var pill = {
|
|
|
5012
5228
|
shadowOffset: { width: 0, height: 4 },
|
|
5013
5229
|
shadowRadius: 12
|
|
5014
5230
|
};
|
|
5015
|
-
var
|
|
5231
|
+
var styles10 = StyleSheet10.create({ pill });
|
|
5016
5232
|
|
|
5017
5233
|
// src/flow/depositFlowConfig.ts
|
|
5018
5234
|
function getDefaultDynamicTargetAsset(candidates, dynamicRoutingId) {
|
|
@@ -5024,11 +5240,11 @@ function getDefaultDynamicTargetAsset(candidates, dynamicRoutingId) {
|
|
|
5024
5240
|
|
|
5025
5241
|
// src/flow/FlowSheet.tsx
|
|
5026
5242
|
import {
|
|
5027
|
-
useCallback as
|
|
5243
|
+
useCallback as useCallback8,
|
|
5028
5244
|
useEffect as useEffect11,
|
|
5029
|
-
useRef as
|
|
5245
|
+
useRef as useRef8
|
|
5030
5246
|
} from "react";
|
|
5031
|
-
import { View as
|
|
5247
|
+
import { View as View4 } from "react-native";
|
|
5032
5248
|
import {
|
|
5033
5249
|
BottomSheetBackdrop,
|
|
5034
5250
|
BottomSheetModal,
|
|
@@ -5036,14 +5252,14 @@ import {
|
|
|
5036
5252
|
BottomSheetView,
|
|
5037
5253
|
useBottomSheetTimingConfigs
|
|
5038
5254
|
} from "@gorhom/bottom-sheet";
|
|
5039
|
-
import { Easing as
|
|
5255
|
+
import { Easing as Easing3 } from "react-native-reanimated";
|
|
5040
5256
|
import { useSafeAreaInsets as useSafeAreaInsets3 } from "react-native-safe-area-context";
|
|
5041
5257
|
|
|
5042
5258
|
// src/flow/useKeyboardHeight.ts
|
|
5043
|
-
import { useEffect as useEffect10, useState as
|
|
5259
|
+
import { useEffect as useEffect10, useState as useState9 } from "react";
|
|
5044
5260
|
import { Keyboard, Platform } from "react-native";
|
|
5045
5261
|
function useKeyboardHeight(enabled) {
|
|
5046
|
-
const [height, setHeight] =
|
|
5262
|
+
const [height, setHeight] = useState9(0);
|
|
5047
5263
|
useEffect10(() => {
|
|
5048
5264
|
if (!enabled) {
|
|
5049
5265
|
setHeight(0);
|
|
@@ -5065,24 +5281,24 @@ function useKeyboardHeight(enabled) {
|
|
|
5065
5281
|
}
|
|
5066
5282
|
|
|
5067
5283
|
// src/flow/FlowSheet.tsx
|
|
5068
|
-
import { jsx as
|
|
5284
|
+
import { jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
5069
5285
|
function FlowSheet({
|
|
5070
5286
|
isOpen,
|
|
5071
5287
|
session,
|
|
5072
5288
|
onClose,
|
|
5073
|
-
content:
|
|
5289
|
+
content: content2,
|
|
5074
5290
|
children,
|
|
5075
5291
|
keyboardAvoidEnabled = false,
|
|
5076
5292
|
enableSwipeToDismiss = true
|
|
5077
5293
|
}) {
|
|
5078
|
-
const ref =
|
|
5079
|
-
const setRef =
|
|
5294
|
+
const ref = useRef8(null);
|
|
5295
|
+
const setRef = useCallback8((instance) => {
|
|
5080
5296
|
ref.current = instance;
|
|
5081
5297
|
}, []);
|
|
5082
5298
|
const keyboardHeight = useKeyboardHeight(keyboardAvoidEnabled);
|
|
5083
5299
|
const insets = useSafeAreaInsets3();
|
|
5084
|
-
const hasPresented =
|
|
5085
|
-
const sheetSelfDismissed =
|
|
5300
|
+
const hasPresented = useRef8(false);
|
|
5301
|
+
const sheetSelfDismissed = useRef8(false);
|
|
5086
5302
|
useEffect11(() => {
|
|
5087
5303
|
if (isOpen) {
|
|
5088
5304
|
sheetSelfDismissed.current = false;
|
|
@@ -5098,16 +5314,16 @@ function FlowSheet({
|
|
|
5098
5314
|
}
|
|
5099
5315
|
ref.current?.dismiss();
|
|
5100
5316
|
}, [isOpen, session]);
|
|
5101
|
-
const handleDismiss =
|
|
5317
|
+
const handleDismiss = useCallback8(() => {
|
|
5102
5318
|
sheetSelfDismissed.current = true;
|
|
5103
5319
|
onClose();
|
|
5104
5320
|
}, [onClose]);
|
|
5105
5321
|
const animationConfigs = useBottomSheetTimingConfigs({
|
|
5106
5322
|
duration: 300,
|
|
5107
|
-
easing:
|
|
5323
|
+
easing: Easing3.bezier(0.22, 1, 0.36, 1)
|
|
5108
5324
|
});
|
|
5109
|
-
const renderBackdrop =
|
|
5110
|
-
(props) => /* @__PURE__ */
|
|
5325
|
+
const renderBackdrop = useCallback8(
|
|
5326
|
+
(props) => /* @__PURE__ */ jsx31(
|
|
5111
5327
|
BottomSheetBackdrop,
|
|
5112
5328
|
{
|
|
5113
5329
|
...props,
|
|
@@ -5118,9 +5334,9 @@ function FlowSheet({
|
|
|
5118
5334
|
),
|
|
5119
5335
|
[]
|
|
5120
5336
|
);
|
|
5121
|
-
return /* @__PURE__ */
|
|
5337
|
+
return /* @__PURE__ */ jsxs12(BottomSheetModalProvider, { children: [
|
|
5122
5338
|
children,
|
|
5123
|
-
/* @__PURE__ */
|
|
5339
|
+
/* @__PURE__ */ jsx31(
|
|
5124
5340
|
BottomSheetModal,
|
|
5125
5341
|
{
|
|
5126
5342
|
ref: setRef,
|
|
@@ -5134,9 +5350,9 @@ function FlowSheet({
|
|
|
5134
5350
|
backdropComponent: renderBackdrop,
|
|
5135
5351
|
handleComponent: null,
|
|
5136
5352
|
backgroundComponent: FlowSheetBackground,
|
|
5137
|
-
children: /* @__PURE__ */
|
|
5138
|
-
|
|
5139
|
-
keyboardHeight > 0 ? /* @__PURE__ */
|
|
5353
|
+
children: /* @__PURE__ */ jsxs12(BottomSheetView, { children: [
|
|
5354
|
+
content2,
|
|
5355
|
+
keyboardHeight > 0 ? /* @__PURE__ */ jsx31(View4, { style: { height: keyboardHeight } }) : null
|
|
5140
5356
|
] })
|
|
5141
5357
|
}
|
|
5142
5358
|
)
|
|
@@ -5156,7 +5372,7 @@ function FlowSheetBackground({
|
|
|
5156
5372
|
...bottomExtension,
|
|
5157
5373
|
backgroundColor: theme.background.modal
|
|
5158
5374
|
};
|
|
5159
|
-
return /* @__PURE__ */
|
|
5375
|
+
return /* @__PURE__ */ jsx31(View4, { pointerEvents, style: [style, surface], children: /* @__PURE__ */ jsx31(View4, { style: extension }) });
|
|
5160
5376
|
}
|
|
5161
5377
|
var bottomExtension = {
|
|
5162
5378
|
position: "absolute",
|
|
@@ -5166,8 +5382,32 @@ var bottomExtension = {
|
|
|
5166
5382
|
height: 1e3
|
|
5167
5383
|
};
|
|
5168
5384
|
|
|
5385
|
+
// src/flow/selectedChainStorage.ts
|
|
5386
|
+
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
5387
|
+
var storageKey = (userId) => `funkit.selectedChain.${userId}`;
|
|
5388
|
+
async function readSelectedChainId(userId) {
|
|
5389
|
+
try {
|
|
5390
|
+
return await AsyncStorage.getItem(storageKey(userId));
|
|
5391
|
+
} catch (error) {
|
|
5392
|
+
logger.warn("connect-rn:deposit:chain_read_failed", {
|
|
5393
|
+
error: error instanceof Error ? error.message : String(error)
|
|
5394
|
+
});
|
|
5395
|
+
return null;
|
|
5396
|
+
}
|
|
5397
|
+
}
|
|
5398
|
+
async function writeSelectedChainId(userId, chainId) {
|
|
5399
|
+
try {
|
|
5400
|
+
await AsyncStorage.setItem(storageKey(userId), chainId);
|
|
5401
|
+
} catch (error) {
|
|
5402
|
+
logger.warn("connect-rn:deposit:chain_write_failed", {
|
|
5403
|
+
chainId,
|
|
5404
|
+
error: error instanceof Error ? error.message : String(error)
|
|
5405
|
+
});
|
|
5406
|
+
}
|
|
5407
|
+
}
|
|
5408
|
+
|
|
5169
5409
|
// src/flow/FunkitFlowProvider.tsx
|
|
5170
|
-
import { Fragment as Fragment2, jsx as
|
|
5410
|
+
import { Fragment as Fragment2, jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
5171
5411
|
var CLOSED = {
|
|
5172
5412
|
isOpen: false,
|
|
5173
5413
|
stack: [],
|
|
@@ -5180,8 +5420,8 @@ function FunkitFlowProvider({
|
|
|
5180
5420
|
copyToClipboard: copyToClipboard2 = copyToClipboard
|
|
5181
5421
|
}) {
|
|
5182
5422
|
const insets = useSafeAreaInsets4();
|
|
5183
|
-
const [state, setState] =
|
|
5184
|
-
const beginDeposit =
|
|
5423
|
+
const [state, setState] = useState10(CLOSED);
|
|
5424
|
+
const beginDeposit = useCallback9(
|
|
5185
5425
|
(config, callbacks = {}) => {
|
|
5186
5426
|
callbacks.onOpen?.();
|
|
5187
5427
|
setState((prev) => ({
|
|
@@ -5193,7 +5433,7 @@ function FunkitFlowProvider({
|
|
|
5193
5433
|
},
|
|
5194
5434
|
[]
|
|
5195
5435
|
);
|
|
5196
|
-
const beginWithdrawal =
|
|
5436
|
+
const beginWithdrawal = useCallback9(
|
|
5197
5437
|
(config, callbacks = {}) => {
|
|
5198
5438
|
callbacks.onOpen?.();
|
|
5199
5439
|
setState((prev) => ({
|
|
@@ -5205,13 +5445,13 @@ function FunkitFlowProvider({
|
|
|
5205
5445
|
},
|
|
5206
5446
|
[]
|
|
5207
5447
|
);
|
|
5208
|
-
const clearToast =
|
|
5448
|
+
const clearToast = useCallback9(() => {
|
|
5209
5449
|
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
5210
5450
|
if (unmountTimerRef.current) clearTimeout(unmountTimerRef.current);
|
|
5211
5451
|
setCopiedToastShown(false);
|
|
5212
5452
|
setToastMounted(false);
|
|
5213
5453
|
}, []);
|
|
5214
|
-
const closeFlow =
|
|
5454
|
+
const closeFlow = useCallback9(() => {
|
|
5215
5455
|
setState((prev) => {
|
|
5216
5456
|
if (!prev.isOpen) return prev;
|
|
5217
5457
|
prev.flow?.callbacks.onClose?.();
|
|
@@ -5219,13 +5459,13 @@ function FunkitFlowProvider({
|
|
|
5219
5459
|
});
|
|
5220
5460
|
clearToast();
|
|
5221
5461
|
}, [clearToast]);
|
|
5222
|
-
const navigate =
|
|
5462
|
+
const navigate = useCallback9((screen) => {
|
|
5223
5463
|
setState((prev) => ({ ...prev, stack: [...prev.stack, screen] }));
|
|
5224
5464
|
}, []);
|
|
5225
|
-
const reset =
|
|
5465
|
+
const reset = useCallback9((screen) => {
|
|
5226
5466
|
setState((prev) => prev.isOpen ? { ...prev, stack: [screen] } : prev);
|
|
5227
5467
|
}, []);
|
|
5228
|
-
const back =
|
|
5468
|
+
const back = useCallback9(() => {
|
|
5229
5469
|
setState((prev) => {
|
|
5230
5470
|
if (!prev.isOpen) return prev;
|
|
5231
5471
|
if (prev.stack.length <= 1) {
|
|
@@ -5245,15 +5485,15 @@ function FunkitFlowProvider({
|
|
|
5245
5485
|
() => ({ navigate, back, reset, closeFlow }),
|
|
5246
5486
|
[navigate, back, reset, closeFlow]
|
|
5247
5487
|
);
|
|
5248
|
-
const [toastMounted, setToastMounted] =
|
|
5249
|
-
const [copiedToastShown, setCopiedToastShown] =
|
|
5250
|
-
const hideTimerRef =
|
|
5488
|
+
const [toastMounted, setToastMounted] = useState10(false);
|
|
5489
|
+
const [copiedToastShown, setCopiedToastShown] = useState10(false);
|
|
5490
|
+
const hideTimerRef = useRef9(
|
|
5251
5491
|
void 0
|
|
5252
5492
|
);
|
|
5253
|
-
const unmountTimerRef =
|
|
5493
|
+
const unmountTimerRef = useRef9(
|
|
5254
5494
|
void 0
|
|
5255
5495
|
);
|
|
5256
|
-
const showCopiedToast =
|
|
5496
|
+
const showCopiedToast = useCallback9(() => {
|
|
5257
5497
|
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
5258
5498
|
if (unmountTimerRef.current) clearTimeout(unmountTimerRef.current);
|
|
5259
5499
|
setToastMounted(true);
|
|
@@ -5267,18 +5507,18 @@ function FunkitFlowProvider({
|
|
|
5267
5507
|
}, TOAST_VISIBLE_MS);
|
|
5268
5508
|
}, []);
|
|
5269
5509
|
useEffect12(() => () => clearToast(), [clearToast]);
|
|
5270
|
-
return /* @__PURE__ */
|
|
5271
|
-
/* @__PURE__ */
|
|
5510
|
+
return /* @__PURE__ */ jsx32(FunkitFlowContext.Provider, { value, children: /* @__PURE__ */ jsxs13(View5, { style: rootContainer, children: [
|
|
5511
|
+
/* @__PURE__ */ jsx32(
|
|
5272
5512
|
FlowSheet,
|
|
5273
5513
|
{
|
|
5274
5514
|
isOpen: state.isOpen,
|
|
5275
5515
|
session: state.session,
|
|
5276
5516
|
onClose: closeFlow,
|
|
5277
5517
|
keyboardAvoidEnabled: current === "swapped",
|
|
5278
|
-
enableSwipeToDismiss: isHomeScreen,
|
|
5518
|
+
enableSwipeToDismiss: isHomeScreen || current === "transfer",
|
|
5279
5519
|
content: (
|
|
5280
5520
|
// Mounted only while open so the flow queries run only then.
|
|
5281
|
-
state.isOpen && state.flow ? state.flow.mode === "deposit" ? /* @__PURE__ */
|
|
5521
|
+
state.isOpen && state.flow ? state.flow.mode === "deposit" ? /* @__PURE__ */ jsx32(
|
|
5282
5522
|
FlowContent,
|
|
5283
5523
|
{
|
|
5284
5524
|
config: state.flow.config,
|
|
@@ -5288,7 +5528,7 @@ function FunkitFlowProvider({
|
|
|
5288
5528
|
onCopySuccess: showCopiedToast,
|
|
5289
5529
|
callbacks: state.flow.callbacks
|
|
5290
5530
|
}
|
|
5291
|
-
) : /* @__PURE__ */
|
|
5531
|
+
) : /* @__PURE__ */ jsx32(
|
|
5292
5532
|
WithdrawalFlowContent,
|
|
5293
5533
|
{
|
|
5294
5534
|
config: state.flow.config,
|
|
@@ -5301,27 +5541,21 @@ function FunkitFlowProvider({
|
|
|
5301
5541
|
children
|
|
5302
5542
|
}
|
|
5303
5543
|
),
|
|
5304
|
-
toastMounted ? /* @__PURE__ */
|
|
5305
|
-
|
|
5544
|
+
toastMounted ? /* @__PURE__ */ jsx32(
|
|
5545
|
+
View5,
|
|
5306
5546
|
{
|
|
5307
5547
|
style: [
|
|
5308
5548
|
toastOverlay,
|
|
5309
5549
|
{ paddingTop: insets.top + TOAST_INSET_OFFSET }
|
|
5310
5550
|
],
|
|
5311
5551
|
pointerEvents: "none",
|
|
5312
|
-
children: copiedToastShown ? /* @__PURE__ */
|
|
5552
|
+
children: copiedToastShown ? /* @__PURE__ */ jsx32(AddressCopiedToast, {}) : null
|
|
5313
5553
|
}
|
|
5314
5554
|
) : null
|
|
5315
5555
|
] }) });
|
|
5316
5556
|
}
|
|
5317
|
-
var DEFAULT_EVM_CHAIN_ID = 1;
|
|
5318
5557
|
var CRYPTO_METHOD_ID = "crypto";
|
|
5319
|
-
|
|
5320
|
-
if (selectedNetworkId == null) return initialChainId;
|
|
5321
|
-
if (selectedNetworkId === EVM_NETWORK_ID) return evmRepresentativeChainId;
|
|
5322
|
-
const id = Number(selectedNetworkId);
|
|
5323
|
-
return Number.isFinite(id) ? id : initialChainId;
|
|
5324
|
-
}
|
|
5558
|
+
var CRYPTO_WITHDRAWAL_METHOD_ID = "crypto-withdrawal";
|
|
5325
5559
|
function FlowContent({
|
|
5326
5560
|
config,
|
|
5327
5561
|
current,
|
|
@@ -5332,218 +5566,119 @@ function FlowContent({
|
|
|
5332
5566
|
}) {
|
|
5333
5567
|
const { t } = useFunkitTranslation();
|
|
5334
5568
|
const insets = useSafeAreaInsets4();
|
|
5569
|
+
const { userId } = useFunkitIdentity();
|
|
5335
5570
|
const { isGeoblocked, isLoadingGeoCheck } = useCheckoutBlocked({
|
|
5336
5571
|
onCheckoutBlocked: callbacks.onCheckoutBlocked
|
|
5337
5572
|
});
|
|
5338
|
-
const
|
|
5339
|
-
const
|
|
5340
|
-
() => getDefaultDynamicTargetAsset(
|
|
5341
|
-
config.dynamicTargetAssetCandidates,
|
|
5342
|
-
config.dynamicRoutingId
|
|
5343
|
-
)
|
|
5344
|
-
);
|
|
5345
|
-
const activeCheckoutConfig = selectedCandidate ? {
|
|
5346
|
-
...config.checkoutConfig,
|
|
5347
|
-
targetChain: selectedCandidate.tokenChainId,
|
|
5348
|
-
targetAsset: selectedCandidate.tokenAddress
|
|
5349
|
-
} : config.checkoutConfig;
|
|
5350
|
-
const activeDynamicRoutingId = selectedCandidate?.dynamicRoutingId ?? config.dynamicRoutingId;
|
|
5351
|
-
const parsedSourceChain = config.sourceChain ? Number(config.sourceChain) : void 0;
|
|
5352
|
-
const initialChainId = parsedSourceChain != null && Number.isFinite(parsedSourceChain) ? parsedSourceChain : void 0;
|
|
5353
|
-
const evmRepresentativeChainId = initialChainId != null && isEvmChainId2(initialChainId) ? initialChainId : DEFAULT_EVM_CHAIN_ID;
|
|
5354
|
-
const selectedChainId = resolveSelectedChainId(
|
|
5355
|
-
selectedNetworkId,
|
|
5356
|
-
initialChainId,
|
|
5357
|
-
evmRepresentativeChainId
|
|
5358
|
-
);
|
|
5573
|
+
const { selectedChainId, rememberChainId } = useRememberedChain(userId);
|
|
5574
|
+
const targetAsset = useDepositTargetAsset(config);
|
|
5359
5575
|
const {
|
|
5360
5576
|
depositAddress: generatedAddress,
|
|
5361
5577
|
qrCodeUri,
|
|
5362
5578
|
transferInit,
|
|
5363
5579
|
isLoading: isAddressLoading
|
|
5364
5580
|
} = useTokenTransfer({
|
|
5365
|
-
checkoutConfig: activeCheckoutConfig,
|
|
5366
|
-
selectedChainId,
|
|
5367
|
-
dynamicRoutingId: activeDynamicRoutingId,
|
|
5581
|
+
checkoutConfig: targetAsset.activeCheckoutConfig,
|
|
5582
|
+
selectedChainId: selectedChainId ? Number(selectedChainId) : void 0,
|
|
5583
|
+
dynamicRoutingId: targetAsset.activeDynamicRoutingId,
|
|
5368
5584
|
enabled: true
|
|
5369
5585
|
});
|
|
5370
5586
|
const fetched = useSupportedTokens({ transferInit });
|
|
5371
5587
|
const tokenChainFilters = config.tokenChainFilters ?? fetched.chainFilters;
|
|
5372
5588
|
const isChainListLoading = !config.tokenChainFilters && fetched.isLoading;
|
|
5373
|
-
const depositNetworks = useMemo10(
|
|
5374
|
-
() => buildDepositNetworks(t, tokenChainFilters),
|
|
5375
|
-
[t, tokenChainFilters]
|
|
5376
|
-
);
|
|
5377
|
-
const initialNetwork = initialChainId == null ? void 0 : depositNetworks.find(
|
|
5378
|
-
(n) => n.chainId != null && belongsToNetwork(initialChainId, n.chainId)
|
|
5379
|
-
);
|
|
5380
|
-
const selectedChain = depositNetworks.find((n) => n.id === selectedNetworkId) ?? initialNetwork ?? depositNetworks[0];
|
|
5381
5589
|
const minTransferLimits = useDynamicConfig("mintokentransfervalue");
|
|
5382
|
-
const {
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
isSwappedEnabled,
|
|
5386
|
-
isLoading: isFopsLoading,
|
|
5387
|
-
isError: isFopsError,
|
|
5388
|
-
refetch: refetchFops
|
|
5389
|
-
} = useFops({
|
|
5390
|
-
checkoutConfig: activeCheckoutConfig,
|
|
5391
|
-
dynamicRoutingId: activeDynamicRoutingId
|
|
5590
|
+
const fops = useFops({
|
|
5591
|
+
checkoutConfig: targetAsset.activeCheckoutConfig,
|
|
5592
|
+
dynamicRoutingId: targetAsset.activeDynamicRoutingId
|
|
5392
5593
|
});
|
|
5393
|
-
const { data: exchangeRates } = useFiatExchangeRates(isSwappedEnabled);
|
|
5394
5594
|
const { isLoading: isStatsigLoading } = useStatsigClient2();
|
|
5395
|
-
const [selectedSwappedUrl, setSelectedSwappedUrl] =
|
|
5396
|
-
const
|
|
5595
|
+
const [selectedSwappedUrl, setSelectedSwappedUrl] = useState10();
|
|
5596
|
+
const minDepositTarget = {
|
|
5597
|
+
targetChain: targetAsset.activeCheckoutConfig?.targetChain,
|
|
5598
|
+
targetAsset: targetAsset.activeCheckoutConfig?.targetAsset,
|
|
5599
|
+
dynamicRoutingId: targetAsset.activeDynamicRoutingId,
|
|
5600
|
+
getMinDepositUSD: config.checkoutConfig?.getMinDepositUSD
|
|
5601
|
+
};
|
|
5602
|
+
const allChains = buildAvailableChains({
|
|
5397
5603
|
t,
|
|
5398
5604
|
chainFilters: tokenChainFilters,
|
|
5399
|
-
networkChainId: selectedChainId,
|
|
5400
5605
|
minTransferLimits,
|
|
5401
|
-
target:
|
|
5402
|
-
targetChain: activeCheckoutConfig?.targetChain,
|
|
5403
|
-
targetAsset: activeCheckoutConfig?.targetAsset,
|
|
5404
|
-
dynamicRoutingId: activeDynamicRoutingId,
|
|
5405
|
-
getMinDepositUSD: config.checkoutConfig?.getMinDepositUSD
|
|
5406
|
-
}
|
|
5606
|
+
target: minDepositTarget
|
|
5407
5607
|
});
|
|
5408
|
-
const
|
|
5409
|
-
const rawAddress = generatedAddress ?? config.depositAddress;
|
|
5410
|
-
const displayAddress = rawAddress ? formatDepositAddress(rawAddress) : t("transferCrypto.generating");
|
|
5411
|
-
const copyAddressAndToast = useCallback8(
|
|
5412
|
-
async (value) => {
|
|
5413
|
-
const ok = await copyToClipboard2(value) !== false;
|
|
5414
|
-
if (ok) onCopySuccess();
|
|
5415
|
-
return ok;
|
|
5416
|
-
},
|
|
5417
|
-
[copyToClipboard2, onCopySuccess]
|
|
5418
|
-
);
|
|
5419
|
-
const nestedSheetRef = useRef8(null);
|
|
5420
|
-
const [nestedScreen, setNestedScreen] = useState11(null);
|
|
5421
|
-
const openNestedScreen = useCallback8((screen2) => {
|
|
5422
|
-
setNestedScreen(screen2);
|
|
5423
|
-
}, []);
|
|
5608
|
+
const selectedChain = allChains.find((chain) => chain.id === selectedChainId);
|
|
5424
5609
|
useEffect12(() => {
|
|
5425
|
-
if (
|
|
5426
|
-
|
|
5610
|
+
if (current === "transfer" && allChains.length && !selectedChain) {
|
|
5611
|
+
nav.back();
|
|
5427
5612
|
}
|
|
5428
|
-
}, [
|
|
5429
|
-
const
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
);
|
|
5613
|
+
}, [current, allChains.length, selectedChain, nav]);
|
|
5614
|
+
const selectChain = (chain) => {
|
|
5615
|
+
logger.info("connect-rn:deposit:chain_selected", {
|
|
5616
|
+
chainId: chain.id,
|
|
5617
|
+
chainName: chain.name
|
|
5618
|
+
});
|
|
5619
|
+
rememberChainId(chain.id);
|
|
5620
|
+
};
|
|
5621
|
+
const rawAddress = generatedAddress ?? config.depositAddress;
|
|
5622
|
+
const displayAddress = rawAddress ? formatDepositAddress(rawAddress) : t("transferCrypto.generating");
|
|
5623
|
+
const copyAddressAndToast = useCopyDepositAddress({
|
|
5624
|
+
copyToClipboard: copyToClipboard2,
|
|
5625
|
+
onCopySuccess,
|
|
5626
|
+
isTransferOpen: current === "transfer",
|
|
5627
|
+
address: rawAddress
|
|
5628
|
+
});
|
|
5629
|
+
const {
|
|
5630
|
+
nestedSheetRef,
|
|
5631
|
+
nestedScreen,
|
|
5632
|
+
setNestedScreen,
|
|
5633
|
+
openNestedScreen,
|
|
5634
|
+
closeNestedScreen,
|
|
5635
|
+
renderNestedBackdrop
|
|
5636
|
+
} = useNestedSheet();
|
|
5637
|
+
const openSwappedFlow = (embeddedFlowUrl) => {
|
|
5638
|
+
setSelectedSwappedUrl(embeddedFlowUrl);
|
|
5639
|
+
nav.navigate("swapped");
|
|
5640
|
+
};
|
|
5641
|
+
const addMoneyMethods = useAddMoneyMethods({
|
|
5642
|
+
allChains,
|
|
5643
|
+
selectedChain,
|
|
5644
|
+
fops,
|
|
5645
|
+
targetAsset,
|
|
5646
|
+
nav,
|
|
5647
|
+
openNestedScreen,
|
|
5648
|
+
openSwappedFlow
|
|
5649
|
+
});
|
|
5444
5650
|
const screen = (() => {
|
|
5445
5651
|
switch (current) {
|
|
5446
5652
|
case "addMoney": {
|
|
5447
|
-
const
|
|
5448
|
-
|
|
5449
|
-
];
|
|
5450
|
-
const cryptoMethod = [
|
|
5451
|
-
{
|
|
5452
|
-
id: CRYPTO_METHOD_ID,
|
|
5453
|
-
title: t("selectMethod.crypto"),
|
|
5454
|
-
subtitle: t("selectMethod.noLimit"),
|
|
5455
|
-
icon: /* @__PURE__ */ jsx28(CryptoBitcoinIcon, {}),
|
|
5456
|
-
trailing: cryptoSourceIcons.length ? /* @__PURE__ */ jsx28(
|
|
5457
|
-
SourceTokenCluster,
|
|
5458
|
-
{
|
|
5459
|
-
icons: cryptoSourceIcons,
|
|
5460
|
-
overflowMode: "plus"
|
|
5461
|
-
}
|
|
5462
|
-
) : void 0
|
|
5463
|
-
}
|
|
5464
|
-
];
|
|
5465
|
-
const toCashRows = (fops) => toFopRows(t, fops, exchangeRates).map((row3, i) => ({
|
|
5466
|
-
id: row3.id,
|
|
5467
|
-
title: row3.name,
|
|
5468
|
-
subtitle: row3.subtitle,
|
|
5469
|
-
icon: /* @__PURE__ */ jsx28(PaymentMethodIcon, { fop: fops[i] })
|
|
5470
|
-
}));
|
|
5471
|
-
const methods = isSwappedEnabled ? [
|
|
5472
|
-
...toCashRows(savedFops),
|
|
5473
|
-
...cryptoMethod,
|
|
5474
|
-
...toCashRows(genericFops)
|
|
5475
|
-
] : cryptoMethod;
|
|
5476
|
-
const candidates = config.dynamicTargetAssetCandidates;
|
|
5477
|
-
const receiveTokens = candidates?.map(
|
|
5478
|
-
(c, i) => ({
|
|
5479
|
-
id: String(i),
|
|
5480
|
-
label: c.badgeText ? `${c.tokenSymbol} (${c.badgeText})` : c.tokenSymbol,
|
|
5481
|
-
icon: /* @__PURE__ */ jsx28(TokenChainIcon, { symbol: c.tokenSymbol, iconSrc: c.iconSrc })
|
|
5482
|
-
})
|
|
5483
|
-
);
|
|
5484
|
-
const selectedReceiveTokenId = selectedCandidate && candidates ? String(candidates.indexOf(selectedCandidate)) : void 0;
|
|
5485
|
-
return /* @__PURE__ */ jsx28(
|
|
5653
|
+
const isLoading = isLoadingGeoCheck || isAddressLoading || isStatsigLoading || isChainListLoading || fops.isSwappedEnabled && fops.isLoading;
|
|
5654
|
+
return /* @__PURE__ */ jsx32(
|
|
5486
5655
|
SelectMethodScreen,
|
|
5487
5656
|
{
|
|
5657
|
+
...addMoneyMethods,
|
|
5488
5658
|
title: t("selectMethod.title"),
|
|
5489
5659
|
errorTitle: t("selectMethod.errorTitle"),
|
|
5490
5660
|
errorMessage: t("selectMethod.errorMessage"),
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
onSelectReceiveToken: (id) => {
|
|
5495
|
-
const picked = candidates?.[Number(id)];
|
|
5496
|
-
if (picked) {
|
|
5497
|
-
setSelectedCandidate(picked);
|
|
5498
|
-
}
|
|
5499
|
-
},
|
|
5500
|
-
loading: isLoadingGeoCheck || isAddressLoading || isStatsigLoading || isChainListLoading || isSwappedEnabled && isFopsLoading,
|
|
5501
|
-
error: isSwappedEnabled && isFopsError,
|
|
5502
|
-
onRetry: refetchFops,
|
|
5503
|
-
onSelectMethod: (id) => {
|
|
5504
|
-
if (id === CRYPTO_METHOD_ID) {
|
|
5505
|
-
nav.navigate("transfer");
|
|
5506
|
-
return;
|
|
5507
|
-
}
|
|
5508
|
-
if (id.includes(":")) {
|
|
5509
|
-
const fop = [...savedFops, ...genericFops].find(
|
|
5510
|
-
(f) => `${f.fopType}:${f.name}` === id
|
|
5511
|
-
);
|
|
5512
|
-
if (fop?.embeddedFlowUrl) {
|
|
5513
|
-
setSelectedSwappedUrl(fop.embeddedFlowUrl);
|
|
5514
|
-
nav.navigate("swapped");
|
|
5515
|
-
}
|
|
5516
|
-
return;
|
|
5517
|
-
}
|
|
5518
|
-
}
|
|
5661
|
+
loading: isLoading,
|
|
5662
|
+
error: fops.isSwappedEnabled && fops.isError,
|
|
5663
|
+
onRetry: fops.refetch
|
|
5519
5664
|
}
|
|
5520
5665
|
);
|
|
5521
5666
|
}
|
|
5522
|
-
case "transfer":
|
|
5523
|
-
|
|
5524
|
-
id: chain.id,
|
|
5525
|
-
label: chain.label,
|
|
5526
|
-
iconKeys: chain.iconKeys ?? []
|
|
5527
|
-
}));
|
|
5528
|
-
return /* @__PURE__ */ jsx28(
|
|
5667
|
+
case "transfer":
|
|
5668
|
+
return selectedChain ? /* @__PURE__ */ jsx32(
|
|
5529
5669
|
TransferCryptoScreen,
|
|
5530
5670
|
{
|
|
5531
5671
|
depositAddress: displayAddress,
|
|
5532
|
-
|
|
5533
|
-
selectedNetworkId: selectedChain?.id ?? networks[0]?.id ?? "",
|
|
5534
|
-
onSelectNetwork: setSelectedNetworkId,
|
|
5535
|
-
supportedTokenIcons: singleChain ? void 0 : availableChains.length ? availableChains.map((c) => c.iconUri) : selectedChain?.iconKeys ?? [],
|
|
5536
|
-
minimumDepositLabel: singleChain?.minLabel,
|
|
5672
|
+
selectedChain,
|
|
5537
5673
|
onBack: nav.back,
|
|
5538
|
-
|
|
5674
|
+
onChangeChain: () => openNestedScreen("changeChain"),
|
|
5539
5675
|
onShowQrCode: () => openNestedScreen("qrCode"),
|
|
5540
5676
|
onCopyAddress: rawAddress ? () => void copyAddressAndToast(rawAddress) : void 0,
|
|
5541
5677
|
onShareAddress: rawAddress ? () => void Share.share({ message: rawAddress }) : void 0
|
|
5542
5678
|
}
|
|
5543
|
-
);
|
|
5544
|
-
}
|
|
5679
|
+
) : null;
|
|
5545
5680
|
case "swapped":
|
|
5546
|
-
return selectedSwappedUrl ? /* @__PURE__ */
|
|
5681
|
+
return selectedSwappedUrl ? /* @__PURE__ */ jsx32(
|
|
5547
5682
|
SwappedScreen,
|
|
5548
5683
|
{
|
|
5549
5684
|
url: selectedSwappedUrl,
|
|
@@ -5555,48 +5690,37 @@ function FlowContent({
|
|
|
5555
5690
|
return null;
|
|
5556
5691
|
}
|
|
5557
5692
|
})();
|
|
5558
|
-
const bottomSheetScreen = (() => {
|
|
5559
|
-
switch (nestedScreen) {
|
|
5560
|
-
case "availableChains":
|
|
5561
|
-
return /* @__PURE__ */ jsx28(
|
|
5562
|
-
AvailableChainsScreen,
|
|
5563
|
-
{
|
|
5564
|
-
networkLabel: selectedChain?.label ?? "",
|
|
5565
|
-
chains: availableChains,
|
|
5566
|
-
onClose: closeNestedScreen
|
|
5567
|
-
}
|
|
5568
|
-
);
|
|
5569
|
-
case "qrCode":
|
|
5570
|
-
return /* @__PURE__ */ jsx28(
|
|
5571
|
-
QrCodeScreen,
|
|
5572
|
-
{
|
|
5573
|
-
qrCode: config.qrCode ?? (qrCodeUri ? /* @__PURE__ */ jsx28(QrCode, { value: qrCodeUri, size: 235 }) : null),
|
|
5574
|
-
centerIcon: /* @__PURE__ */ jsx28(QrChainCluster, { iconKeys: selectedChain?.iconKeys ?? [] }),
|
|
5575
|
-
address: rawAddress,
|
|
5576
|
-
onCopyAddress: rawAddress ? () => copyAddressAndToast(rawAddress) : void 0,
|
|
5577
|
-
onClose: closeNestedScreen
|
|
5578
|
-
}
|
|
5579
|
-
);
|
|
5580
|
-
default:
|
|
5581
|
-
return null;
|
|
5582
|
-
}
|
|
5583
|
-
})();
|
|
5584
5693
|
if (isGeoblocked) {
|
|
5585
|
-
return /* @__PURE__ */
|
|
5694
|
+
return /* @__PURE__ */ jsx32(CheckoutBlockedScreen, {});
|
|
5586
5695
|
}
|
|
5587
|
-
return /* @__PURE__ */
|
|
5696
|
+
return /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
5588
5697
|
screen,
|
|
5589
|
-
/* @__PURE__ */
|
|
5698
|
+
/* @__PURE__ */ jsx32(
|
|
5590
5699
|
BottomSheetModal2,
|
|
5591
5700
|
{
|
|
5592
5701
|
ref: nestedSheetRef,
|
|
5593
5702
|
enableDynamicSizing: true,
|
|
5594
5703
|
topInset: insets.top,
|
|
5595
|
-
handleComponent:
|
|
5704
|
+
handleComponent: null,
|
|
5596
5705
|
backgroundComponent: FlowSheetBackground,
|
|
5597
5706
|
backdropComponent: renderNestedBackdrop,
|
|
5598
5707
|
onDismiss: () => setNestedScreen(null),
|
|
5599
|
-
children: /* @__PURE__ */
|
|
5708
|
+
children: /* @__PURE__ */ jsx32(BottomSheetView2, { children: /* @__PURE__ */ jsx32(
|
|
5709
|
+
DepositNestedSheet,
|
|
5710
|
+
{
|
|
5711
|
+
nestedScreen,
|
|
5712
|
+
allChains,
|
|
5713
|
+
selectedChain,
|
|
5714
|
+
isChainListLoading,
|
|
5715
|
+
selectChain,
|
|
5716
|
+
closeNestedScreen,
|
|
5717
|
+
nav,
|
|
5718
|
+
qrCode: config.qrCode,
|
|
5719
|
+
qrCodeUri,
|
|
5720
|
+
rawAddress,
|
|
5721
|
+
copyAddressAndToast
|
|
5722
|
+
}
|
|
5723
|
+
) })
|
|
5600
5724
|
}
|
|
5601
5725
|
)
|
|
5602
5726
|
] });
|
|
@@ -5612,32 +5736,21 @@ function WithdrawalFlowContent({
|
|
|
5612
5736
|
onCheckoutBlocked: callbacks.onCheckoutBlocked
|
|
5613
5737
|
});
|
|
5614
5738
|
const queryClient = useQueryClient();
|
|
5615
|
-
const {
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
isBelowMinimumBalance,
|
|
5620
|
-
isError,
|
|
5621
|
-
refetch,
|
|
5622
|
-
route
|
|
5623
|
-
} = useWithdrawalFops({ config });
|
|
5624
|
-
const [selectedFop, setSelectedFop] = useState11();
|
|
5625
|
-
const [hasExecutionError, setHasExecutionError] = useState11(false);
|
|
5626
|
-
const onExecutionError = useCallback8(() => setHasExecutionError(true), []);
|
|
5739
|
+
const { fops, isLoading, isBelowMinimumBalance, isError, route } = useWithdrawalFops({ config });
|
|
5740
|
+
const [selectedFop, setSelectedFop] = useState10();
|
|
5741
|
+
const [hasExecutionError, setHasExecutionError] = useState10(false);
|
|
5742
|
+
const onExecutionError = useCallback9(() => setHasExecutionError(true), []);
|
|
5627
5743
|
const { executeOrder } = useWithdrawalExecution({
|
|
5628
5744
|
config,
|
|
5629
5745
|
route,
|
|
5630
5746
|
callbacks,
|
|
5631
5747
|
onError: onExecutionError
|
|
5632
5748
|
});
|
|
5633
|
-
const invalidateWithdrawFops =
|
|
5749
|
+
const invalidateWithdrawFops = useCallback9(() => {
|
|
5634
5750
|
void queryClient.invalidateQueries({ queryKey: [WITHDRAW_FOPS_QUERY_KEY] });
|
|
5635
5751
|
}, [queryClient]);
|
|
5636
|
-
if (isGeoblocked) {
|
|
5637
|
-
return /* @__PURE__ */ jsx28(CheckoutBlockedScreen, {});
|
|
5638
|
-
}
|
|
5639
5752
|
if (hasExecutionError) {
|
|
5640
|
-
return /* @__PURE__ */
|
|
5753
|
+
return /* @__PURE__ */ jsx32(
|
|
5641
5754
|
WithdrawMethodScreen,
|
|
5642
5755
|
{
|
|
5643
5756
|
title: config.title ?? t("withdraw.title"),
|
|
@@ -5654,25 +5767,43 @@ function WithdrawalFlowContent({
|
|
|
5654
5767
|
}
|
|
5655
5768
|
switch (current) {
|
|
5656
5769
|
case "withdrawMethod": {
|
|
5657
|
-
const
|
|
5658
|
-
(
|
|
5770
|
+
const cashMethods = toWithdrawFopRows(t, fops).map(
|
|
5771
|
+
(row2, i) => ({
|
|
5659
5772
|
id: String(i),
|
|
5660
|
-
title:
|
|
5661
|
-
subtitle:
|
|
5662
|
-
icon: /* @__PURE__ */
|
|
5773
|
+
title: row2.name,
|
|
5774
|
+
subtitle: row2.subtitle,
|
|
5775
|
+
icon: /* @__PURE__ */ jsx32(PaymentMethodIcon, { fop: fops[i] })
|
|
5663
5776
|
})
|
|
5664
5777
|
);
|
|
5665
|
-
|
|
5778
|
+
const showCashList = isLoading || cashMethods.length > 0;
|
|
5779
|
+
const methods = [
|
|
5780
|
+
{
|
|
5781
|
+
id: CRYPTO_WITHDRAWAL_METHOD_ID,
|
|
5782
|
+
title: t("withdrawCrypto.methodTitle"),
|
|
5783
|
+
subtitle: t("withdrawCrypto.methodSubtitle"),
|
|
5784
|
+
icon: /* @__PURE__ */ jsx32(CryptoBitcoinIcon, {})
|
|
5785
|
+
},
|
|
5786
|
+
// Below Swapped's minimum sell, cash stays visible but unselectable —
|
|
5787
|
+
// dimming explains more than hiding would.
|
|
5788
|
+
...showCashList ? cashMethods.map((row2) => ({
|
|
5789
|
+
...row2,
|
|
5790
|
+
disabled: isBelowMinimumBalance
|
|
5791
|
+
})) : []
|
|
5792
|
+
];
|
|
5793
|
+
const cashNote = showCashList ? void 0 : isError ? t("withdraw.cashMethodsError") : t("withdraw.noCashMethods");
|
|
5794
|
+
return /* @__PURE__ */ jsx32(
|
|
5666
5795
|
WithdrawMethodScreen,
|
|
5667
5796
|
{
|
|
5668
5797
|
title: config.title ?? t("withdraw.title"),
|
|
5669
5798
|
methods,
|
|
5670
|
-
loading: isLoadingGeoCheck
|
|
5671
|
-
|
|
5672
|
-
onRetry: refetch,
|
|
5673
|
-
isEmpty: noPaymentMethodsAvailable,
|
|
5674
|
-
isBelowMinimum: isBelowMinimumBalance,
|
|
5799
|
+
loading: isLoadingGeoCheck,
|
|
5800
|
+
note: cashNote,
|
|
5675
5801
|
onSelectMethod: (id) => {
|
|
5802
|
+
if (id === CRYPTO_WITHDRAWAL_METHOD_ID) {
|
|
5803
|
+
logger.info("connect-rn:crypto-withdrawal:method_selected");
|
|
5804
|
+
nav.navigate("withdrawCrypto");
|
|
5805
|
+
return;
|
|
5806
|
+
}
|
|
5676
5807
|
const fop = fops[Number(id)];
|
|
5677
5808
|
if (!fop?.embeddedFlowUrl) return;
|
|
5678
5809
|
logger.info("connect-rn:withdrawal:method_selected", {
|
|
@@ -5685,8 +5816,17 @@ function WithdrawalFlowContent({
|
|
|
5685
5816
|
}
|
|
5686
5817
|
);
|
|
5687
5818
|
}
|
|
5819
|
+
case "withdrawCrypto":
|
|
5820
|
+
return /* @__PURE__ */ jsx32(
|
|
5821
|
+
WithdrawCryptoScreen,
|
|
5822
|
+
{
|
|
5823
|
+
title: t("withdrawCrypto.title"),
|
|
5824
|
+
backAccessibilityLabel: t("common.back"),
|
|
5825
|
+
onBack: nav.back
|
|
5826
|
+
}
|
|
5827
|
+
);
|
|
5688
5828
|
case "swapped":
|
|
5689
|
-
return selectedFop?.embeddedFlowUrl ? /* @__PURE__ */
|
|
5829
|
+
return selectedFop?.embeddedFlowUrl ? /* @__PURE__ */ jsx32(
|
|
5690
5830
|
SwappedWithdrawScreen,
|
|
5691
5831
|
{
|
|
5692
5832
|
url: selectedFop.embeddedFlowUrl,
|
|
@@ -5728,7 +5868,7 @@ var TOAST_EXIT_MS = 350;
|
|
|
5728
5868
|
var TOAST_INSET_OFFSET = 20;
|
|
5729
5869
|
var rootContainer = { flex: 1 };
|
|
5730
5870
|
var toastOverlay = {
|
|
5731
|
-
...
|
|
5871
|
+
...StyleSheet11.absoluteFill,
|
|
5732
5872
|
zIndex: 1,
|
|
5733
5873
|
alignItems: "center"
|
|
5734
5874
|
};
|
|
@@ -5739,9 +5879,219 @@ function useFunkitFlow() {
|
|
|
5739
5879
|
}
|
|
5740
5880
|
return value;
|
|
5741
5881
|
}
|
|
5882
|
+
function useAddMoneyMethods({
|
|
5883
|
+
allChains,
|
|
5884
|
+
selectedChain,
|
|
5885
|
+
fops,
|
|
5886
|
+
targetAsset,
|
|
5887
|
+
nav,
|
|
5888
|
+
openNestedScreen,
|
|
5889
|
+
openSwappedFlow
|
|
5890
|
+
}) {
|
|
5891
|
+
const { t } = useFunkitTranslation();
|
|
5892
|
+
const { savedFops, genericFops, isSwappedEnabled } = fops;
|
|
5893
|
+
const { candidates, selectedCandidate, setSelectedCandidate } = targetAsset;
|
|
5894
|
+
const { data: exchangeRates } = useFiatExchangeRates(isSwappedEnabled);
|
|
5895
|
+
const cryptoSourceIcons = allChains.map((c) => c.iconUri);
|
|
5896
|
+
const cryptoMethod = [
|
|
5897
|
+
{
|
|
5898
|
+
id: CRYPTO_METHOD_ID,
|
|
5899
|
+
title: t("selectMethod.crypto"),
|
|
5900
|
+
subtitle: t("selectMethod.noLimit"),
|
|
5901
|
+
icon: /* @__PURE__ */ jsx32(CryptoBitcoinIcon, {}),
|
|
5902
|
+
trailing: cryptoSourceIcons.length ? /* @__PURE__ */ jsx32(SourceTokenCluster, { icons: cryptoSourceIcons, overflowMode: "plus" }) : void 0
|
|
5903
|
+
}
|
|
5904
|
+
];
|
|
5905
|
+
const toCashRows = (fops2) => toFopRows(t, fops2, exchangeRates).map((row2, i) => ({
|
|
5906
|
+
id: row2.id,
|
|
5907
|
+
title: row2.name,
|
|
5908
|
+
subtitle: row2.subtitle,
|
|
5909
|
+
icon: /* @__PURE__ */ jsx32(PaymentMethodIcon, { fop: fops2[i] })
|
|
5910
|
+
}));
|
|
5911
|
+
const methods = isSwappedEnabled ? [...toCashRows(savedFops), ...cryptoMethod, ...toCashRows(genericFops)] : cryptoMethod;
|
|
5912
|
+
const receiveTokens = candidates?.map(
|
|
5913
|
+
(c, i) => ({
|
|
5914
|
+
id: String(i),
|
|
5915
|
+
label: c.badgeText ? `${c.tokenSymbol} (${c.badgeText})` : c.tokenSymbol,
|
|
5916
|
+
icon: /* @__PURE__ */ jsx32(TokenChainIcon, { symbol: c.tokenSymbol, iconSrc: c.iconSrc })
|
|
5917
|
+
})
|
|
5918
|
+
);
|
|
5919
|
+
const selectedReceiveTokenId = selectedCandidate && candidates ? String(candidates.indexOf(selectedCandidate)) : void 0;
|
|
5920
|
+
return {
|
|
5921
|
+
methods,
|
|
5922
|
+
receiveTokens,
|
|
5923
|
+
selectedReceiveTokenId,
|
|
5924
|
+
onSelectReceiveToken: (id) => {
|
|
5925
|
+
const picked = candidates?.[Number(id)];
|
|
5926
|
+
if (picked) {
|
|
5927
|
+
setSelectedCandidate(picked);
|
|
5928
|
+
}
|
|
5929
|
+
},
|
|
5930
|
+
onSelectMethod: (id) => {
|
|
5931
|
+
if (id === CRYPTO_METHOD_ID) {
|
|
5932
|
+
if (selectedChain == null) {
|
|
5933
|
+
openNestedScreen("selectChain");
|
|
5934
|
+
return;
|
|
5935
|
+
}
|
|
5936
|
+
nav.navigate("transfer");
|
|
5937
|
+
return;
|
|
5938
|
+
}
|
|
5939
|
+
if (id.includes(":")) {
|
|
5940
|
+
const fop = [...savedFops, ...genericFops].find(
|
|
5941
|
+
(f) => `${f.fopType}:${f.name}` === id
|
|
5942
|
+
);
|
|
5943
|
+
if (fop?.embeddedFlowUrl) {
|
|
5944
|
+
openSwappedFlow(fop.embeddedFlowUrl);
|
|
5945
|
+
}
|
|
5946
|
+
return;
|
|
5947
|
+
}
|
|
5948
|
+
}
|
|
5949
|
+
};
|
|
5950
|
+
}
|
|
5951
|
+
function DepositNestedSheet({
|
|
5952
|
+
nestedScreen,
|
|
5953
|
+
allChains,
|
|
5954
|
+
selectedChain,
|
|
5955
|
+
isChainListLoading,
|
|
5956
|
+
selectChain,
|
|
5957
|
+
closeNestedScreen,
|
|
5958
|
+
nav,
|
|
5959
|
+
qrCode,
|
|
5960
|
+
qrCodeUri,
|
|
5961
|
+
rawAddress,
|
|
5962
|
+
copyAddressAndToast
|
|
5963
|
+
}) {
|
|
5964
|
+
switch (nestedScreen) {
|
|
5965
|
+
case "selectChain":
|
|
5966
|
+
return /* @__PURE__ */ jsx32(
|
|
5967
|
+
SelectChainScreen,
|
|
5968
|
+
{
|
|
5969
|
+
chains: allChains,
|
|
5970
|
+
selectedChain,
|
|
5971
|
+
loading: isChainListLoading,
|
|
5972
|
+
onBack: closeNestedScreen,
|
|
5973
|
+
onSelectChain: (chain) => {
|
|
5974
|
+
selectChain(chain);
|
|
5975
|
+
closeNestedScreen();
|
|
5976
|
+
nav.navigate("transfer");
|
|
5977
|
+
}
|
|
5978
|
+
}
|
|
5979
|
+
);
|
|
5980
|
+
case "changeChain":
|
|
5981
|
+
return /* @__PURE__ */ jsx32(
|
|
5982
|
+
ChangeChainScreen,
|
|
5983
|
+
{
|
|
5984
|
+
chains: allChains,
|
|
5985
|
+
selectedChain,
|
|
5986
|
+
onCancel: closeNestedScreen,
|
|
5987
|
+
onSelectChain: (chain) => {
|
|
5988
|
+
selectChain(chain);
|
|
5989
|
+
closeNestedScreen();
|
|
5990
|
+
}
|
|
5991
|
+
}
|
|
5992
|
+
);
|
|
5993
|
+
case "qrCode":
|
|
5994
|
+
return /* @__PURE__ */ jsx32(
|
|
5995
|
+
QrCodeScreen,
|
|
5996
|
+
{
|
|
5997
|
+
qrCode: qrCode ?? (qrCodeUri ? /* @__PURE__ */ jsx32(QrCode, { value: qrCodeUri, size: 235 }) : null),
|
|
5998
|
+
centerIcon: /* @__PURE__ */ jsx32(
|
|
5999
|
+
QrChainCluster,
|
|
6000
|
+
{
|
|
6001
|
+
iconKeys: selectedChain ? [selectedChain.iconUri] : []
|
|
6002
|
+
}
|
|
6003
|
+
),
|
|
6004
|
+
address: rawAddress,
|
|
6005
|
+
onCopyAddress: rawAddress ? () => copyAddressAndToast(rawAddress) : void 0,
|
|
6006
|
+
onClose: closeNestedScreen
|
|
6007
|
+
}
|
|
6008
|
+
);
|
|
6009
|
+
default:
|
|
6010
|
+
return null;
|
|
6011
|
+
}
|
|
6012
|
+
}
|
|
6013
|
+
function useNestedSheet() {
|
|
6014
|
+
const nestedSheetRef = useRef9(null);
|
|
6015
|
+
const [nestedScreen, setNestedScreen] = useState10(null);
|
|
6016
|
+
const openNestedScreen = useCallback9((screen) => {
|
|
6017
|
+
setNestedScreen(screen);
|
|
6018
|
+
}, []);
|
|
6019
|
+
useEffect12(() => {
|
|
6020
|
+
if (nestedScreen) {
|
|
6021
|
+
nestedSheetRef.current?.present();
|
|
6022
|
+
}
|
|
6023
|
+
}, [nestedScreen]);
|
|
6024
|
+
const closeNestedScreen = useCallback9(() => {
|
|
6025
|
+
nestedSheetRef.current?.dismiss();
|
|
6026
|
+
}, []);
|
|
6027
|
+
const renderNestedBackdrop = useCallback9(
|
|
6028
|
+
(props) => /* @__PURE__ */ jsx32(
|
|
6029
|
+
BottomSheetBackdrop2,
|
|
6030
|
+
{
|
|
6031
|
+
...props,
|
|
6032
|
+
appearsOnIndex: 0,
|
|
6033
|
+
disappearsOnIndex: -1,
|
|
6034
|
+
pressBehavior: "close"
|
|
6035
|
+
}
|
|
6036
|
+
),
|
|
6037
|
+
[]
|
|
6038
|
+
);
|
|
6039
|
+
return {
|
|
6040
|
+
nestedSheetRef,
|
|
6041
|
+
nestedScreen,
|
|
6042
|
+
setNestedScreen,
|
|
6043
|
+
openNestedScreen,
|
|
6044
|
+
closeNestedScreen,
|
|
6045
|
+
renderNestedBackdrop
|
|
6046
|
+
};
|
|
6047
|
+
}
|
|
6048
|
+
function useDepositTargetAsset(config) {
|
|
6049
|
+
const [selectedCandidate, setSelectedCandidate] = useState10(
|
|
6050
|
+
() => getDefaultDynamicTargetAsset(
|
|
6051
|
+
config.dynamicTargetAssetCandidates,
|
|
6052
|
+
config.dynamicRoutingId
|
|
6053
|
+
)
|
|
6054
|
+
);
|
|
6055
|
+
const activeCheckoutConfig = selectedCandidate ? {
|
|
6056
|
+
...config.checkoutConfig,
|
|
6057
|
+
targetChain: selectedCandidate.tokenChainId,
|
|
6058
|
+
targetAsset: selectedCandidate.tokenAddress
|
|
6059
|
+
} : config.checkoutConfig;
|
|
6060
|
+
const activeDynamicRoutingId = selectedCandidate?.dynamicRoutingId ?? config.dynamicRoutingId;
|
|
6061
|
+
return {
|
|
6062
|
+
candidates: config.dynamicTargetAssetCandidates,
|
|
6063
|
+
selectedCandidate,
|
|
6064
|
+
setSelectedCandidate,
|
|
6065
|
+
activeCheckoutConfig,
|
|
6066
|
+
activeDynamicRoutingId
|
|
6067
|
+
};
|
|
6068
|
+
}
|
|
6069
|
+
function useRememberedChain(userId) {
|
|
6070
|
+
const [selectedChainId, setSelectedChainId] = useState10();
|
|
6071
|
+
useEffect12(() => {
|
|
6072
|
+
let active = true;
|
|
6073
|
+
setSelectedChainId(void 0);
|
|
6074
|
+
void readSelectedChainId(userId).then((storedId) => {
|
|
6075
|
+
if (active && storedId) {
|
|
6076
|
+
setSelectedChainId((current) => current ?? storedId);
|
|
6077
|
+
}
|
|
6078
|
+
});
|
|
6079
|
+
return () => {
|
|
6080
|
+
active = false;
|
|
6081
|
+
};
|
|
6082
|
+
}, [userId]);
|
|
6083
|
+
const rememberChainId = useCallback9(
|
|
6084
|
+
(chainId) => {
|
|
6085
|
+
setSelectedChainId(chainId);
|
|
6086
|
+
void writeSelectedChainId(userId, chainId);
|
|
6087
|
+
},
|
|
6088
|
+
[userId]
|
|
6089
|
+
);
|
|
6090
|
+
return { selectedChainId, rememberChainId };
|
|
6091
|
+
}
|
|
5742
6092
|
|
|
5743
6093
|
// src/version.ts
|
|
5744
|
-
var CONNECT_RN_VERSION = true ? "3.
|
|
6094
|
+
var CONNECT_RN_VERSION = true ? "3.4.0" : "0.0.0-dev";
|
|
5745
6095
|
|
|
5746
6096
|
// src/providers/FunkitStatsigProvider.tsx
|
|
5747
6097
|
import {
|
|
@@ -5785,7 +6135,7 @@ function applyAppStateVisibilityShim() {
|
|
|
5785
6135
|
}
|
|
5786
6136
|
|
|
5787
6137
|
// src/statsig/preloadedAsyncStorage.ts
|
|
5788
|
-
import
|
|
6138
|
+
import AsyncStorage2 from "@react-native-async-storage/async-storage";
|
|
5789
6139
|
import { Log } from "@statsig/react-bindings";
|
|
5790
6140
|
var NOT_READY_ERROR = "Attempting to alter AsyncStorage before it is ready. Values will not be persisted.";
|
|
5791
6141
|
function createPreloadedAsyncStorage() {
|
|
@@ -5820,14 +6170,14 @@ function createPreloadedAsyncStorage() {
|
|
|
5820
6170
|
if (!enforceIsResolved()) {
|
|
5821
6171
|
return;
|
|
5822
6172
|
}
|
|
5823
|
-
|
|
6173
|
+
AsyncStorage2.setItem(key, value).catch(Log.error);
|
|
5824
6174
|
},
|
|
5825
6175
|
removeItem: (key) => {
|
|
5826
6176
|
delete inMemoryStore[key];
|
|
5827
6177
|
if (!enforceIsResolved()) {
|
|
5828
6178
|
return;
|
|
5829
6179
|
}
|
|
5830
|
-
|
|
6180
|
+
AsyncStorage2.removeItem(key).catch(Log.error);
|
|
5831
6181
|
},
|
|
5832
6182
|
getAllKeys: () => {
|
|
5833
6183
|
if (!enforceIsResolved()) {
|
|
@@ -5839,13 +6189,13 @@ function createPreloadedAsyncStorage() {
|
|
|
5839
6189
|
return provider;
|
|
5840
6190
|
}
|
|
5841
6191
|
async function prefetchFromAsyncStorage(inMemoryStore) {
|
|
5842
|
-
const keys = await
|
|
6192
|
+
const keys = await AsyncStorage2.getAllKeys();
|
|
5843
6193
|
await Promise.all(
|
|
5844
6194
|
keys.map(async (key) => {
|
|
5845
6195
|
if (!key.startsWith("statsig.")) {
|
|
5846
6196
|
return;
|
|
5847
6197
|
}
|
|
5848
|
-
const cache = await
|
|
6198
|
+
const cache = await AsyncStorage2.getItem(key);
|
|
5849
6199
|
if (!cache) {
|
|
5850
6200
|
return;
|
|
5851
6201
|
}
|
|
@@ -5934,7 +6284,7 @@ function useClientAsyncInitRN(sdkKey, initialUser, statsigOptions = null) {
|
|
|
5934
6284
|
}
|
|
5935
6285
|
|
|
5936
6286
|
// src/providers/FunkitStatsigProvider.tsx
|
|
5937
|
-
import { jsx as
|
|
6287
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
5938
6288
|
var STATSIG_API = "https://data-api.fun.xyz/v1";
|
|
5939
6289
|
var STATSIG_CLIENT_KEY = "client-UmFd8WIJljA7cLmZuDqs3X25M8sKd5WIQP4BSC2bRbM";
|
|
5940
6290
|
var STATSIG_SDK_TYPE = "react-native";
|
|
@@ -5970,11 +6320,11 @@ function FunkitStatsigProvider({
|
|
|
5970
6320
|
tier: isDevelopment ? "development" : "production"
|
|
5971
6321
|
}
|
|
5972
6322
|
});
|
|
5973
|
-
return /* @__PURE__ */
|
|
6323
|
+
return /* @__PURE__ */ jsx33(StatsigProvider, { client, children });
|
|
5974
6324
|
}
|
|
5975
6325
|
|
|
5976
6326
|
// src/providers/FunkitProvider.tsx
|
|
5977
|
-
import { jsx as
|
|
6327
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
5978
6328
|
var ANONYMOUS_CONFIG = { apiKey: "" };
|
|
5979
6329
|
var IS_DEV_BUILD = typeof __DEV__ !== "undefined" && !!__DEV__;
|
|
5980
6330
|
function createFallbackQueryClient() {
|
|
@@ -5997,7 +6347,7 @@ function FunkitProvider({
|
|
|
5997
6347
|
locale,
|
|
5998
6348
|
copyToClipboard: copyToClipboard2
|
|
5999
6349
|
}) {
|
|
6000
|
-
const fallbackClient =
|
|
6350
|
+
const fallbackClient = useRef10(void 0);
|
|
6001
6351
|
fallbackClient.current ??= createFallbackQueryClient();
|
|
6002
6352
|
const client = queryClient ?? fallbackClient.current;
|
|
6003
6353
|
const identity = useMemo12(
|
|
@@ -6019,26 +6369,26 @@ function FunkitProvider({
|
|
|
6019
6369
|
""
|
|
6020
6370
|
);
|
|
6021
6371
|
}, [identity]);
|
|
6022
|
-
return /* @__PURE__ */
|
|
6372
|
+
return /* @__PURE__ */ jsx34(SafeAreaProvider, { children: /* @__PURE__ */ jsx34(
|
|
6023
6373
|
FunkitStatsigProvider,
|
|
6024
6374
|
{
|
|
6025
6375
|
apiKey: identity.apiKey,
|
|
6026
6376
|
userId: identity.userId,
|
|
6027
6377
|
isDevelopment: debug,
|
|
6028
|
-
children: /* @__PURE__ */
|
|
6378
|
+
children: /* @__PURE__ */ jsx34(QueryClientProvider, { client, children: /* @__PURE__ */ jsx34(FunkitIdentityProvider, { identity, children: /* @__PURE__ */ jsx34(FunkitThemeProvider, { themes, colorScheme, children: /* @__PURE__ */ jsx34(FunkitI18nProvider, { locale, children: /* @__PURE__ */ jsx34(FunkitFlowProvider, { copyToClipboard: copyToClipboard2, children }) }) }) }) })
|
|
6029
6379
|
}
|
|
6030
6380
|
) });
|
|
6031
6381
|
}
|
|
6032
6382
|
|
|
6033
6383
|
// src/providers/useFunkitCheckout.ts
|
|
6034
|
-
import { useCallback as
|
|
6384
|
+
import { useCallback as useCallback10 } from "react";
|
|
6035
6385
|
function useFunkitCheckout(callbacks = {}) {
|
|
6036
6386
|
const { beginDeposit: openDepositFlow, beginWithdrawal: openWithdrawalFlow } = useFunkitFlow();
|
|
6037
|
-
const beginDeposit =
|
|
6387
|
+
const beginDeposit = useCallback10(
|
|
6038
6388
|
(config) => openDepositFlow(config, callbacks),
|
|
6039
6389
|
[openDepositFlow, callbacks]
|
|
6040
6390
|
);
|
|
6041
|
-
const beginWithdrawal =
|
|
6391
|
+
const beginWithdrawal = useCallback10(
|
|
6042
6392
|
(config) => openWithdrawalFlow(config, callbacks),
|
|
6043
6393
|
[openWithdrawalFlow, callbacks]
|
|
6044
6394
|
);
|