@funkit/connect 5.5.0 → 5.5.1
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 +17 -0
- package/dist/components/Dropdown/ReceiveTokenDropdown.d.ts +2 -1
- package/dist/components/MeldQuoteItem/MeldQuoteItem.d.ts +1 -1
- package/dist/components/SourceMeldQuoteItem/SourceMeldQuoteItem.d.ts +2 -1
- package/dist/components/Tabs/Tabs.d.ts +2 -2
- package/dist/components/Tabs/tabs.css.d.ts +1 -0
- package/dist/components/VirtualFiatAccount/AccountDetailsTab/AccountDetailsTab.d.ts +9 -0
- package/dist/domains/clientMetadata.d.ts +1 -1
- package/dist/domains/fees.d.ts +1 -1
- package/dist/domains/quote.d.ts +1 -1
- package/dist/hooks/queries/useMeldLimits.d.ts +6 -1
- package/dist/hooks/useAnimatedNavigation.d.ts +1 -1
- package/dist/hooks/useCheckoutDirectExecution.d.ts +2 -1
- package/dist/index.css +10 -1
- package/dist/index.js +788 -701
- package/dist/modals/CheckoutModal/useNewCheckoutQuote.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext.d.ts +2 -1
- package/dist/providers/FunkitConfigContext.d.ts +2 -0
- package/dist/utils/checkout.d.ts +2 -1
- package/dist/utils/flags/config.d.ts +12 -0
- package/dist/utils/purifyCheckoutHistoryItem.d.ts +2 -1
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +63 -63
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
darkTheme
|
|
4
|
-
} from "./chunk-ICCAQZHZ.js";
|
|
5
2
|
import {
|
|
6
3
|
lightTheme
|
|
7
4
|
} from "./chunk-RN4I4Y57.js";
|
|
5
|
+
import {
|
|
6
|
+
darkTheme
|
|
7
|
+
} from "./chunk-ICCAQZHZ.js";
|
|
8
8
|
import {
|
|
9
9
|
systemFontStack
|
|
10
10
|
} from "./chunk-R2UFCJL7.js";
|
|
@@ -400,7 +400,7 @@ function Avatar({ address, imageUrl, loading, size }) {
|
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
// src/components/ConnectButton/ConnectButton.tsx
|
|
403
|
-
import
|
|
403
|
+
import React258, { useEffect as useEffect50, useState as useState70 } from "react";
|
|
404
404
|
|
|
405
405
|
// src/css/touchableStyles.css.ts
|
|
406
406
|
var active = { shrink: "_7rkubb8", shrinkSm: "_7rkubb9" };
|
|
@@ -504,7 +504,7 @@ import PrivyJS, {
|
|
|
504
504
|
getUserEmbeddedWallet,
|
|
505
505
|
LocalStorage
|
|
506
506
|
} from "@privy-io/js-sdk-core";
|
|
507
|
-
import
|
|
507
|
+
import React255, {
|
|
508
508
|
createContext as createContext18,
|
|
509
509
|
useCallback as useCallback47,
|
|
510
510
|
useContext as useContext18,
|
|
@@ -744,6 +744,9 @@ var DEFAULT_TEXT_CUSTOMIZATIONS = {
|
|
|
744
744
|
sourceMethodTitle: "Your source",
|
|
745
745
|
tokensListTitle: "Your tokens",
|
|
746
746
|
transferTokens: "Transfer Crypto",
|
|
747
|
+
receiveDropdownTitle: "",
|
|
748
|
+
// Default to empty
|
|
749
|
+
receiveDropdownLabel: "Asset to Receive",
|
|
747
750
|
confirmationScreen: {
|
|
748
751
|
payAmountLabel: "You send",
|
|
749
752
|
receiveAmountLabel: "You receive"
|
|
@@ -1023,7 +1026,7 @@ var useFunkitConnectChainsById = () => groupChainsById(useFunkitConnectChains())
|
|
|
1023
1026
|
var useInitialChainId = () => useContext4(FunkitConnectChainContext).initialChainId;
|
|
1024
1027
|
|
|
1025
1028
|
// src/providers/ModalContext.tsx
|
|
1026
|
-
import
|
|
1029
|
+
import React254, {
|
|
1027
1030
|
createContext as createContext17,
|
|
1028
1031
|
useCallback as useCallback46,
|
|
1029
1032
|
useContext as useContext17,
|
|
@@ -1046,7 +1049,7 @@ var topbarFadeWrapper = "_1r8f578";
|
|
|
1046
1049
|
var topbarOverflowContent = "_1r8f577 _1rsrm2fd1 _1rsrm2fds";
|
|
1047
1050
|
|
|
1048
1051
|
// src/modals/AccountModal/AccountModal.tsx
|
|
1049
|
-
import
|
|
1052
|
+
import React238 from "react";
|
|
1050
1053
|
|
|
1051
1054
|
// src/components/Dialog/Dialog.tsx
|
|
1052
1055
|
import { isMobile as isMobile2, isSafari } from "@funkit/utils";
|
|
@@ -3207,6 +3210,8 @@ var flagConfig = {
|
|
|
3207
3210
|
"0x2A8Bd916E85d98d8175258De99fc0ddbcC102eF6",
|
|
3208
3211
|
"0xda6b07Eb94f699F511a943e9bFC12B64B7fe3486",
|
|
3209
3212
|
"0x0D6e43CA32545B3dc2FE6f93AafBD7e640F548d4",
|
|
3213
|
+
"0x236c60C57a8B9ca563Fb0dA5199FDdCB686d91E8",
|
|
3214
|
+
// greg
|
|
3210
3215
|
"0x70126A66Ea0f76220Af513365Fea7Db89191aF85",
|
|
3211
3216
|
// issa PM
|
|
3212
3217
|
"0x8723E50B5d47714F599Ba02Ee3Db4F5aaF61f9Ad",
|
|
@@ -3228,6 +3233,18 @@ var flagConfig = {
|
|
|
3228
3233
|
values: [DEV_API_KEY2]
|
|
3229
3234
|
}
|
|
3230
3235
|
],
|
|
3236
|
+
if_all: [
|
|
3237
|
+
{
|
|
3238
|
+
key: "userId",
|
|
3239
|
+
type: "pctRollout",
|
|
3240
|
+
pct: 10
|
|
3241
|
+
},
|
|
3242
|
+
{
|
|
3243
|
+
key: "apiKey",
|
|
3244
|
+
type: "isAnyOf",
|
|
3245
|
+
values: [POLYMARKET_API_KEY2]
|
|
3246
|
+
}
|
|
3247
|
+
],
|
|
3231
3248
|
value: true
|
|
3232
3249
|
}
|
|
3233
3250
|
]
|
|
@@ -3859,9 +3876,7 @@ import {
|
|
|
3859
3876
|
import { polygon as polygon2 } from "viem/chains";
|
|
3860
3877
|
|
|
3861
3878
|
// src/hooks/useCheckoutDirectExecution.ts
|
|
3862
|
-
import {
|
|
3863
|
-
DirectExecutionType
|
|
3864
|
-
} from "@funkit/api-base";
|
|
3879
|
+
import { DirectExecutionType } from "@funkit/api-base";
|
|
3865
3880
|
import { executeRelayQuote, getRelayQuote } from "@funkit/fun-relay";
|
|
3866
3881
|
import { isTokenEquivalent } from "@funkit/utils";
|
|
3867
3882
|
import { useCallback as useCallback4 } from "react";
|
|
@@ -6514,10 +6529,10 @@ var useActivityTraversal = () => {
|
|
|
6514
6529
|
};
|
|
6515
6530
|
|
|
6516
6531
|
// src/modals/ProfileDetails/ProfileDetails.tsx
|
|
6517
|
-
import
|
|
6532
|
+
import React237, { useCallback as useCallback43, useState as useState63 } from "react";
|
|
6518
6533
|
|
|
6519
6534
|
// src/components/FunCheckoutHistory/FunCheckoutHistoryContent.tsx
|
|
6520
|
-
import
|
|
6535
|
+
import React226 from "react";
|
|
6521
6536
|
|
|
6522
6537
|
// src/hooks/useDirectExecutionInfoPolling.ts
|
|
6523
6538
|
import {
|
|
@@ -6957,7 +6972,7 @@ function getCheckoutCompletionTime(checkout) {
|
|
|
6957
6972
|
}
|
|
6958
6973
|
|
|
6959
6974
|
// src/components/FunCheckoutHistory/FunCheckoutHistoryDetail.tsx
|
|
6960
|
-
import
|
|
6975
|
+
import React220, { useCallback as useCallback40, useMemo as useMemo39, useState as useState57 } from "react";
|
|
6961
6976
|
import { createPortal as createPortal14 } from "react-dom";
|
|
6962
6977
|
|
|
6963
6978
|
// src/components/HelpAlert/HelpAlert.tsx
|
|
@@ -7834,7 +7849,7 @@ import {
|
|
|
7834
7849
|
formatSecondsToReadableForm as formatSecondsToReadableForm4,
|
|
7835
7850
|
formatTimestamp
|
|
7836
7851
|
} from "@funkit/utils";
|
|
7837
|
-
import
|
|
7852
|
+
import React218, { useState as useState56, useRef as useRef18 } from "react";
|
|
7838
7853
|
|
|
7839
7854
|
// src/components/FunSkeletonLoader/FunSkeletonBlock.tsx
|
|
7840
7855
|
import React66 from "react";
|
|
@@ -8261,10 +8276,10 @@ var TransactionRedirectButton = ({
|
|
|
8261
8276
|
|
|
8262
8277
|
// src/components/FunTransactionSummary/PaymentRouteSummary.tsx
|
|
8263
8278
|
import { formatAddress as formatAddress5 } from "@funkit/utils";
|
|
8264
|
-
import
|
|
8279
|
+
import React217 from "react";
|
|
8265
8280
|
|
|
8266
8281
|
// src/hooks/usePaymentMethodIcon.tsx
|
|
8267
|
-
import
|
|
8282
|
+
import React216 from "react";
|
|
8268
8283
|
import { useAccount as useAccount5 } from "wagmi";
|
|
8269
8284
|
|
|
8270
8285
|
// src/components/FunPayments/FunPaymentMethods.tsx
|
|
@@ -10617,7 +10632,7 @@ var BankIconActive = ({ size = 20 }) => {
|
|
|
10617
10632
|
|
|
10618
10633
|
// src/components/FunConnectOptions/FunSignInStep.tsx
|
|
10619
10634
|
import { groupBy, isMobile as isMobile8, isSafari as isSafari3, redirectInMobile as redirectInMobile2 } from "@funkit/utils";
|
|
10620
|
-
import
|
|
10635
|
+
import React213, { Fragment as Fragment3, useCallback as useCallback39, useMemo as useMemo37, useState as useState55 } from "react";
|
|
10621
10636
|
|
|
10622
10637
|
// src/providers/walletConnectDeepLink.ts
|
|
10623
10638
|
var storageKey2 = "WALLETCONNECT_DEEPLINK_CHOICE";
|
|
@@ -11214,7 +11229,7 @@ var SocialsIcon = () => {
|
|
|
11214
11229
|
};
|
|
11215
11230
|
|
|
11216
11231
|
// src/components/FunConnectOptions/FunConnectOptions.tsx
|
|
11217
|
-
import
|
|
11232
|
+
import React212, { useCallback as useCallback38, useMemo as useMemo36, useState as useState54 } from "react";
|
|
11218
11233
|
|
|
11219
11234
|
// src/hooks/useAnimatedNavigation.ts
|
|
11220
11235
|
import { useCallback as useCallback16, useState as useState17 } from "react";
|
|
@@ -11275,8 +11290,8 @@ function useAnimatedNavigation(callback) {
|
|
|
11275
11290
|
}
|
|
11276
11291
|
|
|
11277
11292
|
// src/components/FunCheckoutModalHeightAnimationWrapper/FunCheckoutModalHeightAnimationWrapper.tsx
|
|
11278
|
-
import { motion as
|
|
11279
|
-
import
|
|
11293
|
+
import { motion as motion10 } from "motion/react";
|
|
11294
|
+
import React205, { useEffect as useEffect39, useRef as useRef17, useState as useState52 } from "react";
|
|
11280
11295
|
|
|
11281
11296
|
// src/modals/CheckoutModal/stepTransition.ts
|
|
11282
11297
|
import {
|
|
@@ -11373,9 +11388,7 @@ function generateQuoteApiErrorForDisplay(err) {
|
|
|
11373
11388
|
}
|
|
11374
11389
|
|
|
11375
11390
|
// src/domains/quote.ts
|
|
11376
|
-
import {
|
|
11377
|
-
getCheckoutQuote as getApiCheckoutQuote
|
|
11378
|
-
} from "@funkit/api-base";
|
|
11391
|
+
import { getCheckoutQuote as getApiCheckoutQuote } from "@funkit/api-base";
|
|
11379
11392
|
|
|
11380
11393
|
// src/domains/fees.ts
|
|
11381
11394
|
import {
|
|
@@ -11385,7 +11398,9 @@ import {
|
|
|
11385
11398
|
meshConfigureTransferProxy
|
|
11386
11399
|
} from "@funkit/api-base";
|
|
11387
11400
|
import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO13 } from "@funkit/chains";
|
|
11388
|
-
import {
|
|
11401
|
+
import {
|
|
11402
|
+
roundUpToXDecimalPlaces as roundUpToXDecimalPlaces2
|
|
11403
|
+
} from "@funkit/utils";
|
|
11389
11404
|
import { estimateGas, getGasPrice } from "@wagmi/core";
|
|
11390
11405
|
import { encodeFunctionData, erc20Abi as erc20Abi2, formatEther } from "viem";
|
|
11391
11406
|
import { zkSync } from "viem/zksync";
|
|
@@ -15892,7 +15907,7 @@ function ConfirmationStep({
|
|
|
15892
15907
|
const isStepLoading = isInitialQuoting || isContinuing || isRefreshing;
|
|
15893
15908
|
const uiCustomizations = funkitConfig.uiCustomizations?.confirmationScreen;
|
|
15894
15909
|
const customRecipient = checkoutItem?.initSettings.config.customRecipient;
|
|
15895
|
-
return /* @__PURE__ */ React132.createElement(Box,
|
|
15910
|
+
return /* @__PURE__ */ React132.createElement(Box, { id: "confirmation-page" }, /* @__PURE__ */ React132.createElement(
|
|
15896
15911
|
Box,
|
|
15897
15912
|
{
|
|
15898
15913
|
display: "flex",
|
|
@@ -16339,11 +16354,10 @@ import React141 from "react";
|
|
|
16339
16354
|
// src/consts/meld.ts
|
|
16340
16355
|
var getMeldProviderIconUrl = (provider) => `https://sdk-cdn.fun.xyz/images/meld/${provider.toLowerCase()}.svg`;
|
|
16341
16356
|
var getCurrencySymbol = (currencyCode) => {
|
|
16342
|
-
const formatter = new Intl.NumberFormat(
|
|
16357
|
+
const formatter = new Intl.NumberFormat("en-US", {
|
|
16343
16358
|
style: "currency",
|
|
16344
16359
|
currency: currencyCode,
|
|
16345
|
-
|
|
16346
|
-
maximumFractionDigits: 0
|
|
16360
|
+
currencyDisplay: "narrowSymbol"
|
|
16347
16361
|
});
|
|
16348
16362
|
return formatter.formatToParts(1).find(({ type }) => type === "currency")?.value ?? currencyCode;
|
|
16349
16363
|
};
|
|
@@ -16352,8 +16366,32 @@ var getCurrencySymbol = (currencyCode) => {
|
|
|
16352
16366
|
var providerLabelMap = {
|
|
16353
16367
|
COINBASEPAY: "Coinbase Pay",
|
|
16354
16368
|
STRIPE: "Stripe",
|
|
16355
|
-
TOPPER: "Topper"
|
|
16356
|
-
|
|
16369
|
+
TOPPER: "Topper",
|
|
16370
|
+
PAYPAL: "PayPal",
|
|
16371
|
+
ALCHEMYPAY: "Alchemy Pay",
|
|
16372
|
+
UNLIMIT: "Unlimit",
|
|
16373
|
+
BANXA: "Banxa",
|
|
16374
|
+
BILIRA: "BiLira",
|
|
16375
|
+
BINANCECONNECT: "Binance Connect",
|
|
16376
|
+
BLOCKCHAINDOTCOM: "Blockchain.com",
|
|
16377
|
+
BTCDIRECT: "BTC Direct",
|
|
16378
|
+
FONBNK: "Fonbnk",
|
|
16379
|
+
GUARDARIAN: "Guardarian",
|
|
16380
|
+
KOYWE: "Koywe",
|
|
16381
|
+
MESH: "Mesh",
|
|
16382
|
+
MESO: "Meso",
|
|
16383
|
+
ONMETA: "Onmeta",
|
|
16384
|
+
ONRAMPMONEY: "Onramp Money",
|
|
16385
|
+
PAYBIS: "Paybis",
|
|
16386
|
+
RAMP: "Ramp",
|
|
16387
|
+
ROBINHOOD: "Robinhood",
|
|
16388
|
+
SARDINE: "Sardine",
|
|
16389
|
+
SHIFT4: "Shift4",
|
|
16390
|
+
SIMPLEX: "Simplex",
|
|
16391
|
+
SKRILLCRYPTO: "Skrill",
|
|
16392
|
+
TRANSAK: "Transak",
|
|
16393
|
+
TRANSFI: "TransFi",
|
|
16394
|
+
YELLOWCARD: "Yellow Card"
|
|
16357
16395
|
};
|
|
16358
16396
|
var MeldQuoteItem = ({
|
|
16359
16397
|
quote,
|
|
@@ -16405,7 +16443,7 @@ var MeldQuoteItem = ({
|
|
|
16405
16443
|
alt: quote.serviceProvider,
|
|
16406
16444
|
borderRadius: "full"
|
|
16407
16445
|
}
|
|
16408
|
-
)), /* @__PURE__ */ React141.createElement(Text, { weight: "medium", size: "12", style: { whiteSpace: "nowrap" } }, providerLabelMap[quote.serviceProvider]), badge && /* @__PURE__ */ React141.createElement(
|
|
16446
|
+
)), /* @__PURE__ */ React141.createElement(Text, { weight: "medium", size: "12", style: { whiteSpace: "nowrap" } }, providerLabelMap[quote.serviceProvider] ?? quote.serviceProvider), badge && /* @__PURE__ */ React141.createElement(
|
|
16409
16447
|
FunBadge,
|
|
16410
16448
|
{
|
|
16411
16449
|
background: "approvedBadgeBackground",
|
|
@@ -16435,7 +16473,8 @@ var SourceMeldQuoteItem = ({
|
|
|
16435
16473
|
isLoading,
|
|
16436
16474
|
isBestQuote,
|
|
16437
16475
|
isPreselected,
|
|
16438
|
-
disabled
|
|
16476
|
+
disabled,
|
|
16477
|
+
error
|
|
16439
16478
|
}) => {
|
|
16440
16479
|
return /* @__PURE__ */ React142.createElement(
|
|
16441
16480
|
FunOptionBox,
|
|
@@ -16451,7 +16490,7 @@ var SourceMeldQuoteItem = ({
|
|
|
16451
16490
|
disabled: disabled || isLoading || !quote
|
|
16452
16491
|
},
|
|
16453
16492
|
/* @__PURE__ */ React142.createElement(Box, { display: "flex", flexDirection: "column", gap: "4" }, /* @__PURE__ */ React142.createElement(Text, { size: "12", weight: "medium" }, "Provider"), isPreselected && /* @__PURE__ */ React142.createElement(Text, { color: "secondaryText", size: "12", weight: "medium" }, "Best rate auto-picked")),
|
|
16454
|
-
/* @__PURE__ */ React142.createElement(Box, { display: "flex", alignItems: "center", gap: "12" }, /* @__PURE__ */ React142.createElement(Box, { display: "flex", alignItems: "center", gap: "6" }, isLoading ? /* @__PURE__ */ React142.createElement(React142.Fragment, null, /* @__PURE__ */ React142.createElement(FunSkeletonCircle, { size: "32" }), /* @__PURE__ */ React142.createElement(FunSkeletonBlock, { width: "36", height: "14" })) : quote ? /* @__PURE__ */ React142.createElement(React142.Fragment, null, /* @__PURE__ */ React142.createElement(
|
|
16493
|
+
/* @__PURE__ */ React142.createElement(Box, { display: "flex", alignItems: "center", gap: "12" }, /* @__PURE__ */ React142.createElement(Box, { display: "flex", alignItems: "center", gap: "6" }, error ? /* @__PURE__ */ React142.createElement(Text, { size: "12", color: "secondaryText", weight: "medium" }, error) : isLoading ? /* @__PURE__ */ React142.createElement(React142.Fragment, null, /* @__PURE__ */ React142.createElement(FunSkeletonCircle, { size: "32" }), /* @__PURE__ */ React142.createElement(FunSkeletonBlock, { width: "36", height: "14" })) : quote ? /* @__PURE__ */ React142.createElement(React142.Fragment, null, /* @__PURE__ */ React142.createElement(
|
|
16455
16494
|
AsyncImage,
|
|
16456
16495
|
{
|
|
16457
16496
|
width: "32",
|
|
@@ -17276,24 +17315,38 @@ var useMeldLimitError = (amount, fiatCurrency) => {
|
|
|
17276
17315
|
() => data?.find((lim) => lim.currencyCode === fiatCurrency),
|
|
17277
17316
|
[data, fiatCurrency]
|
|
17278
17317
|
);
|
|
17279
|
-
if (!meldLimit) return
|
|
17318
|
+
if (!meldLimit) return void 0;
|
|
17280
17319
|
if (amount < meldLimit.minimumAmount) {
|
|
17281
17320
|
const limit = formatCurrencyAndStringify6(
|
|
17282
17321
|
meldLimit.minimumAmount ?? 0,
|
|
17283
17322
|
{},
|
|
17284
|
-
{
|
|
17323
|
+
{
|
|
17324
|
+
currency: fiatCurrency,
|
|
17325
|
+
currencyDisplay: "narrowSymbol",
|
|
17326
|
+
minimumFractionDigits: 0
|
|
17327
|
+
}
|
|
17285
17328
|
);
|
|
17286
|
-
return
|
|
17329
|
+
return {
|
|
17330
|
+
issue: "Amount below minimum",
|
|
17331
|
+
suggestion: `Input an amount greater than ${limit}.`
|
|
17332
|
+
};
|
|
17287
17333
|
}
|
|
17288
17334
|
if (amount > meldLimit.maximumAmount) {
|
|
17289
17335
|
const limit = formatCurrencyAndStringify6(
|
|
17290
17336
|
meldLimit.maximumAmount ?? 0,
|
|
17291
17337
|
{},
|
|
17292
|
-
{
|
|
17338
|
+
{
|
|
17339
|
+
currency: fiatCurrency,
|
|
17340
|
+
currencyDisplay: "narrowSymbol",
|
|
17341
|
+
minimumFractionDigits: 0
|
|
17342
|
+
}
|
|
17293
17343
|
);
|
|
17294
|
-
return
|
|
17344
|
+
return {
|
|
17345
|
+
issue: "Amount above maximum",
|
|
17346
|
+
suggestion: `Input an amount lower than ${limit}.`
|
|
17347
|
+
};
|
|
17295
17348
|
}
|
|
17296
|
-
return
|
|
17349
|
+
return void 0;
|
|
17297
17350
|
};
|
|
17298
17351
|
|
|
17299
17352
|
// src/components/Icons/SwitchIcon.tsx
|
|
@@ -17363,7 +17416,12 @@ var useMeldLink = (sourceAmount, sourceCurrencyCode = "USD") => {
|
|
|
17363
17416
|
const { apiKey } = useFunkitConfig();
|
|
17364
17417
|
const { userIpInfo } = useFunkitUserIp();
|
|
17365
17418
|
const destinationCurrencyCode = useMeldCryptoCurrencyCode();
|
|
17419
|
+
const { checkoutItem } = useCheckoutContext();
|
|
17366
17420
|
const { walletAddress } = useGeneralWallet();
|
|
17421
|
+
const recipient = checkoutItem?.initSettings.config.customRecipient || walletAddress;
|
|
17422
|
+
if (!recipient) {
|
|
17423
|
+
throw new Error("Recipient is required for Meld link");
|
|
17424
|
+
}
|
|
17367
17425
|
const mutation = useMutation({
|
|
17368
17426
|
mutationFn: (serviceProvider) => startMeldSession({
|
|
17369
17427
|
apiKey,
|
|
@@ -17372,7 +17430,7 @@ var useMeldLink = (sourceAmount, sourceCurrencyCode = "USD") => {
|
|
|
17372
17430
|
countryCode: userIpInfo?.alpha2 ?? "",
|
|
17373
17431
|
destinationCurrencyCode,
|
|
17374
17432
|
sourceCurrencyCode,
|
|
17375
|
-
walletAddress,
|
|
17433
|
+
walletAddress: recipient,
|
|
17376
17434
|
sourceAmount: `${sourceAmount}`
|
|
17377
17435
|
}
|
|
17378
17436
|
})
|
|
@@ -17607,7 +17665,11 @@ var QuickOptions = ({
|
|
|
17607
17665
|
!percentMode ? formatCurrencyAndStringify7(
|
|
17608
17666
|
option,
|
|
17609
17667
|
{},
|
|
17610
|
-
{
|
|
17668
|
+
{
|
|
17669
|
+
minimumFractionDigits: 0,
|
|
17670
|
+
currency,
|
|
17671
|
+
currencyDisplay: "narrowSymbol"
|
|
17672
|
+
}
|
|
17611
17673
|
) : option === 100 ? "Max" : `${option}%`
|
|
17612
17674
|
));
|
|
17613
17675
|
};
|
|
@@ -17698,14 +17760,9 @@ function reduceState(state, action) {
|
|
|
17698
17760
|
case "setInputValue": {
|
|
17699
17761
|
const { inputValue: rawInputValue, unitPrice, fiatCurrency } = action;
|
|
17700
17762
|
const currencySymbol = getCurrencySymbol(fiatCurrency);
|
|
17701
|
-
const
|
|
17702
|
-
const
|
|
17703
|
-
const
|
|
17704
|
-
`^${state.isInputInUsd ? `(${escapedPrefix})?` : ""}(\\d*(\\.\\d{0,${decimals}})?)`
|
|
17705
|
-
);
|
|
17706
|
-
const match = rawInputValue.match(regex);
|
|
17707
|
-
if (!match) return state;
|
|
17708
|
-
const numericInputValue = state.isInputInUsd ? match[2] : match[1];
|
|
17763
|
+
const regex = state.isInputInUsd ? /\d+(\.\d{0,2})?/ : /\d+(\.\d{0,5})?/;
|
|
17764
|
+
const match = regex.exec(rawInputValue);
|
|
17765
|
+
const numericInputValue = match?.[0] || "";
|
|
17709
17766
|
const newInputValue = numericInputValue && state.isInputInUsd ? `${currencySymbol}${numericInputValue}` : numericInputValue;
|
|
17710
17767
|
if (newInputValue === state.inputValue) return state;
|
|
17711
17768
|
const newInputAmount = Number.parseFloat(numericInputValue) || 0;
|
|
@@ -17842,7 +17899,11 @@ function useAmountInput(options) {
|
|
|
17842
17899
|
onChange,
|
|
17843
17900
|
toggleInputInUsd,
|
|
17844
17901
|
setUsdAmount,
|
|
17845
|
-
placeholder: state.isInputInUsd ? formatCurrencyAndStringify8(
|
|
17902
|
+
placeholder: state.isInputInUsd ? formatCurrencyAndStringify8(
|
|
17903
|
+
0,
|
|
17904
|
+
{},
|
|
17905
|
+
{ currency: fiatCurrency, currencyDisplay: "narrowSymbol" }
|
|
17906
|
+
) : formatCryptoAndStringify3(0),
|
|
17846
17907
|
suggestion: getInputAmountSuggestion(derivedState.inputError)
|
|
17847
17908
|
};
|
|
17848
17909
|
}
|
|
@@ -17932,8 +17993,8 @@ function InputAmountLoaded({
|
|
|
17932
17993
|
}
|
|
17933
17994
|
if (meldLimitError) {
|
|
17934
17995
|
return {
|
|
17935
|
-
message: meldLimitError,
|
|
17936
|
-
type: "
|
|
17996
|
+
message: meldLimitError.suggestion,
|
|
17997
|
+
type: "hint"
|
|
17937
17998
|
};
|
|
17938
17999
|
}
|
|
17939
18000
|
if (meldQuotesQuery.error) {
|
|
@@ -17994,7 +18055,7 @@ function InputAmountLoaded({
|
|
|
17994
18055
|
actionButtonProps: {
|
|
17995
18056
|
title: suggestion?.buttonLabel ?? "Continue",
|
|
17996
18057
|
onClick: handleSubmit,
|
|
17997
|
-
isDisabled: !isValid && !suggestion || error?.type === "error" || isMeldLinkPending || meldQuotesQuery.isFetching || isCardCheckout && isSelectedQuoteUnavailable,
|
|
18058
|
+
isDisabled: !isValid && !suggestion || error?.type === "error" || !!meldLimitError || isMeldLinkPending || meldQuotesQuery.isFetching || isCardCheckout && isSelectedQuoteUnavailable,
|
|
17998
18059
|
isLoading: isMeldLinkPending
|
|
17999
18060
|
},
|
|
18000
18061
|
fiatCurrencySelector: meldEnabled && /* @__PURE__ */ React150.createElement(
|
|
@@ -18104,7 +18165,8 @@ function InputAmountLoaded({
|
|
|
18104
18165
|
isLoading: meldQuotesQuery.isPending,
|
|
18105
18166
|
isBestQuote: selectedQuote?.serviceProvider === bestRateQuote?.serviceProvider,
|
|
18106
18167
|
disabled: !meldQuotesQuery.data || meldQuotesQuery.data.length === 0,
|
|
18107
|
-
isPreselected: !manuallySelectedQuote && !!bestRateQuote
|
|
18168
|
+
isPreselected: !manuallySelectedQuote && !!bestRateQuote,
|
|
18169
|
+
error: meldLimitError?.issue
|
|
18108
18170
|
}
|
|
18109
18171
|
) : /* @__PURE__ */ React150.createElement(
|
|
18110
18172
|
YouPayYouReceiveWrapper,
|
|
@@ -20137,7 +20199,7 @@ function BaseDropdown({
|
|
|
20137
20199
|
setIsOpened(true);
|
|
20138
20200
|
onOpen?.();
|
|
20139
20201
|
};
|
|
20140
|
-
return /* @__PURE__ */ React177.createElement(Box, { display: "flex", flexDirection: "column", gap: "4" }, label && /* @__PURE__ */ React177.createElement(Text, { size: "12" }, label), /* @__PURE__ */ React177.createElement(FunClickOutside, { onClick: isOpened ? closeDropdown : noop6 }, /* @__PURE__ */ React177.createElement(
|
|
20202
|
+
return /* @__PURE__ */ React177.createElement(Box, { display: "flex", flexDirection: "column", gap: "4" }, label && /* @__PURE__ */ React177.createElement(Text, { size: "12", color: "secondaryText" }, label), /* @__PURE__ */ React177.createElement(FunClickOutside, { onClick: isOpened ? closeDropdown : noop6 }, /* @__PURE__ */ React177.createElement(
|
|
20141
20203
|
Box,
|
|
20142
20204
|
{
|
|
20143
20205
|
position: "relative",
|
|
@@ -20441,7 +20503,7 @@ var getTokenIconUrl = (symbol, tokens) => {
|
|
|
20441
20503
|
};
|
|
20442
20504
|
|
|
20443
20505
|
// src/components/Dropdown/ReceiveTokenDropdown.tsx
|
|
20444
|
-
var TOKEN_ICON_SIZE = 16;
|
|
20506
|
+
var TOKEN_ICON_SIZE = "16";
|
|
20445
20507
|
var aprTag = (badgeText) => /* @__PURE__ */ React180.createElement(
|
|
20446
20508
|
FunBadge,
|
|
20447
20509
|
{
|
|
@@ -20456,7 +20518,8 @@ var ReceiveTokenDropdown = ({
|
|
|
20456
20518
|
chainId,
|
|
20457
20519
|
selectedToken,
|
|
20458
20520
|
onTokenSelected,
|
|
20459
|
-
label
|
|
20521
|
+
label,
|
|
20522
|
+
activeItemLabel
|
|
20460
20523
|
}) => {
|
|
20461
20524
|
const allTokens = Array.from(new Set(Object.values(tokens).flat()));
|
|
20462
20525
|
const tokenBadgeText = tokens.find(
|
|
@@ -20472,20 +20535,20 @@ var ReceiveTokenDropdown = ({
|
|
|
20472
20535
|
BaseDropdown_default,
|
|
20473
20536
|
{
|
|
20474
20537
|
horizontalIconGap: "8",
|
|
20538
|
+
label,
|
|
20475
20539
|
openToTopOnMobile: false,
|
|
20476
20540
|
activeItemProps: {
|
|
20477
20541
|
iconComponent: selectedToken && /* @__PURE__ */ React180.createElement(
|
|
20478
|
-
|
|
20542
|
+
FunAssetAvatar,
|
|
20479
20543
|
{
|
|
20480
|
-
|
|
20481
|
-
|
|
20482
|
-
|
|
20483
|
-
|
|
20484
|
-
|
|
20485
|
-
fallbackSrc: FALLBACK_ASSET
|
|
20544
|
+
assetIconSize: TOKEN_ICON_SIZE,
|
|
20545
|
+
assetName: selectedToken,
|
|
20546
|
+
assetSrc: getTokenIconUrl(selectedToken, tokens),
|
|
20547
|
+
chainId,
|
|
20548
|
+
largeChainIcon: true
|
|
20486
20549
|
}
|
|
20487
20550
|
),
|
|
20488
|
-
alwaysVisibleLabel:
|
|
20551
|
+
alwaysVisibleLabel: activeItemLabel,
|
|
20489
20552
|
tagComponent: tokenBadgeText ? aprTag(tokenBadgeText) : void 0
|
|
20490
20553
|
},
|
|
20491
20554
|
value: selectedToken ?? "",
|
|
@@ -20507,7 +20570,7 @@ var ReceiveTokenDropdown = ({
|
|
|
20507
20570
|
iconComponent: /* @__PURE__ */ React180.createElement(
|
|
20508
20571
|
FunAssetAvatar,
|
|
20509
20572
|
{
|
|
20510
|
-
assetIconSize:
|
|
20573
|
+
assetIconSize: TOKEN_ICON_SIZE,
|
|
20511
20574
|
assetName: "receive-token-asset",
|
|
20512
20575
|
assetSrc: iconUrl,
|
|
20513
20576
|
chainId,
|
|
@@ -20847,7 +20910,8 @@ function MeshOrAccountSelectAsset({
|
|
|
20847
20910
|
/* @__PURE__ */ React182.createElement(
|
|
20848
20911
|
ReceiveTokenDropdown,
|
|
20849
20912
|
{
|
|
20850
|
-
label:
|
|
20913
|
+
label: textCustomizations.receiveDropdownTitle,
|
|
20914
|
+
activeItemLabel: textCustomizations.receiveDropdownLabel,
|
|
20851
20915
|
tokens: candidates,
|
|
20852
20916
|
chainId: Number(checkoutConfig.targetChain),
|
|
20853
20917
|
selectedToken: selectedTargetAsset?.tokenSymbol,
|
|
@@ -22733,10 +22797,64 @@ function TransferToken({
|
|
|
22733
22797
|
}
|
|
22734
22798
|
|
|
22735
22799
|
// src/modals/CheckoutModal/VirtualFiatAccount/FiatAccountDetail.tsx
|
|
22736
|
-
import
|
|
22800
|
+
import React203, { useState as useState49 } from "react";
|
|
22737
22801
|
|
|
22738
|
-
// src/components/
|
|
22802
|
+
// src/components/Tabs/Tabs.tsx
|
|
22803
|
+
import { motion as motion9 } from "motion/react";
|
|
22739
22804
|
import React200 from "react";
|
|
22805
|
+
|
|
22806
|
+
// src/components/Tabs/tabs.css.ts
|
|
22807
|
+
var activeTabStyle = "eghi2t1 _1rsrm2fjf _1rsrm2ft";
|
|
22808
|
+
|
|
22809
|
+
// src/components/Tabs/Tabs.tsx
|
|
22810
|
+
var Tabs = ({ tabs: tabs3, activeTab, onTabChange }) => {
|
|
22811
|
+
return /* @__PURE__ */ React200.createElement(
|
|
22812
|
+
Box,
|
|
22813
|
+
{
|
|
22814
|
+
display: "flex",
|
|
22815
|
+
background: "offBackground",
|
|
22816
|
+
borderRadius: "actionButton",
|
|
22817
|
+
gap: "2",
|
|
22818
|
+
padding: "2"
|
|
22819
|
+
},
|
|
22820
|
+
tabs3.map((tab, index) => {
|
|
22821
|
+
const isSelected = index === activeTab;
|
|
22822
|
+
return /* @__PURE__ */ React200.createElement(
|
|
22823
|
+
Box,
|
|
22824
|
+
{
|
|
22825
|
+
key: tab.value,
|
|
22826
|
+
as: "button",
|
|
22827
|
+
type: "button",
|
|
22828
|
+
paddingX: "12",
|
|
22829
|
+
paddingY: "6",
|
|
22830
|
+
position: "relative",
|
|
22831
|
+
onClick: isSelected ? void 0 : () => onTabChange(index),
|
|
22832
|
+
style: { flex: 1 },
|
|
22833
|
+
color: isSelected ? "primaryText" : {
|
|
22834
|
+
base: "secondaryText",
|
|
22835
|
+
hover: "primaryText",
|
|
22836
|
+
focusedVisible: "primaryText"
|
|
22837
|
+
}
|
|
22838
|
+
},
|
|
22839
|
+
isSelected && /* @__PURE__ */ React200.createElement(
|
|
22840
|
+
motion9.div,
|
|
22841
|
+
{
|
|
22842
|
+
layoutId: "highlight",
|
|
22843
|
+
className: activeTabStyle,
|
|
22844
|
+
transition: { duration: 0.2, ease: [0.17, 0, 0.01, 1] }
|
|
22845
|
+
}
|
|
22846
|
+
),
|
|
22847
|
+
/* @__PURE__ */ React200.createElement(Box, { position: "relative", style: { zIndex: 1, textAlign: "center" } }, /* @__PURE__ */ React200.createElement(Text, { color: "inherit", weight: "medium", size: "12" }, tab.label))
|
|
22848
|
+
);
|
|
22849
|
+
})
|
|
22850
|
+
);
|
|
22851
|
+
};
|
|
22852
|
+
|
|
22853
|
+
// src/components/VirtualFiatAccount/AccountDetailsTab/AccountDetailsTab.tsx
|
|
22854
|
+
import React202 from "react";
|
|
22855
|
+
|
|
22856
|
+
// src/components/FunInputButton/FunInputButton.tsx
|
|
22857
|
+
import React201 from "react";
|
|
22740
22858
|
var HIDE_TOOLTIP_MS = 2e3;
|
|
22741
22859
|
var FunInputButton = ({
|
|
22742
22860
|
text,
|
|
@@ -22747,7 +22865,7 @@ var FunInputButton = ({
|
|
|
22747
22865
|
}) => {
|
|
22748
22866
|
const { isCopied, handleCopy } = useCopyToClipboard(text, HIDE_TOOLTIP_MS);
|
|
22749
22867
|
if (!isCopyable) {
|
|
22750
|
-
return /* @__PURE__ */
|
|
22868
|
+
return /* @__PURE__ */ React201.createElement(
|
|
22751
22869
|
FunOptionBox,
|
|
22752
22870
|
{
|
|
22753
22871
|
width: "full",
|
|
@@ -22766,10 +22884,10 @@ var FunInputButton = ({
|
|
|
22766
22884
|
hover: "heavyStroke"
|
|
22767
22885
|
}
|
|
22768
22886
|
},
|
|
22769
|
-
/* @__PURE__ */
|
|
22887
|
+
/* @__PURE__ */ React201.createElement(Box, { display: "flex", gap: "8", flexDirection: "column" }, label && /* @__PURE__ */ React201.createElement(Text, { size: "10", color: "secondaryText" }, label), /* @__PURE__ */ React201.createElement(Text, { weight: "medium", size: "12" }, text))
|
|
22770
22888
|
);
|
|
22771
22889
|
}
|
|
22772
|
-
return /* @__PURE__ */
|
|
22890
|
+
return /* @__PURE__ */ React201.createElement(
|
|
22773
22891
|
FunTooltip,
|
|
22774
22892
|
{
|
|
22775
22893
|
width: "full",
|
|
@@ -22777,7 +22895,7 @@ var FunInputButton = ({
|
|
|
22777
22895
|
displayType: "click",
|
|
22778
22896
|
hideDelay: HIDE_TOOLTIP_MS
|
|
22779
22897
|
},
|
|
22780
|
-
/* @__PURE__ */
|
|
22898
|
+
/* @__PURE__ */ React201.createElement(
|
|
22781
22899
|
FunOptionBox,
|
|
22782
22900
|
{
|
|
22783
22901
|
width: "full",
|
|
@@ -22797,46 +22915,93 @@ var FunInputButton = ({
|
|
|
22797
22915
|
hover: "heavyStroke"
|
|
22798
22916
|
}
|
|
22799
22917
|
},
|
|
22800
|
-
/* @__PURE__ */
|
|
22801
|
-
/* @__PURE__ */
|
|
22918
|
+
/* @__PURE__ */ React201.createElement(Box, { display: "flex", gap: "8", flexDirection: "column" }, label && /* @__PURE__ */ React201.createElement(Text, { size: "10", color: "secondaryText" }, label), /* @__PURE__ */ React201.createElement(Text, { weight: "medium", size: "12" }, text)),
|
|
22919
|
+
/* @__PURE__ */ React201.createElement(Box, { display: "flex", alignItems: "center", color: "primaryText" }, isCopied ? /* @__PURE__ */ React201.createElement(CheckCircleIcon, null) : /* @__PURE__ */ React201.createElement(CopyDoubleRoundedSquareIcon, null))
|
|
22802
22920
|
)
|
|
22803
22921
|
);
|
|
22804
22922
|
};
|
|
22805
22923
|
|
|
22806
|
-
// src/components/
|
|
22807
|
-
|
|
22808
|
-
|
|
22809
|
-
|
|
22924
|
+
// src/components/VirtualFiatAccount/AccountDetailsTab/AccountDetailsTab.tsx
|
|
22925
|
+
var AccountDetailsTab = ({
|
|
22926
|
+
account,
|
|
22927
|
+
detailsExpanded,
|
|
22928
|
+
handleToggleDetails
|
|
22929
|
+
}) => /* @__PURE__ */ React202.createElement(Box, { display: "flex", flexDirection: "column", gap: "8" }, account.bank_account_number ? /* @__PURE__ */ React202.createElement(
|
|
22930
|
+
FunInputButton,
|
|
22931
|
+
{
|
|
22932
|
+
label: "Account number",
|
|
22933
|
+
text: account.bank_account_number
|
|
22934
|
+
}
|
|
22935
|
+
) : null, account.bank_routing_number ? /* @__PURE__ */ React202.createElement(
|
|
22936
|
+
FunInputButton,
|
|
22937
|
+
{
|
|
22938
|
+
label: "Routing number",
|
|
22939
|
+
text: account.bank_routing_number
|
|
22940
|
+
}
|
|
22941
|
+
) : null, account.iban ? /* @__PURE__ */ React202.createElement(FunInputButton, { label: "IBAN", text: account.iban }) : null, account.bic ? /* @__PURE__ */ React202.createElement(FunInputButton, { label: "SWIFT / BIC", text: account.bic }) : null, account.account_holder_name ? /* @__PURE__ */ React202.createElement(
|
|
22942
|
+
FunInputButton,
|
|
22943
|
+
{
|
|
22944
|
+
label: "Account holder name",
|
|
22945
|
+
text: account.account_holder_name
|
|
22946
|
+
}
|
|
22947
|
+
) : null, account.bank_beneficiary_name ? /* @__PURE__ */ React202.createElement(
|
|
22948
|
+
FunInputButton,
|
|
22949
|
+
{
|
|
22950
|
+
label: "Beneficiary name",
|
|
22951
|
+
text: account.bank_beneficiary_name
|
|
22952
|
+
}
|
|
22953
|
+
) : null, detailsExpanded && /* @__PURE__ */ React202.createElement(React202.Fragment, null, /* @__PURE__ */ React202.createElement(FunInputButton, { label: "Bank name", text: account.bank_name }), /* @__PURE__ */ React202.createElement(FunInputButton, { label: "Bank address", text: account.bank_address }), /* @__PURE__ */ React202.createElement(
|
|
22954
|
+
FunInputButton,
|
|
22955
|
+
{
|
|
22956
|
+
label: "Currency",
|
|
22957
|
+
text: String(account.currency).toUpperCase(),
|
|
22958
|
+
isCopyable: false
|
|
22959
|
+
}
|
|
22960
|
+
)), /* @__PURE__ */ React202.createElement(
|
|
22961
|
+
Box,
|
|
22962
|
+
{
|
|
22963
|
+
width: "full",
|
|
22964
|
+
as: "button",
|
|
22965
|
+
display: "flex",
|
|
22966
|
+
gap: "4",
|
|
22967
|
+
alignItems: "center",
|
|
22968
|
+
justifyContent: "center",
|
|
22969
|
+
paddingY: "8",
|
|
22970
|
+
paddingX: "24",
|
|
22971
|
+
onClick: handleToggleDetails,
|
|
22972
|
+
borderRadius: "connectButton",
|
|
22973
|
+
borderStyle: "solid",
|
|
22974
|
+
borderWidth: "1",
|
|
22975
|
+
borderColor: {
|
|
22976
|
+
base: "mediumStroke",
|
|
22977
|
+
hover: "heavyStroke"
|
|
22978
|
+
}
|
|
22979
|
+
},
|
|
22980
|
+
/* @__PURE__ */ React202.createElement(Text, { size: "13" }, detailsExpanded ? "See less" : "More details"),
|
|
22981
|
+
/* @__PURE__ */ React202.createElement(
|
|
22810
22982
|
Box,
|
|
22811
22983
|
{
|
|
22984
|
+
width: "16",
|
|
22985
|
+
height: "16",
|
|
22812
22986
|
display: "flex",
|
|
22813
|
-
|
|
22814
|
-
|
|
22815
|
-
gap: "2",
|
|
22816
|
-
padding: "2"
|
|
22987
|
+
alignItems: "center",
|
|
22988
|
+
justifyContent: "center"
|
|
22817
22989
|
},
|
|
22818
|
-
|
|
22990
|
+
/* @__PURE__ */ React202.createElement(
|
|
22819
22991
|
Box,
|
|
22820
22992
|
{
|
|
22821
|
-
|
|
22822
|
-
|
|
22823
|
-
|
|
22824
|
-
|
|
22825
|
-
|
|
22826
|
-
|
|
22827
|
-
|
|
22828
|
-
onClick: () => onTabChange(tab.value),
|
|
22829
|
-
style: { flex: 1, textAlign: "center" },
|
|
22830
|
-
color: activeTab === tab.value ? "primaryText" : {
|
|
22831
|
-
base: "secondaryText",
|
|
22832
|
-
hover: "primaryText",
|
|
22833
|
-
focusedVisible: "primaryText"
|
|
22834
|
-
}
|
|
22993
|
+
color: "secondaryText",
|
|
22994
|
+
width: "8",
|
|
22995
|
+
height: "8",
|
|
22996
|
+
display: "flex",
|
|
22997
|
+
alignItems: "center",
|
|
22998
|
+
justifyContent: "center",
|
|
22999
|
+
style: detailsExpanded ? { transform: "rotate(180deg)" } : void 0
|
|
22835
23000
|
},
|
|
22836
|
-
/* @__PURE__ */
|
|
22837
|
-
)
|
|
22838
|
-
)
|
|
22839
|
-
|
|
23001
|
+
/* @__PURE__ */ React202.createElement(CaretDownIcon, null)
|
|
23002
|
+
)
|
|
23003
|
+
)
|
|
23004
|
+
));
|
|
22840
23005
|
|
|
22841
23006
|
// src/modals/CheckoutModal/VirtualFiatAccount/FiatAccountDetail.tsx
|
|
22842
23007
|
var tabs = [
|
|
@@ -22851,13 +23016,14 @@ var AccountDetailsScreen = ({
|
|
|
22851
23016
|
const { matchingFiatAccount } = paymentMethodInfo;
|
|
22852
23017
|
const label = usePaymentMethodInfoLabel(paymentMethodInfo);
|
|
22853
23018
|
const { appName } = useFunkitConfig();
|
|
22854
|
-
const
|
|
23019
|
+
const { animation, animate } = useAnimatedNavigation(void 0);
|
|
23020
|
+
const [activeTab, setActiveTab] = useState49(0);
|
|
22855
23021
|
const [detailsExpanded, setDetailsExpanded] = useState49(false);
|
|
22856
|
-
const handleToggleDetails = () => {
|
|
22857
|
-
setDetailsExpanded((prev) => !prev);
|
|
22858
|
-
};
|
|
22859
23022
|
const { source_deposit_instructions: sourceDeposit } = matchingFiatAccount;
|
|
22860
|
-
|
|
23023
|
+
const handleTabChange = (index) => {
|
|
23024
|
+
animate(() => setActiveTab(index), { reverse: index < activeTab });
|
|
23025
|
+
};
|
|
23026
|
+
return /* @__PURE__ */ React203.createElement(
|
|
22861
23027
|
Box,
|
|
22862
23028
|
{
|
|
22863
23029
|
id: "fiat-detail-page",
|
|
@@ -22865,7 +23031,7 @@ var AccountDetailsScreen = ({
|
|
|
22865
23031
|
flexDirection: "column",
|
|
22866
23032
|
gap: "16"
|
|
22867
23033
|
},
|
|
22868
|
-
/* @__PURE__ */
|
|
23034
|
+
/* @__PURE__ */ React203.createElement(
|
|
22869
23035
|
SourcePaymentMethodItem,
|
|
22870
23036
|
{
|
|
22871
23037
|
onClick: () => onNext({}),
|
|
@@ -22874,101 +23040,21 @@ var AccountDetailsScreen = ({
|
|
|
22874
23040
|
keyIcon: label.icon
|
|
22875
23041
|
}
|
|
22876
23042
|
),
|
|
22877
|
-
/* @__PURE__ */
|
|
23043
|
+
/* @__PURE__ */ React203.createElement(Box, { display: "flex", flexDirection: "column", gap: "8" }, /* @__PURE__ */ React203.createElement(Box, { display: "flex", flexDirection: "column", gap: "12" }, /* @__PURE__ */ React203.createElement(Box, { display: "flex", flexDirection: "column", gap: "8" }, /* @__PURE__ */ React203.createElement(Text, null, "Your virtual fiat account details"), /* @__PURE__ */ React203.createElement(Text, { size: "12" }, "Use these details to transfer EUR. Funds arrive in 1\u20132 days to your ", appName, " account.")), /* @__PURE__ */ React203.createElement(
|
|
22878
23044
|
Tabs,
|
|
22879
23045
|
{
|
|
22880
23046
|
tabs,
|
|
22881
23047
|
activeTab,
|
|
22882
|
-
onTabChange:
|
|
22883
|
-
}
|
|
22884
|
-
)), activeTab === "details" ? /* @__PURE__ */ React202.createElement(Box, { display: "flex", flexDirection: "column", gap: "8" }, sourceDeposit.bank_account_number ? /* @__PURE__ */ React202.createElement(
|
|
22885
|
-
FunInputButton,
|
|
22886
|
-
{
|
|
22887
|
-
label: "Account number",
|
|
22888
|
-
text: sourceDeposit.bank_account_number
|
|
23048
|
+
onTabChange: handleTabChange
|
|
22889
23049
|
}
|
|
22890
|
-
) :
|
|
22891
|
-
|
|
23050
|
+
)), /* @__PURE__ */ React203.createElement(Box, { className: getContentAnimation(animation) }, tabs[activeTab].value === "details" ? /* @__PURE__ */ React203.createElement(
|
|
23051
|
+
AccountDetailsTab,
|
|
22892
23052
|
{
|
|
22893
|
-
|
|
22894
|
-
|
|
23053
|
+
account: sourceDeposit,
|
|
23054
|
+
detailsExpanded,
|
|
23055
|
+
handleToggleDetails: () => setDetailsExpanded((prev) => !prev)
|
|
22895
23056
|
}
|
|
22896
|
-
) :
|
|
22897
|
-
FunInputButton,
|
|
22898
|
-
{
|
|
22899
|
-
label: "Account holder name",
|
|
22900
|
-
text: sourceDeposit.account_holder_name
|
|
22901
|
-
}
|
|
22902
|
-
) : null, sourceDeposit.bank_beneficiary_name ? /* @__PURE__ */ React202.createElement(
|
|
22903
|
-
FunInputButton,
|
|
22904
|
-
{
|
|
22905
|
-
label: "Beneficiary name",
|
|
22906
|
-
text: sourceDeposit.bank_beneficiary_name
|
|
22907
|
-
}
|
|
22908
|
-
) : null, detailsExpanded && /* @__PURE__ */ React202.createElement(React202.Fragment, null, /* @__PURE__ */ React202.createElement(
|
|
22909
|
-
FunInputButton,
|
|
22910
|
-
{
|
|
22911
|
-
label: "Bank name",
|
|
22912
|
-
text: sourceDeposit.bank_name
|
|
22913
|
-
}
|
|
22914
|
-
), /* @__PURE__ */ React202.createElement(
|
|
22915
|
-
FunInputButton,
|
|
22916
|
-
{
|
|
22917
|
-
label: "Bank address",
|
|
22918
|
-
text: sourceDeposit.bank_address
|
|
22919
|
-
}
|
|
22920
|
-
), /* @__PURE__ */ React202.createElement(
|
|
22921
|
-
FunInputButton,
|
|
22922
|
-
{
|
|
22923
|
-
label: "Currency",
|
|
22924
|
-
text: String(sourceDeposit.currency).toUpperCase(),
|
|
22925
|
-
isCopyable: false
|
|
22926
|
-
}
|
|
22927
|
-
)), /* @__PURE__ */ React202.createElement(
|
|
22928
|
-
Box,
|
|
22929
|
-
{
|
|
22930
|
-
width: "full",
|
|
22931
|
-
as: "button",
|
|
22932
|
-
display: "flex",
|
|
22933
|
-
gap: "4",
|
|
22934
|
-
alignItems: "center",
|
|
22935
|
-
justifyContent: "center",
|
|
22936
|
-
paddingY: "8",
|
|
22937
|
-
paddingX: "24",
|
|
22938
|
-
onClick: handleToggleDetails,
|
|
22939
|
-
borderRadius: "connectButton",
|
|
22940
|
-
borderStyle: "solid",
|
|
22941
|
-
borderWidth: "1",
|
|
22942
|
-
borderColor: {
|
|
22943
|
-
base: "mediumStroke",
|
|
22944
|
-
hover: "heavyStroke"
|
|
22945
|
-
}
|
|
22946
|
-
},
|
|
22947
|
-
/* @__PURE__ */ React202.createElement(Text, { size: "13" }, detailsExpanded ? "See less" : "More details"),
|
|
22948
|
-
/* @__PURE__ */ React202.createElement(
|
|
22949
|
-
Box,
|
|
22950
|
-
{
|
|
22951
|
-
width: "16",
|
|
22952
|
-
height: "16",
|
|
22953
|
-
display: "flex",
|
|
22954
|
-
alignItems: "center",
|
|
22955
|
-
justifyContent: "center"
|
|
22956
|
-
},
|
|
22957
|
-
/* @__PURE__ */ React202.createElement(
|
|
22958
|
-
Box,
|
|
22959
|
-
{
|
|
22960
|
-
color: "secondaryText",
|
|
22961
|
-
width: "8",
|
|
22962
|
-
height: "8",
|
|
22963
|
-
display: "flex",
|
|
22964
|
-
alignItems: "center",
|
|
22965
|
-
justifyContent: "center",
|
|
22966
|
-
style: detailsExpanded ? { transform: "rotate(180deg)" } : void 0
|
|
22967
|
-
},
|
|
22968
|
-
/* @__PURE__ */ React202.createElement(CaretDownIcon, null)
|
|
22969
|
-
)
|
|
22970
|
-
)
|
|
22971
|
-
)) : /* @__PURE__ */ React202.createElement(
|
|
23057
|
+
) : /* @__PURE__ */ React203.createElement(
|
|
22972
23058
|
FunFeatureList,
|
|
22973
23059
|
{
|
|
22974
23060
|
gapBetweenItems: "8",
|
|
@@ -22982,7 +23068,7 @@ var AccountDetailsScreen = ({
|
|
|
22982
23068
|
"Gas fee: < $5.00",
|
|
22983
23069
|
"Banks fees may also apply"
|
|
22984
23070
|
],
|
|
22985
|
-
icon: /* @__PURE__ */
|
|
23071
|
+
icon: /* @__PURE__ */ React203.createElement(DollarIcon, null)
|
|
22986
23072
|
},
|
|
22987
23073
|
{
|
|
22988
23074
|
text: "Limits",
|
|
@@ -22990,16 +23076,16 @@ var AccountDetailsScreen = ({
|
|
|
22990
23076
|
"Minimum amount: 25 EUR",
|
|
22991
23077
|
"Maximum amount: 20,000,000 EUR"
|
|
22992
23078
|
],
|
|
22993
|
-
icon: /* @__PURE__ */
|
|
23079
|
+
icon: /* @__PURE__ */ React203.createElement(DollarIcon, null)
|
|
22994
23080
|
},
|
|
22995
23081
|
{
|
|
22996
23082
|
text: "Processing time",
|
|
22997
23083
|
value: [FIAT_PROCESSING_TIME],
|
|
22998
|
-
icon: /* @__PURE__ */
|
|
23084
|
+
icon: /* @__PURE__ */ React203.createElement(SpeedometerIcon, null)
|
|
22999
23085
|
}
|
|
23000
23086
|
]
|
|
23001
23087
|
}
|
|
23002
|
-
))
|
|
23088
|
+
)))
|
|
23003
23089
|
);
|
|
23004
23090
|
};
|
|
23005
23091
|
var FiatAccountDetail = {
|
|
@@ -23018,7 +23104,7 @@ var FiatAccountDetail = {
|
|
|
23018
23104
|
|
|
23019
23105
|
// src/modals/CheckoutModal/VirtualFiatAccount/KycIframe.tsx
|
|
23020
23106
|
import { BridgeCustomerStatus as BridgeCustomerStatus7 } from "@funkit/api-base";
|
|
23021
|
-
import
|
|
23107
|
+
import React204, { useCallback as useCallback34, useEffect as useEffect38, useMemo as useMemo35, useState as useState50 } from "react";
|
|
23022
23108
|
function useIframeListener(listeners) {
|
|
23023
23109
|
const handleMessage = useCallback34(
|
|
23024
23110
|
(event) => {
|
|
@@ -23094,7 +23180,7 @@ function KycIframe({
|
|
|
23094
23180
|
);
|
|
23095
23181
|
const loading = isLinkLoading || iframeLoading;
|
|
23096
23182
|
useIframeListener(listeners);
|
|
23097
|
-
return /* @__PURE__ */
|
|
23183
|
+
return /* @__PURE__ */ React204.createElement(
|
|
23098
23184
|
Dialog,
|
|
23099
23185
|
{
|
|
23100
23186
|
onClose: onBack,
|
|
@@ -23103,13 +23189,13 @@ function KycIframe({
|
|
|
23103
23189
|
withoutInternalPadding: !loading,
|
|
23104
23190
|
withTransition: false
|
|
23105
23191
|
},
|
|
23106
|
-
loading && /* @__PURE__ */
|
|
23192
|
+
loading && /* @__PURE__ */ React204.createElement(React204.Fragment, null, /* @__PURE__ */ React204.createElement(
|
|
23107
23193
|
Dialog.Title,
|
|
23108
23194
|
{
|
|
23109
23195
|
onClose: onBack,
|
|
23110
23196
|
title: textCustomizations.virtualFiat
|
|
23111
23197
|
}
|
|
23112
|
-
), /* @__PURE__ */
|
|
23198
|
+
), /* @__PURE__ */ React204.createElement(
|
|
23113
23199
|
VerifyAccountScreen,
|
|
23114
23200
|
{
|
|
23115
23201
|
customerStatus: BridgeCustomerStatus7.NOT_STARTED,
|
|
@@ -23117,7 +23203,7 @@ function KycIframe({
|
|
|
23117
23203
|
withActionButton: false
|
|
23118
23204
|
}
|
|
23119
23205
|
)),
|
|
23120
|
-
/* @__PURE__ */
|
|
23206
|
+
/* @__PURE__ */ React204.createElement(
|
|
23121
23207
|
Dialog.Content,
|
|
23122
23208
|
{
|
|
23123
23209
|
display: "flex",
|
|
@@ -23129,7 +23215,7 @@ function KycIframe({
|
|
|
23129
23215
|
fullHeight: !loading,
|
|
23130
23216
|
withoutInternalPadding: !loading
|
|
23131
23217
|
},
|
|
23132
|
-
kycLink && /* @__PURE__ */
|
|
23218
|
+
kycLink && /* @__PURE__ */ React204.createElement(
|
|
23133
23219
|
"iframe",
|
|
23134
23220
|
{
|
|
23135
23221
|
src: kycLink,
|
|
@@ -23144,7 +23230,7 @@ function KycIframe({
|
|
|
23144
23230
|
}
|
|
23145
23231
|
)
|
|
23146
23232
|
),
|
|
23147
|
-
loading && /* @__PURE__ */
|
|
23233
|
+
loading && /* @__PURE__ */ React204.createElement(Dialog.BottomSection, null, /* @__PURE__ */ React204.createElement(
|
|
23148
23234
|
Dialog.BottomBar,
|
|
23149
23235
|
{
|
|
23150
23236
|
actionButtonProps: {
|
|
@@ -23311,7 +23397,7 @@ function useTitleConfig(checkoutItem, state) {
|
|
|
23311
23397
|
return {
|
|
23312
23398
|
disableBack: isOstiumCustomer(apiKey) && state.step === "select_asset" /* SELECT_ASSET */ ? false : disableBack ?? false,
|
|
23313
23399
|
hideClose: hideClose ?? false,
|
|
23314
|
-
showFullHeight: showFullHeight ?? (isVertexCustomer(apiKey) && state.step === "select_asset" /* SELECT_ASSET */),
|
|
23400
|
+
showFullHeight: showFullHeight ?? ((isVertexCustomer(apiKey) || isKatanaCustomer(apiKey)) && state.step === "select_asset" /* SELECT_ASSET */),
|
|
23315
23401
|
title: title?.(textCustomizations) ?? baseTitle
|
|
23316
23402
|
};
|
|
23317
23403
|
}
|
|
@@ -23320,7 +23406,8 @@ function useTitleConfig(checkoutItem, state) {
|
|
|
23320
23406
|
var DEFAULT_HEIGHT = 525;
|
|
23321
23407
|
var mapHeightToCheckoutStep = {
|
|
23322
23408
|
["transfer_token" /* TRANSFER_TOKEN */]: 825,
|
|
23323
|
-
["fiat_account_detail" /* FIAT_ACCOUNT_DETAIL */]: 825
|
|
23409
|
+
["fiat_account_detail" /* FIAT_ACCOUNT_DETAIL */]: 825,
|
|
23410
|
+
["confirmation" /* CONFIRMATION */]: 825
|
|
23324
23411
|
};
|
|
23325
23412
|
function FunCheckoutModalHeightAnimationWrapper({
|
|
23326
23413
|
children,
|
|
@@ -23351,8 +23438,8 @@ function FunCheckoutModalHeightAnimationWrapper({
|
|
|
23351
23438
|
}
|
|
23352
23439
|
}, [checkoutStep]);
|
|
23353
23440
|
const permittedHeight = checkoutStep ? mapHeightToCheckoutStep[checkoutStep] ?? DEFAULT_HEIGHT : DEFAULT_HEIGHT;
|
|
23354
|
-
return /* @__PURE__ */
|
|
23355
|
-
|
|
23441
|
+
return /* @__PURE__ */ React205.createElement(
|
|
23442
|
+
motion10.div,
|
|
23356
23443
|
{
|
|
23357
23444
|
style: { height },
|
|
23358
23445
|
animate: { height },
|
|
@@ -23361,7 +23448,7 @@ function FunCheckoutModalHeightAnimationWrapper({
|
|
|
23361
23448
|
},
|
|
23362
23449
|
transition: { duration: 0.15, ease: [0.33, 1, 0.68, 1] }
|
|
23363
23450
|
},
|
|
23364
|
-
/* @__PURE__ */
|
|
23451
|
+
/* @__PURE__ */ React205.createElement(
|
|
23365
23452
|
"div",
|
|
23366
23453
|
{
|
|
23367
23454
|
ref: containerRef,
|
|
@@ -23377,7 +23464,7 @@ function FunCheckoutModalHeightAnimationWrapper({
|
|
|
23377
23464
|
}
|
|
23378
23465
|
|
|
23379
23466
|
// src/components/FunConnectOptions/FunConnectResultStep.tsx
|
|
23380
|
-
import
|
|
23467
|
+
import React206, { useEffect as useEffect40 } from "react";
|
|
23381
23468
|
var AUTO_CLOSE = 2e3;
|
|
23382
23469
|
var messageMap = (hasQrCode) => ({
|
|
23383
23470
|
error: {
|
|
@@ -23403,7 +23490,7 @@ var FunConnectResultStep = ({
|
|
|
23403
23490
|
}, [onClose, hasAutoclose]);
|
|
23404
23491
|
const hasQrCode = wallet?.qrCode && qrCodeUri;
|
|
23405
23492
|
const message = messageMap(!!hasQrCode)[type];
|
|
23406
|
-
return /* @__PURE__ */
|
|
23493
|
+
return /* @__PURE__ */ React206.createElement(Box, { display: "flex", flexDirection: "column", gap: "24" }, /* @__PURE__ */ React206.createElement(Box, { display: "flex", flexDirection: "column", alignItems: "center", gap: "12" }, hasQrCode && type === "error" ? /* @__PURE__ */ React206.createElement(
|
|
23407
23494
|
Box,
|
|
23408
23495
|
{
|
|
23409
23496
|
alignItems: "center",
|
|
@@ -23412,7 +23499,7 @@ var FunConnectResultStep = ({
|
|
|
23412
23499
|
justifyContent: "center",
|
|
23413
23500
|
flexDirection: "column"
|
|
23414
23501
|
},
|
|
23415
|
-
/* @__PURE__ */
|
|
23502
|
+
/* @__PURE__ */ React206.createElement(
|
|
23416
23503
|
QRCode,
|
|
23417
23504
|
{
|
|
23418
23505
|
logoBackground: wallet.iconBackground,
|
|
@@ -23422,7 +23509,7 @@ var FunConnectResultStep = ({
|
|
|
23422
23509
|
uri: qrCodeUri
|
|
23423
23510
|
}
|
|
23424
23511
|
)
|
|
23425
|
-
) : /* @__PURE__ */
|
|
23512
|
+
) : /* @__PURE__ */ React206.createElement(
|
|
23426
23513
|
Box,
|
|
23427
23514
|
{
|
|
23428
23515
|
padding: "30",
|
|
@@ -23431,7 +23518,7 @@ var FunConnectResultStep = ({
|
|
|
23431
23518
|
borderStyle: "solid",
|
|
23432
23519
|
borderColor: type === "success" ? "buttonSuccess" : "buttonWarning"
|
|
23433
23520
|
},
|
|
23434
|
-
wallet && /* @__PURE__ */
|
|
23521
|
+
wallet && /* @__PURE__ */ React206.createElement(Box, { style: { width: 40, height: 40 } }, /* @__PURE__ */ React206.createElement(
|
|
23435
23522
|
AsyncImage,
|
|
23436
23523
|
{
|
|
23437
23524
|
background: wallet.iconBackground,
|
|
@@ -23441,12 +23528,12 @@ var FunConnectResultStep = ({
|
|
|
23441
23528
|
height: 40
|
|
23442
23529
|
}
|
|
23443
23530
|
))
|
|
23444
|
-
), /* @__PURE__ */
|
|
23531
|
+
), /* @__PURE__ */ React206.createElement(FunMessage, { title: message.title, description: message.description })));
|
|
23445
23532
|
};
|
|
23446
23533
|
|
|
23447
23534
|
// src/components/FunConnectOptions/FunFarcasterConnectingStep.tsx
|
|
23448
23535
|
import { isMobile as isMobile7, isSafari as isSafari2, redirectInMobile } from "@funkit/utils";
|
|
23449
|
-
import
|
|
23536
|
+
import React207, { useCallback as useCallback36, useEffect as useEffect41 } from "react";
|
|
23450
23537
|
function FunFarcasterConnectingStep({
|
|
23451
23538
|
farcasterUri,
|
|
23452
23539
|
farcasterToken
|
|
@@ -23463,7 +23550,7 @@ function FunFarcasterConnectingStep({
|
|
|
23463
23550
|
return (await import("./farcaster-MF6WINBA.js")).default;
|
|
23464
23551
|
}, []);
|
|
23465
23552
|
const promptText = mobile ? "To sign in with Farcaster, please open the Warpcast app." : "Scan this QR code or open the link with your mobile phone.";
|
|
23466
|
-
return /* @__PURE__ */
|
|
23553
|
+
return /* @__PURE__ */ React207.createElement(
|
|
23467
23554
|
Box,
|
|
23468
23555
|
{
|
|
23469
23556
|
alignItems: "center",
|
|
@@ -23472,8 +23559,8 @@ function FunFarcasterConnectingStep({
|
|
|
23472
23559
|
justifyContent: "center",
|
|
23473
23560
|
gap: "12"
|
|
23474
23561
|
},
|
|
23475
|
-
mobile ? null : /* @__PURE__ */
|
|
23476
|
-
/* @__PURE__ */
|
|
23562
|
+
mobile ? null : /* @__PURE__ */ React207.createElement(QRCode, { logoSize: 60, logoUrl: svgUrl, size: 318, uri: farcasterUri }),
|
|
23563
|
+
/* @__PURE__ */ React207.createElement(
|
|
23477
23564
|
Box,
|
|
23478
23565
|
{
|
|
23479
23566
|
display: "flex",
|
|
@@ -23481,7 +23568,7 @@ function FunFarcasterConnectingStep({
|
|
|
23481
23568
|
gap: "12",
|
|
23482
23569
|
style: { width: 318 }
|
|
23483
23570
|
},
|
|
23484
|
-
/* @__PURE__ */
|
|
23571
|
+
/* @__PURE__ */ React207.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "center", gap: "4" }, mobile ? /* @__PURE__ */ React207.createElement(
|
|
23485
23572
|
FunLinkButton,
|
|
23486
23573
|
{
|
|
23487
23574
|
onClick: () => {
|
|
@@ -23490,8 +23577,8 @@ function FunFarcasterConnectingStep({
|
|
|
23490
23577
|
text: "Open Warpcast",
|
|
23491
23578
|
size: "14"
|
|
23492
23579
|
}
|
|
23493
|
-
) : /* @__PURE__ */
|
|
23494
|
-
/* @__PURE__ */
|
|
23580
|
+
) : /* @__PURE__ */ React207.createElement(Box, { paddingRight: "8" }, /* @__PURE__ */ React207.createElement(Text, { size: "14" }, "Warpcast Link")), mobile ? null : /* @__PURE__ */ React207.createElement(OldCopyAddressButton, { address: farcasterUri }), /* @__PURE__ */ React207.createElement(FunRedirectButton, { to: farcasterUri, size: "32" })),
|
|
23581
|
+
/* @__PURE__ */ React207.createElement(
|
|
23495
23582
|
Text,
|
|
23496
23583
|
{
|
|
23497
23584
|
size: "13",
|
|
@@ -23507,12 +23594,12 @@ function FunFarcasterConnectingStep({
|
|
|
23507
23594
|
|
|
23508
23595
|
// src/components/FunConnectOptions/FunWeb2ConnectingStep.tsx
|
|
23509
23596
|
import { isNotNullish as isNotNullish10 } from "@funkit/utils";
|
|
23510
|
-
import
|
|
23597
|
+
import React209, { useCallback as useCallback37, useEffect as useEffect42, useState as useState53 } from "react";
|
|
23511
23598
|
|
|
23512
23599
|
// src/components/Icons/MailIcon.tsx
|
|
23513
|
-
import
|
|
23600
|
+
import React208 from "react";
|
|
23514
23601
|
var MailIcon = ({ width = 39 }) => {
|
|
23515
|
-
return /* @__PURE__ */
|
|
23602
|
+
return /* @__PURE__ */ React208.createElement(
|
|
23516
23603
|
"svg",
|
|
23517
23604
|
{
|
|
23518
23605
|
width,
|
|
@@ -23520,7 +23607,7 @@ var MailIcon = ({ width = 39 }) => {
|
|
|
23520
23607
|
fill: "none",
|
|
23521
23608
|
xmlns: "http://www.w3.org/2000/svg"
|
|
23522
23609
|
},
|
|
23523
|
-
/* @__PURE__ */
|
|
23610
|
+
/* @__PURE__ */ React208.createElement(
|
|
23524
23611
|
"path",
|
|
23525
23612
|
{
|
|
23526
23613
|
d: "M5.78438 27.4531C4.10729 27.4531 2.83125 27.0208 1.95625 26.1562C1.09167 25.2917 0.659378 24.0312 0.659378 22.375V5.09375C0.659378 3.42708 1.07604 2.16667 1.90938 1.3125C2.74271 0.447917 3.90417 0.015625 5.39375 0.015625H33.7844C35.4719 0.015625 36.7479 0.447917 37.6125 1.3125C38.4875 2.16667 38.925 3.42708 38.925 5.09375V22.375C38.925 24.0312 38.5083 25.2917 37.675 26.1562C36.8417 27.0208 35.6802 27.4531 34.1906 27.4531H5.78438ZM5.78438 24.5625H33.7844C34.5031 24.5625 35.0604 24.3698 35.4563 23.9844C35.8521 23.599 36.05 23.0365 36.05 22.2969V5.17188C36.05 4.43229 35.8521 3.86979 35.4563 3.48438C35.0604 3.09896 34.5031 2.90625 33.7844 2.90625H5.78438C5.06563 2.90625 4.50834 3.09896 4.1125 3.48438C3.72709 3.86979 3.53438 4.42708 3.53438 5.15625V22.2812C3.53438 23.0312 3.72709 23.599 4.1125 23.9844C4.50834 24.3698 5.06563 24.5625 5.78438 24.5625ZM19.7844 18C19.2531 18 18.7375 17.901 18.2375 17.7031C17.7479 17.5052 17.2635 17.1875 16.7844 16.75L2.175 3.60938L4.05 1.71875L18.3781 14.6406C18.826 15.0469 19.2948 15.25 19.7844 15.25C20.274 15.25 20.7427 15.0469 21.1906 14.6406L35.5188 1.71875L37.3938 3.60938L22.7844 16.75C22.3052 17.1875 21.8156 17.5052 21.3156 17.7031C20.826 17.901 20.3156 18 19.7844 18ZM4.31563 25.2031L2.44063 23.3125L13.4875 12.2656L15.3625 14.125L4.31563 25.2031ZM35.2844 25.2188L24.2063 14.125L26.0969 12.2656L37.1594 23.3281L35.2844 25.2188Z",
|
|
@@ -23560,14 +23647,14 @@ var FunWeb2ConnectingStep = ({
|
|
|
23560
23647
|
},
|
|
23561
23648
|
[handleFunkitWeb2Login, initialChainId, emailInput]
|
|
23562
23649
|
);
|
|
23563
|
-
return /* @__PURE__ */
|
|
23650
|
+
return /* @__PURE__ */ React209.createElement(Box, { display: "flex", flexDirection: "column", gap: "24" }, /* @__PURE__ */ React209.createElement(
|
|
23564
23651
|
FunMessage,
|
|
23565
23652
|
{
|
|
23566
23653
|
title: "Enter confirmation code",
|
|
23567
23654
|
description: `Please check ${emailInput} for an email from ${AUTH_PROVIDER} and enter your code below.`,
|
|
23568
|
-
icon: /* @__PURE__ */
|
|
23655
|
+
icon: /* @__PURE__ */ React209.createElement(MailIcon, null)
|
|
23569
23656
|
}
|
|
23570
|
-
), /* @__PURE__ */
|
|
23657
|
+
), /* @__PURE__ */ React209.createElement(
|
|
23571
23658
|
FunTwoFaInput,
|
|
23572
23659
|
{
|
|
23573
23660
|
value: otpInput,
|
|
@@ -23583,7 +23670,7 @@ var FunWeb2ConnectingStep = ({
|
|
|
23583
23670
|
onResend: () => handleSendOtpEmail(emailInput),
|
|
23584
23671
|
hasResent: isSendingOtpEmail
|
|
23585
23672
|
}
|
|
23586
|
-
), /* @__PURE__ */
|
|
23673
|
+
), /* @__PURE__ */ React209.createElement(
|
|
23587
23674
|
FunButton,
|
|
23588
23675
|
{
|
|
23589
23676
|
isDisabled: true,
|
|
@@ -23594,10 +23681,10 @@ var FunWeb2ConnectingStep = ({
|
|
|
23594
23681
|
};
|
|
23595
23682
|
|
|
23596
23683
|
// src/components/FunConnectOptions/FunWeb3ConnectingStep.tsx
|
|
23597
|
-
import
|
|
23684
|
+
import React211 from "react";
|
|
23598
23685
|
|
|
23599
23686
|
// src/components/GradientLoader/GradientLoader.tsx
|
|
23600
|
-
import
|
|
23687
|
+
import React210 from "react";
|
|
23601
23688
|
|
|
23602
23689
|
// src/components/GradientLoader/GradientLoader.css.ts
|
|
23603
23690
|
var loader = "m17uwo1";
|
|
@@ -23607,7 +23694,7 @@ var GradientLoader = ({
|
|
|
23607
23694
|
height = "100",
|
|
23608
23695
|
width = "100"
|
|
23609
23696
|
}) => {
|
|
23610
|
-
return /* @__PURE__ */
|
|
23697
|
+
return /* @__PURE__ */ React210.createElement(
|
|
23611
23698
|
Box,
|
|
23612
23699
|
{
|
|
23613
23700
|
className: loader,
|
|
@@ -23625,7 +23712,7 @@ var FunWeb3ConnectingStep = ({ selectedWallet, qrCodeUri }) => {
|
|
|
23625
23712
|
if (!selectedWallet) return null;
|
|
23626
23713
|
const { iconBackground, iconUrl, name, qrCode, ready } = selectedWallet;
|
|
23627
23714
|
const hasQrCode = qrCode && qrCodeUri;
|
|
23628
|
-
const waitingMessage = /* @__PURE__ */
|
|
23715
|
+
const waitingMessage = /* @__PURE__ */ React211.createElement(
|
|
23629
23716
|
FunMessage,
|
|
23630
23717
|
{
|
|
23631
23718
|
title: `Waiting for ${hasQrCode ? "connection" : name}`,
|
|
@@ -23633,7 +23720,7 @@ var FunWeb3ConnectingStep = ({ selectedWallet, qrCodeUri }) => {
|
|
|
23633
23720
|
id: "link-text"
|
|
23634
23721
|
}
|
|
23635
23722
|
);
|
|
23636
|
-
return /* @__PURE__ */
|
|
23723
|
+
return /* @__PURE__ */ React211.createElement(Box, { display: "flex", flexDirection: "column", gap: "24" }, hasQrCode ? /* @__PURE__ */ React211.createElement(
|
|
23637
23724
|
Box,
|
|
23638
23725
|
{
|
|
23639
23726
|
alignItems: "center",
|
|
@@ -23643,7 +23730,7 @@ var FunWeb3ConnectingStep = ({ selectedWallet, qrCodeUri }) => {
|
|
|
23643
23730
|
gap: "12",
|
|
23644
23731
|
flexDirection: "column"
|
|
23645
23732
|
},
|
|
23646
|
-
/* @__PURE__ */
|
|
23733
|
+
/* @__PURE__ */ React211.createElement(
|
|
23647
23734
|
QRCode,
|
|
23648
23735
|
{
|
|
23649
23736
|
logoBackground: iconBackground,
|
|
@@ -23654,7 +23741,7 @@ var FunWeb3ConnectingStep = ({ selectedWallet, qrCodeUri }) => {
|
|
|
23654
23741
|
}
|
|
23655
23742
|
),
|
|
23656
23743
|
waitingMessage
|
|
23657
|
-
) : /* @__PURE__ */
|
|
23744
|
+
) : /* @__PURE__ */ React211.createElement(
|
|
23658
23745
|
Box,
|
|
23659
23746
|
{
|
|
23660
23747
|
alignItems: "center",
|
|
@@ -23663,7 +23750,7 @@ var FunWeb3ConnectingStep = ({ selectedWallet, qrCodeUri }) => {
|
|
|
23663
23750
|
flexDirection: "column",
|
|
23664
23751
|
gap: "12"
|
|
23665
23752
|
},
|
|
23666
|
-
ready && /* @__PURE__ */
|
|
23753
|
+
ready && /* @__PURE__ */ React211.createElement(React211.Fragment, null, /* @__PURE__ */ React211.createElement(Box, { id: "link-graphics", padding: "30", position: "relative" }, /* @__PURE__ */ React211.createElement(Box, { position: "absolute", style: { top: 0, left: 0 } }, /* @__PURE__ */ React211.createElement(GradientLoader, null)), /* @__PURE__ */ React211.createElement(Box, { style: { width: 40, height: 40 } }, /* @__PURE__ */ React211.createElement(
|
|
23667
23754
|
AsyncImage,
|
|
23668
23755
|
{
|
|
23669
23756
|
background: iconBackground,
|
|
@@ -23788,7 +23875,7 @@ function FunConnectOptions({
|
|
|
23788
23875
|
switch (step) {
|
|
23789
23876
|
case 0 /* SIGNIN_PRIMARY */:
|
|
23790
23877
|
case 1 /* SIGNIN_SECONDARY */:
|
|
23791
|
-
return /* @__PURE__ */
|
|
23878
|
+
return /* @__PURE__ */ React212.createElement(
|
|
23792
23879
|
FunSignInStep,
|
|
23793
23880
|
{
|
|
23794
23881
|
signInStep: step,
|
|
@@ -23808,7 +23895,7 @@ function FunConnectOptions({
|
|
|
23808
23895
|
}
|
|
23809
23896
|
);
|
|
23810
23897
|
case 3 /* PENDING_WALLET */:
|
|
23811
|
-
return /* @__PURE__ */
|
|
23898
|
+
return /* @__PURE__ */ React212.createElement(
|
|
23812
23899
|
FunWeb3ConnectingStep,
|
|
23813
23900
|
{
|
|
23814
23901
|
selectedWallet,
|
|
@@ -23816,9 +23903,9 @@ function FunConnectOptions({
|
|
|
23816
23903
|
}
|
|
23817
23904
|
);
|
|
23818
23905
|
case 2 /* PENDING_EMAIL */:
|
|
23819
|
-
return /* @__PURE__ */
|
|
23906
|
+
return /* @__PURE__ */ React212.createElement(FunWeb2ConnectingStep, { emailInput });
|
|
23820
23907
|
case 4 /* PENDING_FARCASTER */:
|
|
23821
|
-
return /* @__PURE__ */
|
|
23908
|
+
return /* @__PURE__ */ React212.createElement(
|
|
23822
23909
|
FunFarcasterConnectingStep,
|
|
23823
23910
|
{
|
|
23824
23911
|
farcasterUri,
|
|
@@ -23826,7 +23913,7 @@ function FunConnectOptions({
|
|
|
23826
23913
|
}
|
|
23827
23914
|
);
|
|
23828
23915
|
case 5 /* ERROR_WEB3 */:
|
|
23829
|
-
return /* @__PURE__ */
|
|
23916
|
+
return /* @__PURE__ */ React212.createElement(
|
|
23830
23917
|
FunConnectResultStep,
|
|
23831
23918
|
{
|
|
23832
23919
|
onClose,
|
|
@@ -23848,7 +23935,7 @@ function FunConnectOptions({
|
|
|
23848
23935
|
step,
|
|
23849
23936
|
walletsOnly
|
|
23850
23937
|
]);
|
|
23851
|
-
return /* @__PURE__ */
|
|
23938
|
+
return /* @__PURE__ */ React212.createElement(FunCheckoutModalHeightAnimationWrapper, null, /* @__PURE__ */ React212.createElement(Dialog.Title, { onClose, ...navigationConfig[step] }), /* @__PURE__ */ React212.createElement(
|
|
23852
23939
|
Dialog.Content,
|
|
23853
23940
|
{
|
|
23854
23941
|
display: "flex",
|
|
@@ -23860,7 +23947,7 @@ function FunConnectOptions({
|
|
|
23860
23947
|
withBottomDivider: actionConfig[step] ? "always" : "never"
|
|
23861
23948
|
},
|
|
23862
23949
|
stepComponent
|
|
23863
|
-
), /* @__PURE__ */
|
|
23950
|
+
), /* @__PURE__ */ React212.createElement(Dialog.BottomSection, null, actionConfig[step] && /* @__PURE__ */ React212.createElement(Dialog.BottomBar, { ...actionConfig[step] })));
|
|
23864
23951
|
}
|
|
23865
23952
|
|
|
23866
23953
|
// src/components/FunConnectOptions/FunSignInStep.tsx
|
|
@@ -23868,25 +23955,25 @@ var FULL_SOCIAL_LOGIN_OPTIONS = [
|
|
|
23868
23955
|
{
|
|
23869
23956
|
funkitKey: "google_oauth" /* GOOGLE */,
|
|
23870
23957
|
provider: "google",
|
|
23871
|
-
getIcon: (size) => /* @__PURE__ */
|
|
23958
|
+
getIcon: (size) => /* @__PURE__ */ React213.createElement(GoogleIcon, { size }),
|
|
23872
23959
|
name: "Google"
|
|
23873
23960
|
},
|
|
23874
23961
|
{
|
|
23875
23962
|
funkitKey: "twitter_oauth" /* TWITTER */,
|
|
23876
23963
|
provider: "twitter",
|
|
23877
|
-
getIcon: (size) => /* @__PURE__ */
|
|
23964
|
+
getIcon: (size) => /* @__PURE__ */ React213.createElement(TwitterIcon, { size }),
|
|
23878
23965
|
name: "Twitter"
|
|
23879
23966
|
},
|
|
23880
23967
|
{
|
|
23881
23968
|
funkitKey: "apple_oauth" /* APPLE */,
|
|
23882
23969
|
provider: "apple",
|
|
23883
|
-
getIcon: (size) => /* @__PURE__ */
|
|
23970
|
+
getIcon: (size) => /* @__PURE__ */ React213.createElement(AppleIcon, { size }),
|
|
23884
23971
|
name: "Apple"
|
|
23885
23972
|
},
|
|
23886
23973
|
{
|
|
23887
23974
|
funkitKey: "farcaster" /* FARCASTER */,
|
|
23888
23975
|
provider: "farcaster",
|
|
23889
|
-
getIcon: (size) => /* @__PURE__ */
|
|
23976
|
+
getIcon: (size) => /* @__PURE__ */ React213.createElement(FarcasterIcon, { size }),
|
|
23890
23977
|
name: "Farcaster"
|
|
23891
23978
|
}
|
|
23892
23979
|
];
|
|
@@ -24033,14 +24120,14 @@ function FunSignInStep({
|
|
|
24033
24120
|
changeStep(1 /* SIGNIN_SECONDARY */);
|
|
24034
24121
|
};
|
|
24035
24122
|
const makeWeb2LoginSection = (isCollapsed) => {
|
|
24036
|
-
return isCollapsed ? /* @__PURE__ */
|
|
24123
|
+
return isCollapsed ? /* @__PURE__ */ React213.createElement(
|
|
24037
24124
|
FunSignInButton,
|
|
24038
24125
|
{
|
|
24039
24126
|
title: `Log in with email${hasAnySocialEnabled ? " or socials" : ""}`,
|
|
24040
24127
|
onClick: () => handleSectionSelect("web2"),
|
|
24041
|
-
titlePrefix: /* @__PURE__ */
|
|
24128
|
+
titlePrefix: /* @__PURE__ */ React213.createElement(SocialsIcon, null)
|
|
24042
24129
|
}
|
|
24043
|
-
) : /* @__PURE__ */
|
|
24130
|
+
) : /* @__PURE__ */ React213.createElement(Box, { display: "flex", gap: "12", flexDirection: "column" }, /* @__PURE__ */ React213.createElement(
|
|
24044
24131
|
FunInput,
|
|
24045
24132
|
{
|
|
24046
24133
|
placeholder: "Enter your email",
|
|
@@ -24051,7 +24138,7 @@ function FunSignInStep({
|
|
|
24051
24138
|
setEmailError(void 0);
|
|
24052
24139
|
},
|
|
24053
24140
|
onKeySubmit: handleEmailSubmit,
|
|
24054
|
-
suffix: /* @__PURE__ */
|
|
24141
|
+
suffix: /* @__PURE__ */ React213.createElement(
|
|
24055
24142
|
FunButton,
|
|
24056
24143
|
{
|
|
24057
24144
|
type: "tertiary",
|
|
@@ -24063,7 +24150,7 @@ function FunSignInStep({
|
|
|
24063
24150
|
}
|
|
24064
24151
|
)
|
|
24065
24152
|
}
|
|
24066
|
-
), !!hasAnySocialEnabled && /* @__PURE__ */
|
|
24153
|
+
), !!hasAnySocialEnabled && /* @__PURE__ */ React213.createElement(React213.Fragment, null, signInStep === 1 /* SIGNIN_SECONDARY */ && /* @__PURE__ */ React213.createElement(
|
|
24067
24154
|
FunDivider,
|
|
24068
24155
|
{
|
|
24069
24156
|
label: "or",
|
|
@@ -24071,7 +24158,7 @@ function FunSignInStep({
|
|
|
24071
24158
|
marginBottom: "12",
|
|
24072
24159
|
borderColor: "selectedOptionBorder"
|
|
24073
24160
|
}
|
|
24074
|
-
), /* @__PURE__ */
|
|
24161
|
+
), /* @__PURE__ */ React213.createElement(
|
|
24075
24162
|
FunSocials,
|
|
24076
24163
|
{
|
|
24077
24164
|
options: enabledSocialItems,
|
|
@@ -24083,15 +24170,15 @@ function FunSignInStep({
|
|
|
24083
24170
|
const isWeb2SectionCollapsed = canOpenSecondaryStep && prioritizedLoginType === "web3";
|
|
24084
24171
|
const Web2LoginSection = loginConfig.web2 ? makeWeb2LoginSection(isWeb2SectionCollapsed) : null;
|
|
24085
24172
|
const makeWeb3LoginSection = (isCollapsed) => {
|
|
24086
|
-
return isCollapsed ? /* @__PURE__ */
|
|
24173
|
+
return isCollapsed ? /* @__PURE__ */ React213.createElement(
|
|
24087
24174
|
FunSignInButton,
|
|
24088
24175
|
{
|
|
24089
24176
|
title: "Connect wallet",
|
|
24090
|
-
titlePrefix: /* @__PURE__ */
|
|
24177
|
+
titlePrefix: /* @__PURE__ */ React213.createElement(CryptoIcon, null),
|
|
24091
24178
|
onClick: () => handleSectionSelect("web3")
|
|
24092
24179
|
}
|
|
24093
|
-
) : /* @__PURE__ */
|
|
24094
|
-
return /* @__PURE__ */
|
|
24180
|
+
) : /* @__PURE__ */ React213.createElement(Box, { display: "flex", flexDirection: "column", gap: "10" }, funWeb3ConnectWallets.map((wallet) => {
|
|
24181
|
+
return /* @__PURE__ */ React213.createElement(
|
|
24095
24182
|
ModalSelection,
|
|
24096
24183
|
{
|
|
24097
24184
|
currentlySelected: wallet.id === selectedOptionId,
|
|
@@ -24111,16 +24198,16 @@ function FunSignInStep({
|
|
|
24111
24198
|
const isWeb3SectionVisible = (loginConfig.web3 || walletsOnly) && funWeb3ConnectWallets.length > 0;
|
|
24112
24199
|
const Web3LoginSection = isWeb3SectionVisible ? makeWeb3LoginSection(isWeb3SectionCollapsed) : null;
|
|
24113
24200
|
if (walletsOnly) {
|
|
24114
|
-
return /* @__PURE__ */
|
|
24201
|
+
return /* @__PURE__ */ React213.createElement(Box, { display: "flex", flexDirection: "column", gap: "24" }, Web3LoginSection);
|
|
24115
24202
|
}
|
|
24116
24203
|
const primaryLoginSection = prioritizedLoginType === "web3" ? Web3LoginSection : Web2LoginSection;
|
|
24117
24204
|
const secondaryLoginSection = prioritizedLoginType === "web3" ? Web2LoginSection : Web3LoginSection;
|
|
24118
|
-
return /* @__PURE__ */
|
|
24205
|
+
return /* @__PURE__ */ React213.createElement(Box, { display: "flex", flexDirection: "column", gap: "24" }, signInStep === 0 /* SIGNIN_PRIMARY */ ? /* @__PURE__ */ React213.createElement(Fragment3, null, primaryLoginSection, !!primaryLoginSection && !!secondaryLoginSection && /* @__PURE__ */ React213.createElement(FunDivider, { label: "or", borderColor: "selectedOptionBorder" }), secondaryLoginSection) : secondaryLoginSection);
|
|
24119
24206
|
}
|
|
24120
24207
|
|
|
24121
24208
|
// src/components/Icons/BrokerageIcon.tsx
|
|
24122
|
-
import
|
|
24123
|
-
var BrokerageIcon = ({ size = 20 }) => /* @__PURE__ */
|
|
24209
|
+
import React214 from "react";
|
|
24210
|
+
var BrokerageIcon = ({ size = 20 }) => /* @__PURE__ */ React214.createElement(
|
|
24124
24211
|
"svg",
|
|
24125
24212
|
{
|
|
24126
24213
|
width: size,
|
|
@@ -24129,7 +24216,7 @@ var BrokerageIcon = ({ size = 20 }) => /* @__PURE__ */ React213.createElement(
|
|
|
24129
24216
|
fill: "none",
|
|
24130
24217
|
xmlns: "http://www.w3.org/2000/svg"
|
|
24131
24218
|
},
|
|
24132
|
-
/* @__PURE__ */
|
|
24219
|
+
/* @__PURE__ */ React214.createElement(
|
|
24133
24220
|
"path",
|
|
24134
24221
|
{
|
|
24135
24222
|
fillRule: "evenodd",
|
|
@@ -24141,8 +24228,8 @@ var BrokerageIcon = ({ size = 20 }) => /* @__PURE__ */ React213.createElement(
|
|
|
24141
24228
|
);
|
|
24142
24229
|
|
|
24143
24230
|
// src/components/Icons/EvmWallet.tsx
|
|
24144
|
-
import
|
|
24145
|
-
var EvmWallet = ({ size = 20 }) => /* @__PURE__ */
|
|
24231
|
+
import React215 from "react";
|
|
24232
|
+
var EvmWallet = ({ size = 20 }) => /* @__PURE__ */ React215.createElement(
|
|
24146
24233
|
"svg",
|
|
24147
24234
|
{
|
|
24148
24235
|
width: size,
|
|
@@ -24151,7 +24238,7 @@ var EvmWallet = ({ size = 20 }) => /* @__PURE__ */ React214.createElement(
|
|
|
24151
24238
|
fill: "none",
|
|
24152
24239
|
xmlns: "http://www.w3.org/2000/svg"
|
|
24153
24240
|
},
|
|
24154
|
-
/* @__PURE__ */
|
|
24241
|
+
/* @__PURE__ */ React215.createElement(
|
|
24155
24242
|
"path",
|
|
24156
24243
|
{
|
|
24157
24244
|
fillRule: "evenodd",
|
|
@@ -24160,7 +24247,7 @@ var EvmWallet = ({ size = 20 }) => /* @__PURE__ */ React214.createElement(
|
|
|
24160
24247
|
fill: "currentColor"
|
|
24161
24248
|
}
|
|
24162
24249
|
),
|
|
24163
|
-
/* @__PURE__ */
|
|
24250
|
+
/* @__PURE__ */ React215.createElement(
|
|
24164
24251
|
"path",
|
|
24165
24252
|
{
|
|
24166
24253
|
d: "M14.2837 4.86975V3.44021C14.2837 2.68193 13.9827 1.95471 13.4469 1.41853C12.911 0.882349 12.1843 0.581124 11.4265 0.581124L3.56941 0.581124C3.00109 0.581124 2.45604 0.807044 2.05418 1.20918C1.65231 1.61132 1.42655 2.15673 1.42655 2.72544C1.42655 3.29414 1.65231 3.83956 2.05418 4.2417C2.45604 4.64383 3.00109 4.86975 3.56941 4.86975L14.2837 4.86975Z",
|
|
@@ -24171,10 +24258,10 @@ var EvmWallet = ({ size = 20 }) => /* @__PURE__ */ React214.createElement(
|
|
|
24171
24258
|
|
|
24172
24259
|
// src/hooks/usePaymentMethodIcon.tsx
|
|
24173
24260
|
var PAYMENT_METHOD_ICONS = {
|
|
24174
|
-
["brokerage" /* BROKERAGE */]: (size) => /* @__PURE__ */
|
|
24175
|
-
["card" /* CARD */]: (size) => /* @__PURE__ */
|
|
24176
|
-
["token_transfer" /* TOKEN_TRANSFER */]: (size) => /* @__PURE__ */
|
|
24177
|
-
["virtual_bank" /* VIRTUAL_BANK */]: (size) => /* @__PURE__ */
|
|
24261
|
+
["brokerage" /* BROKERAGE */]: (size) => /* @__PURE__ */ React216.createElement(BrokerageIcon, { size }),
|
|
24262
|
+
["card" /* CARD */]: (size) => /* @__PURE__ */ React216.createElement(CreditCardIcon, { size }),
|
|
24263
|
+
["token_transfer" /* TOKEN_TRANSFER */]: (size) => /* @__PURE__ */ React216.createElement(LightningBoltIcon, { size }),
|
|
24264
|
+
["virtual_bank" /* VIRTUAL_BANK */]: (size) => /* @__PURE__ */ React216.createElement(BankIcon, { size })
|
|
24178
24265
|
};
|
|
24179
24266
|
var DEFAULT_PAYMENT_METHOD_ICON_SIZE = 20;
|
|
24180
24267
|
function usePaymentMethodIcon(paymentMethod, iconSize = DEFAULT_PAYMENT_METHOD_ICON_SIZE) {
|
|
@@ -24188,7 +24275,7 @@ function usePaymentMethodIcon(paymentMethod, iconSize = DEFAULT_PAYMENT_METHOD_I
|
|
|
24188
24275
|
if (loginType === "web2" /* Web2 */) {
|
|
24189
24276
|
const userType = userInfo.type;
|
|
24190
24277
|
if (userType === "email" /* email */) {
|
|
24191
|
-
return /* @__PURE__ */
|
|
24278
|
+
return /* @__PURE__ */ React216.createElement(MailIcon, { width: iconSize });
|
|
24192
24279
|
}
|
|
24193
24280
|
for (const item of enabledSocialLogins) {
|
|
24194
24281
|
if (item.funkitKey === userType) {
|
|
@@ -24198,7 +24285,7 @@ function usePaymentMethodIcon(paymentMethod, iconSize = DEFAULT_PAYMENT_METHOD_I
|
|
|
24198
24285
|
} else if (loginType === "web3" /* Web3 */) {
|
|
24199
24286
|
const iconUrl = wallets.find((w) => w.id === connector?.id)?.iconUrl || connector?.icon;
|
|
24200
24287
|
if (iconUrl) {
|
|
24201
|
-
return /* @__PURE__ */
|
|
24288
|
+
return /* @__PURE__ */ React216.createElement(
|
|
24202
24289
|
AsyncImage,
|
|
24203
24290
|
{
|
|
24204
24291
|
useAsImage: true,
|
|
@@ -24206,18 +24293,18 @@ function usePaymentMethodIcon(paymentMethod, iconSize = DEFAULT_PAYMENT_METHOD_I
|
|
|
24206
24293
|
width: iconSize,
|
|
24207
24294
|
borderRadius: "6",
|
|
24208
24295
|
src: iconUrl,
|
|
24209
|
-
fallbackElement: /* @__PURE__ */
|
|
24296
|
+
fallbackElement: /* @__PURE__ */ React216.createElement(EvmWallet, { size: iconSize })
|
|
24210
24297
|
}
|
|
24211
24298
|
);
|
|
24212
24299
|
}
|
|
24213
24300
|
}
|
|
24214
|
-
return /* @__PURE__ */
|
|
24301
|
+
return /* @__PURE__ */ React216.createElement(EvmWallet, { size: iconSize });
|
|
24215
24302
|
}
|
|
24216
24303
|
var usePaymentMethodInfoLabel = (methodInfo, iconSize = DEFAULT_PAYMENT_METHOD_ICON_SIZE) => {
|
|
24217
24304
|
const { textCustomizations } = useFunkitConfig();
|
|
24218
24305
|
const paymentIcon = usePaymentMethodIcon(methodInfo.paymentMethod, iconSize);
|
|
24219
24306
|
if (methodInfo.paymentMethod === "card" /* CARD */) {
|
|
24220
|
-
return { text: "", icon: /* @__PURE__ */
|
|
24307
|
+
return { text: "", icon: /* @__PURE__ */ React216.createElement(CombinedCreditCardOptionsIcon, null) };
|
|
24221
24308
|
}
|
|
24222
24309
|
if (methodInfo.paymentMethod === "brokerage" /* BROKERAGE */) {
|
|
24223
24310
|
const icon2 = getExchangeIcon(methodInfo.meta.brokerType, iconSize);
|
|
@@ -24229,16 +24316,16 @@ var usePaymentMethodInfoLabel = (methodInfo, iconSize = DEFAULT_PAYMENT_METHOD_I
|
|
|
24229
24316
|
methodInfo.title,
|
|
24230
24317
|
methodInfo.matchingFiatAccount
|
|
24231
24318
|
),
|
|
24232
|
-
icon: /* @__PURE__ */
|
|
24319
|
+
icon: /* @__PURE__ */ React216.createElement(
|
|
24233
24320
|
PaymentMethodIcon,
|
|
24234
24321
|
{
|
|
24235
24322
|
keyIconSize: iconSize,
|
|
24236
|
-
paymentIcon: /* @__PURE__ */
|
|
24323
|
+
paymentIcon: /* @__PURE__ */ React216.createElement(BankIconActive, { size: iconSize })
|
|
24237
24324
|
}
|
|
24238
24325
|
)
|
|
24239
24326
|
};
|
|
24240
24327
|
}
|
|
24241
|
-
const icon = /* @__PURE__ */
|
|
24328
|
+
const icon = /* @__PURE__ */ React216.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "center" }, paymentIcon);
|
|
24242
24329
|
if (methodInfo.paymentMethod === "balance" /* ACCOUNT_BALANCE */) {
|
|
24243
24330
|
const label = getWalletLabel(textCustomizations, methodInfo.description);
|
|
24244
24331
|
return { text: label, icon };
|
|
@@ -24253,12 +24340,12 @@ var PaymentSource = ({
|
|
|
24253
24340
|
redirect
|
|
24254
24341
|
}) => {
|
|
24255
24342
|
const label = usePaymentMethodInfoLabel(paymentMethodInfo, 15);
|
|
24256
|
-
return /* @__PURE__ */
|
|
24343
|
+
return /* @__PURE__ */ React217.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React217.createElement(
|
|
24257
24344
|
FunTxSummaryLineItemKeyText,
|
|
24258
24345
|
{
|
|
24259
24346
|
text: isSameDestination ? "Wallet" : "Source"
|
|
24260
24347
|
}
|
|
24261
|
-
), /* @__PURE__ */
|
|
24348
|
+
), /* @__PURE__ */ React217.createElement(Box, { display: "flex", alignItems: "center", gap: "5", color: "primaryText" }, label.icon, label.text && /* @__PURE__ */ React217.createElement(Text, { size: "12", weight: "medium" }, label.text), redirect));
|
|
24262
24349
|
};
|
|
24263
24350
|
var PaymentDestination = ({
|
|
24264
24351
|
destinationConfig,
|
|
@@ -24268,8 +24355,8 @@ var PaymentDestination = ({
|
|
|
24268
24355
|
const { walletAddress } = useGeneralWallet();
|
|
24269
24356
|
const walletIcon = usePaymentMethodIcon("balance" /* ACCOUNT_BALANCE */, 15);
|
|
24270
24357
|
const destinationIcon = destinationConfig?.icon ?? walletIcon;
|
|
24271
|
-
const destinationAddress = customRecipient
|
|
24272
|
-
return /* @__PURE__ */
|
|
24358
|
+
const destinationAddress = customRecipient || walletAddress || "";
|
|
24359
|
+
return /* @__PURE__ */ React217.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React217.createElement(FunTxSummaryLineItemKeyText, { text: "Destination" }), /* @__PURE__ */ React217.createElement(Box, { display: "flex", alignItems: "center", gap: "5" }, /* @__PURE__ */ React217.createElement(Box, { width: "15", height: "15", display: "flex", alignItems: "center" }, destinationIcon), /* @__PURE__ */ React217.createElement(Text, { weight: "medium", size: "12" }, destinationConfig?.text ?? formatAddress5(destinationAddress)), redirect));
|
|
24273
24360
|
};
|
|
24274
24361
|
var PaymentRouteSummary = ({
|
|
24275
24362
|
paymentMethodInfo,
|
|
@@ -24281,14 +24368,14 @@ var PaymentRouteSummary = ({
|
|
|
24281
24368
|
const customDestinationConfig = uiCustomizations?.confirmationScreen?.destinationConfig;
|
|
24282
24369
|
const isAccountPayment = paymentMethodInfo?.paymentMethod === "balance" /* ACCOUNT_BALANCE */;
|
|
24283
24370
|
const isSameDestination = isAccountPayment && !customRecipient && !isVertexCustomer(apiKey);
|
|
24284
|
-
return /* @__PURE__ */
|
|
24371
|
+
return /* @__PURE__ */ React217.createElement(React217.Fragment, null, paymentMethodInfo && /* @__PURE__ */ React217.createElement(
|
|
24285
24372
|
PaymentSource,
|
|
24286
24373
|
{
|
|
24287
24374
|
isSameDestination,
|
|
24288
24375
|
paymentMethodInfo,
|
|
24289
24376
|
redirect: sourceRedirect
|
|
24290
24377
|
}
|
|
24291
|
-
), (!isSameDestination || customDestinationConfig) && /* @__PURE__ */
|
|
24378
|
+
), (!isSameDestination || customDestinationConfig) && /* @__PURE__ */ React217.createElement(React217.Fragment, null, /* @__PURE__ */ React217.createElement(FunDivider, { marginTop: "12", marginBottom: "12" }), /* @__PURE__ */ React217.createElement(
|
|
24292
24379
|
PaymentDestination,
|
|
24293
24380
|
{
|
|
24294
24381
|
destinationConfig: customDestinationConfig,
|
|
@@ -24297,7 +24384,7 @@ var PaymentRouteSummary = ({
|
|
|
24297
24384
|
}
|
|
24298
24385
|
)));
|
|
24299
24386
|
};
|
|
24300
|
-
var PaymentRouteSummarySkeletonLoader = () => /* @__PURE__ */
|
|
24387
|
+
var PaymentRouteSummarySkeletonLoader = () => /* @__PURE__ */ React217.createElement(
|
|
24301
24388
|
Box,
|
|
24302
24389
|
{
|
|
24303
24390
|
width: "full",
|
|
@@ -24305,8 +24392,8 @@ var PaymentRouteSummarySkeletonLoader = () => /* @__PURE__ */ React216.createEle
|
|
|
24305
24392
|
justifyContent: "space-between",
|
|
24306
24393
|
alignItems: "center"
|
|
24307
24394
|
},
|
|
24308
|
-
/* @__PURE__ */
|
|
24309
|
-
/* @__PURE__ */
|
|
24395
|
+
/* @__PURE__ */ React217.createElement(FunSkeletonBlock, { height: "10", width: "44" }),
|
|
24396
|
+
/* @__PURE__ */ React217.createElement(Box, { display: "flex", gap: "5", alignItems: "center" }, /* @__PURE__ */ React217.createElement(FunSkeletonCircle, { size: "15" }), /* @__PURE__ */ React217.createElement(FunSkeletonBlock, { height: "10", width: "72" }))
|
|
24310
24397
|
);
|
|
24311
24398
|
|
|
24312
24399
|
// src/components/FunCheckoutHistory/FunCheckoutHistoryTransaction.css.ts
|
|
@@ -24314,7 +24401,7 @@ var expandableTriggerBaseStyles = "mxvati0";
|
|
|
24314
24401
|
|
|
24315
24402
|
// src/components/FunCheckoutHistory/FunCheckoutHistoryTransaction.tsx
|
|
24316
24403
|
function FunTxSummaryLineItemKeyText2({ text }) {
|
|
24317
|
-
return /* @__PURE__ */
|
|
24404
|
+
return /* @__PURE__ */ React218.createElement(
|
|
24318
24405
|
Text,
|
|
24319
24406
|
{
|
|
24320
24407
|
weight: "medium",
|
|
@@ -24337,7 +24424,7 @@ function StatusTag({ state, refundState, isDelayed: isDelayed2 }) {
|
|
|
24337
24424
|
refundState
|
|
24338
24425
|
);
|
|
24339
24426
|
const color = isCompleted || isRefundProceeded ? "success" : "secondaryText";
|
|
24340
|
-
return /* @__PURE__ */
|
|
24427
|
+
return /* @__PURE__ */ React218.createElement(Text, { color, size: "12", weight: "medium" }, isRefundProceeded ? statusNamingMap.completed : refundState === "REFUNDED" ? "Refunded" : (
|
|
24341
24428
|
// With some hardcoded timings in `FunCheckoutStatus`, it is possible for isDelayed to stay true while isCompleted is already true
|
|
24342
24429
|
isDelayed2 && !isCompleted ? "Pending" : statusNamingMap[status]
|
|
24343
24430
|
));
|
|
@@ -24346,7 +24433,7 @@ var ReceivedAmount = ({ config }) => {
|
|
|
24346
24433
|
const receivedAmountDisplay = useCheckoutItemDisplay({
|
|
24347
24434
|
checkoutConfig: config
|
|
24348
24435
|
});
|
|
24349
|
-
return /* @__PURE__ */
|
|
24436
|
+
return /* @__PURE__ */ React218.createElement(Box, { display: "flex", gap: "5", alignItems: "center" }, /* @__PURE__ */ React218.createElement(
|
|
24350
24437
|
AsyncImage,
|
|
24351
24438
|
{
|
|
24352
24439
|
src: config.iconSrc ?? FALLBACK_ASSET,
|
|
@@ -24355,7 +24442,7 @@ var ReceivedAmount = ({ config }) => {
|
|
|
24355
24442
|
height: 15,
|
|
24356
24443
|
useAsImage: true
|
|
24357
24444
|
}
|
|
24358
|
-
), /* @__PURE__ */
|
|
24445
|
+
), /* @__PURE__ */ React218.createElement(Text, { size: "12", weight: "medium" }, receivedAmountDisplay));
|
|
24359
24446
|
};
|
|
24360
24447
|
function FunTxSummaryHistory({
|
|
24361
24448
|
checkoutHistoryItem,
|
|
@@ -24368,28 +24455,28 @@ function FunTxSummaryHistory({
|
|
|
24368
24455
|
const customDestinationConfig = uiCustomizations?.confirmationScreen?.destinationConfig;
|
|
24369
24456
|
const isAccountPayment = checkoutItem && checkoutItem.selectedPaymentMethodInfo?.paymentMethod === "balance" /* ACCOUNT_BALANCE */;
|
|
24370
24457
|
const sourceRedirectAddress = isAccountPayment ? checkoutHistoryItem?.sourceOfFund?.split("|")?.[2] : null;
|
|
24371
|
-
return /* @__PURE__ */
|
|
24458
|
+
return /* @__PURE__ */ React218.createElement(React218.Fragment, null, /* @__PURE__ */ React218.createElement(FunTxSummaryBox, null, /* @__PURE__ */ React218.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React218.createElement(FunTxSummaryLineItemKeyText2, { text: "Fill status" }), isCheckoutItemLoaded ? /* @__PURE__ */ React218.createElement(
|
|
24372
24459
|
StatusTag,
|
|
24373
24460
|
{
|
|
24374
24461
|
state: checkoutHistoryItem.state,
|
|
24375
24462
|
refundState: checkoutHistoryItem.refundState,
|
|
24376
24463
|
isDelayed: isDelayed2
|
|
24377
24464
|
}
|
|
24378
|
-
) : /* @__PURE__ */
|
|
24465
|
+
) : /* @__PURE__ */ React218.createElement(FunSkeletonBlock, { height: "10", width: "44" })), isCompleted && /* @__PURE__ */ React218.createElement(React218.Fragment, null, /* @__PURE__ */ React218.createElement(FunDivider, { marginTop: "12", marginBottom: "12" }), /* @__PURE__ */ React218.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React218.createElement(FunTxSummaryLineItemKeyText2, { text: "Total time" }), /* @__PURE__ */ React218.createElement(Text, { weight: "medium", size: "12" }, formatSecondsToReadableForm4(
|
|
24379
24466
|
getCheckoutCompletionTime(checkoutHistoryItem)
|
|
24380
|
-
))))), /* @__PURE__ */
|
|
24467
|
+
))))), /* @__PURE__ */ React218.createElement(FunTxSummaryBox, null, checkoutItem ? /* @__PURE__ */ React218.createElement(
|
|
24381
24468
|
PaymentRouteSummary,
|
|
24382
24469
|
{
|
|
24383
24470
|
paymentMethodInfo: checkoutItem.selectedPaymentMethodInfo,
|
|
24384
24471
|
customRecipient: checkoutItem.initSettings.config.customRecipient,
|
|
24385
|
-
sourceRedirect: sourceRedirectAddress ? /* @__PURE__ */
|
|
24472
|
+
sourceRedirect: sourceRedirectAddress ? /* @__PURE__ */ React218.createElement(
|
|
24386
24473
|
AddressRedirectButton,
|
|
24387
24474
|
{
|
|
24388
24475
|
chainId: checkoutHistoryItem.fromChainId,
|
|
24389
24476
|
address: sourceRedirectAddress
|
|
24390
24477
|
}
|
|
24391
24478
|
) : void 0,
|
|
24392
|
-
destinationRedirect: /* @__PURE__ */
|
|
24479
|
+
destinationRedirect: /* @__PURE__ */ React218.createElement(
|
|
24393
24480
|
AddressRedirectButton,
|
|
24394
24481
|
{
|
|
24395
24482
|
chainId: checkoutHistoryItem.toChainId,
|
|
@@ -24398,7 +24485,7 @@ function FunTxSummaryHistory({
|
|
|
24398
24485
|
}
|
|
24399
24486
|
)
|
|
24400
24487
|
}
|
|
24401
|
-
) : /* @__PURE__ */
|
|
24488
|
+
) : /* @__PURE__ */ React218.createElement(PaymentRouteSummarySkeletonLoader, null)), /* @__PURE__ */ React218.createElement(FunTxSummaryBox, null, /* @__PURE__ */ React218.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React218.createElement(FunTxSummaryLineItemKeyText2, { text: "You receive" }), checkoutItem ? /* @__PURE__ */ React218.createElement(ReceivedAmount, { config: checkoutItem.initSettings.config }) : /* @__PURE__ */ React218.createElement(Box, { display: "flex", gap: "5", alignItems: "center" }, /* @__PURE__ */ React218.createElement(FunSkeletonCircle, { size: "15" }), /* @__PURE__ */ React218.createElement(FunSkeletonBlock, { height: "10", width: "93" })))));
|
|
24402
24489
|
}
|
|
24403
24490
|
function OrderDetail({
|
|
24404
24491
|
checkoutHistoryItem
|
|
@@ -24406,7 +24493,7 @@ function OrderDetail({
|
|
|
24406
24493
|
const [isExpanded, setIsExpanded] = useState56(false);
|
|
24407
24494
|
const contentRef = useRef18(null);
|
|
24408
24495
|
const isCheckoutItemLoaded = checkoutHistoryItem !== void 0;
|
|
24409
|
-
return /* @__PURE__ */
|
|
24496
|
+
return /* @__PURE__ */ React218.createElement(Box, { ref: contentRef, paddingX: "12" }, /* @__PURE__ */ React218.createElement(
|
|
24410
24497
|
Box,
|
|
24411
24498
|
{
|
|
24412
24499
|
display: "flex",
|
|
@@ -24424,9 +24511,9 @@ function OrderDetail({
|
|
|
24424
24511
|
},
|
|
24425
24512
|
className: expandableTriggerBaseStyles
|
|
24426
24513
|
},
|
|
24427
|
-
/* @__PURE__ */
|
|
24428
|
-
/* @__PURE__ */
|
|
24429
|
-
), isCheckoutItemLoaded && /* @__PURE__ */
|
|
24514
|
+
/* @__PURE__ */ React218.createElement(Text, { size: "12", color: "tertiaryText" }, "More details"),
|
|
24515
|
+
/* @__PURE__ */ React218.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "center" }, isCheckoutItemLoaded ? /* @__PURE__ */ React218.createElement(ArrowIcon, { direction: isExpanded ? "down" : "right" }) : /* @__PURE__ */ React218.createElement(FunSkeletonCircle, { size: "16" }))
|
|
24516
|
+
), isCheckoutItemLoaded && /* @__PURE__ */ React218.createElement(Box, { className: isExpanded ? contentExpanded : contentCollapsed }, /* @__PURE__ */ React218.createElement(Box, { paddingTop: "12" }, /* @__PURE__ */ React218.createElement(OrderDetailSection, { checkoutHistoryItem }))));
|
|
24430
24517
|
}
|
|
24431
24518
|
var OrderDetailSection = ({
|
|
24432
24519
|
checkoutHistoryItem
|
|
@@ -24442,13 +24529,13 @@ var OrderDetailSection = ({
|
|
|
24442
24529
|
} = checkoutHistoryItem;
|
|
24443
24530
|
const expirationTimeMs = expirationTimestampSeconds * 1e3;
|
|
24444
24531
|
const hideDepositAddress = checkoutHistoryItem.fromChainId === SOLANA_MAINNET_CHAIN_ID2.toString();
|
|
24445
|
-
return /* @__PURE__ */
|
|
24532
|
+
return /* @__PURE__ */ React218.createElement(Box, { display: "flex", flexDirection: "column", gap: "12" }, !hideDepositAddress && /* @__PURE__ */ React218.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React218.createElement(Text, { color: "tertiaryText", size: "12" }, "Deposit address"), /* @__PURE__ */ React218.createElement(Box, { display: "flex", alignItems: "center", gap: "4" }, /* @__PURE__ */ React218.createElement(Text, { color: "tertiaryText", size: "12" }, formatAddress6(checkoutHistoryItem.depositAddr)), /* @__PURE__ */ React218.createElement(
|
|
24446
24533
|
AddressRedirectButton,
|
|
24447
24534
|
{
|
|
24448
24535
|
chainId: checkoutHistoryItem.fromChainId,
|
|
24449
24536
|
address: checkoutHistoryItem.depositAddr
|
|
24450
24537
|
}
|
|
24451
|
-
))), /* @__PURE__ */
|
|
24538
|
+
))), /* @__PURE__ */ React218.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React218.createElement(Text, { color: "tertiaryText", size: "12" }, "Order submitted"), /* @__PURE__ */ React218.createElement(Text, { color: "tertiaryText", size: "12" }, getTimestamp(createdTimeMs))), stateTimestampMs?.FROM_FUNDED && /* @__PURE__ */ React218.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React218.createElement(Text, { color: "tertiaryText", size: "12" }, "Order received"), /* @__PURE__ */ React218.createElement(Text, { color: "tertiaryText", size: "12" }, getTimestamp(stateTimestampMs.FROM_FUNDED))), !isProcessing && /* @__PURE__ */ React218.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React218.createElement(Text, { color: "tertiaryText", size: "12" }, `Order ${isError ? "failed" : isExpired ? "expired" : "filled"}`), /* @__PURE__ */ React218.createElement(Text, { color: "tertiaryText", size: "12" }, getTimestamp(
|
|
24452
24539
|
isExpired ? expirationTimeMs : stateTimestampMs?.COMPLETED ?? lastUpdatedTimeMs
|
|
24453
24540
|
))));
|
|
24454
24541
|
};
|
|
@@ -24460,8 +24547,8 @@ var getTimestamp = (timestampMs) => formatTimestamp(new Date(timestampMs), {
|
|
|
24460
24547
|
|
|
24461
24548
|
// src/components/FunCheckoutHistory/FunCheckoutStatus.tsx
|
|
24462
24549
|
import { formatSecondsToCountdownForm } from "@funkit/utils";
|
|
24463
|
-
import { motion as
|
|
24464
|
-
import
|
|
24550
|
+
import { motion as motion11 } from "motion/react";
|
|
24551
|
+
import React219, { useMemo as useMemo38 } from "react";
|
|
24465
24552
|
|
|
24466
24553
|
// src/components/FunCheckoutHistory/FunCheckoutStatus.css.ts
|
|
24467
24554
|
var GradientLoadingBox = "_101aujm0";
|
|
@@ -24474,20 +24561,20 @@ function FunCheckoutStatus({
|
|
|
24474
24561
|
onOrderDelayed
|
|
24475
24562
|
}) {
|
|
24476
24563
|
if (checkoutHistoryItem === void 0) {
|
|
24477
|
-
return /* @__PURE__ */
|
|
24564
|
+
return /* @__PURE__ */ React219.createElement(Box, { className: GradientLoadingBox }, /* @__PURE__ */ React219.createElement(FunSkeletonCircle, { size: "40" }));
|
|
24478
24565
|
}
|
|
24479
24566
|
const { isCompleted, isFailed, isRefundProceeded, isExpired } = getCheckoutStateBooleans(
|
|
24480
24567
|
checkoutHistoryItem.state,
|
|
24481
24568
|
checkoutHistoryItem.refundState
|
|
24482
24569
|
);
|
|
24483
24570
|
if (checkoutHistoryItem.refundState === "REFUNDED") return null;
|
|
24484
|
-
return /* @__PURE__ */
|
|
24571
|
+
return /* @__PURE__ */ React219.createElement(
|
|
24485
24572
|
StatusInner,
|
|
24486
24573
|
{
|
|
24487
24574
|
showCompleted: isCompleted || isRefundProceeded,
|
|
24488
24575
|
showDelayed: isExpired,
|
|
24489
24576
|
showFailed: isFailed,
|
|
24490
|
-
pendingComponent: /* @__PURE__ */
|
|
24577
|
+
pendingComponent: /* @__PURE__ */ React219.createElement(
|
|
24491
24578
|
PendingCheckoutStatus,
|
|
24492
24579
|
{
|
|
24493
24580
|
checkoutHistoryItem,
|
|
@@ -24503,7 +24590,7 @@ function StatusInner({
|
|
|
24503
24590
|
showFailed,
|
|
24504
24591
|
pendingComponent
|
|
24505
24592
|
}) {
|
|
24506
|
-
return /* @__PURE__ */
|
|
24593
|
+
return /* @__PURE__ */ React219.createElement(Box, { display: "flex", justifyContent: "center" }, /* @__PURE__ */ React219.createElement(Box, { className: GradientWrapperClass }, showCompleted ? /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(Box, { className: GradientPositionClass }, /* @__PURE__ */ React219.createElement(CompletedGradientSvg, null)), /* @__PURE__ */ React219.createElement(CompletedStatusIcon, null)) : showDelayed ? /* @__PURE__ */ React219.createElement(DelayedStatusIcon, null) : showFailed ? /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(Box, { className: GradientPositionClass }, /* @__PURE__ */ React219.createElement(FailedGradientSvg, null)), /* @__PURE__ */ React219.createElement(FailedStatusIcon, null)) : pendingComponent));
|
|
24507
24594
|
}
|
|
24508
24595
|
var extractStartTimeMs = (historyCheckoutItemId, activeCheckoutItem, { createdTimeMs, stateTimestampMs }) => {
|
|
24509
24596
|
if (stateTimestampMs?.FROM_FUNDED) return stateTimestampMs.FROM_FUNDED;
|
|
@@ -24530,7 +24617,7 @@ function PendingCheckoutStatus({
|
|
|
24530
24617
|
);
|
|
24531
24618
|
return getTimeFromNowSeconds(startTimeMs, totalSeconds * 1e3);
|
|
24532
24619
|
}, [checkoutItem.id, activeCheckoutItem, checkoutHistoryItem, totalSeconds]);
|
|
24533
|
-
return /* @__PURE__ */
|
|
24620
|
+
return /* @__PURE__ */ React219.createElement(
|
|
24534
24621
|
PendingStatus,
|
|
24535
24622
|
{
|
|
24536
24623
|
totalSeconds,
|
|
@@ -24544,7 +24631,7 @@ function PendingStatus({
|
|
|
24544
24631
|
estimatedRemainingSeconds,
|
|
24545
24632
|
onOrderDelayed
|
|
24546
24633
|
}) {
|
|
24547
|
-
return /* @__PURE__ */
|
|
24634
|
+
return /* @__PURE__ */ React219.createElement(
|
|
24548
24635
|
FunCountdown,
|
|
24549
24636
|
{
|
|
24550
24637
|
strokeWidth: 2,
|
|
@@ -24552,19 +24639,19 @@ function PendingStatus({
|
|
|
24552
24639
|
countdownSeconds: totalSeconds,
|
|
24553
24640
|
initialRemainingSeconds: estimatedRemainingSeconds,
|
|
24554
24641
|
onCountdownEnded: onOrderDelayed,
|
|
24555
|
-
delayedComponent: /* @__PURE__ */
|
|
24642
|
+
delayedComponent: /* @__PURE__ */ React219.createElement(DelayedStatus, null),
|
|
24556
24643
|
motionProps: {
|
|
24557
24644
|
initial: { scale: 1, opacity: 1 },
|
|
24558
24645
|
exit: { scale: 0.3, opacity: 0 },
|
|
24559
24646
|
transition: { duration: 0.3, ease: [0.24, 0, 0, 1] }
|
|
24560
24647
|
}
|
|
24561
24648
|
},
|
|
24562
|
-
(remainingSeconds) => /* @__PURE__ */
|
|
24649
|
+
(remainingSeconds) => /* @__PURE__ */ React219.createElement(Box, { display: "flex", flexDirection: "column", alignItems: "center" }, remainingSeconds > 0 && /* @__PURE__ */ React219.createElement(Text, { size: "13", weight: "medium" }, formatSecondsToCountdownForm(remainingSeconds)))
|
|
24563
24650
|
);
|
|
24564
24651
|
}
|
|
24565
24652
|
var DelayedStatus = () => {
|
|
24566
24653
|
const transition = { duration: 0.3, ease: [0.24, 0, 0, 1] };
|
|
24567
|
-
return /* @__PURE__ */
|
|
24654
|
+
return /* @__PURE__ */ React219.createElement(Box, { display: "flex", flexDirection: "column", gap: "6", alignItems: "center" }, /* @__PURE__ */ React219.createElement(
|
|
24568
24655
|
Box,
|
|
24569
24656
|
{
|
|
24570
24657
|
color: "secondaryText",
|
|
@@ -24572,8 +24659,8 @@ var DelayedStatus = () => {
|
|
|
24572
24659
|
alignItems: "center",
|
|
24573
24660
|
justifyContent: "center"
|
|
24574
24661
|
},
|
|
24575
|
-
/* @__PURE__ */
|
|
24576
|
-
|
|
24662
|
+
/* @__PURE__ */ React219.createElement(
|
|
24663
|
+
motion11.svg,
|
|
24577
24664
|
{
|
|
24578
24665
|
width: "22",
|
|
24579
24666
|
height: "22",
|
|
@@ -24585,7 +24672,7 @@ var DelayedStatus = () => {
|
|
|
24585
24672
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24586
24673
|
className: SlowRotation
|
|
24587
24674
|
},
|
|
24588
|
-
/* @__PURE__ */
|
|
24675
|
+
/* @__PURE__ */ React219.createElement(
|
|
24589
24676
|
"circle",
|
|
24590
24677
|
{
|
|
24591
24678
|
cx: "11",
|
|
@@ -24598,14 +24685,14 @@ var DelayedStatus = () => {
|
|
|
24598
24685
|
}
|
|
24599
24686
|
)
|
|
24600
24687
|
)
|
|
24601
|
-
), /* @__PURE__ */
|
|
24602
|
-
|
|
24688
|
+
), /* @__PURE__ */ React219.createElement(
|
|
24689
|
+
motion11.div,
|
|
24603
24690
|
{
|
|
24604
24691
|
initial: { opacity: 0, y: 20 },
|
|
24605
24692
|
animate: { opacity: 1, y: 0 },
|
|
24606
24693
|
transition
|
|
24607
24694
|
},
|
|
24608
|
-
/* @__PURE__ */
|
|
24695
|
+
/* @__PURE__ */ React219.createElement(Box, { display: "flex", flexDirection: "column", gap: "2" }, /* @__PURE__ */ React219.createElement(Text, { size: "12", textAlign: "center" }, "Deposit pending"), /* @__PURE__ */ React219.createElement(Box, { textAlign: "center" }, /* @__PURE__ */ React219.createElement(Text, { size: "12", color: "secondaryText" }, "Your deposit is still in progress - no action is required from you")))
|
|
24609
24696
|
));
|
|
24610
24697
|
};
|
|
24611
24698
|
|
|
@@ -24671,19 +24758,19 @@ function FunCheckoutHistoryDetail({
|
|
|
24671
24758
|
includeGenerateActionsParams
|
|
24672
24759
|
]);
|
|
24673
24760
|
const bottomSectionRef = document.getElementById(bottomBarId);
|
|
24674
|
-
return /* @__PURE__ */
|
|
24761
|
+
return /* @__PURE__ */ React220.createElement(React220.Fragment, null, /* @__PURE__ */ React220.createElement(Box, { display: "flex", flexDirection: "column", gap: VERTICAL_SECTION_GAP }, /* @__PURE__ */ React220.createElement(Box, { style: { visibility: "hidden" } }, /* @__PURE__ */ React220.createElement(
|
|
24675
24762
|
FunCheckoutStatus,
|
|
24676
24763
|
{
|
|
24677
24764
|
checkoutHistoryItem: checkoutHistoryInfo,
|
|
24678
24765
|
onOrderDelayed: () => setIsDelayed(true)
|
|
24679
24766
|
}
|
|
24680
|
-
)), /* @__PURE__ */
|
|
24767
|
+
)), /* @__PURE__ */ React220.createElement(
|
|
24681
24768
|
FunTxSummaryHistory,
|
|
24682
24769
|
{
|
|
24683
24770
|
checkoutHistoryItem: checkoutHistoryInfo,
|
|
24684
24771
|
isDelayed: isDelayed2
|
|
24685
24772
|
}
|
|
24686
|
-
), /* @__PURE__ */
|
|
24773
|
+
), /* @__PURE__ */ React220.createElement(OrderDetail, { checkoutHistoryItem: checkoutHistoryInfo }), isCheckoutLoaded && /* @__PURE__ */ React220.createElement(
|
|
24687
24774
|
CheckoutAlert,
|
|
24688
24775
|
{
|
|
24689
24776
|
state: checkoutHistoryInfo.state,
|
|
@@ -24691,7 +24778,7 @@ function FunCheckoutHistoryDetail({
|
|
|
24691
24778
|
onHelp
|
|
24692
24779
|
}
|
|
24693
24780
|
)), bottomSectionRef && createPortal14(
|
|
24694
|
-
/* @__PURE__ */
|
|
24781
|
+
/* @__PURE__ */ React220.createElement(
|
|
24695
24782
|
Dialog.BottomBar,
|
|
24696
24783
|
{
|
|
24697
24784
|
onClose,
|
|
@@ -24704,7 +24791,7 @@ function FunCheckoutHistoryDetail({
|
|
|
24704
24791
|
var CheckoutAlert = ({ state, refundState, onHelp }) => {
|
|
24705
24792
|
const { isError, isProcessing, isCompleted, isRefundProceeded } = getCheckoutStateBooleans(state, refundState);
|
|
24706
24793
|
if (isError) {
|
|
24707
|
-
return /* @__PURE__ */
|
|
24794
|
+
return /* @__PURE__ */ React220.createElement(
|
|
24708
24795
|
FunAlert,
|
|
24709
24796
|
{
|
|
24710
24797
|
type: "error",
|
|
@@ -24713,10 +24800,10 @@ var CheckoutAlert = ({ state, refundState, onHelp }) => {
|
|
|
24713
24800
|
);
|
|
24714
24801
|
}
|
|
24715
24802
|
if (refundState === "REFUNDED") {
|
|
24716
|
-
return /* @__PURE__ */
|
|
24803
|
+
return /* @__PURE__ */ React220.createElement(FunAlert, { description: "Your order was refunded." });
|
|
24717
24804
|
}
|
|
24718
24805
|
if (isRefundProceeded) {
|
|
24719
|
-
return /* @__PURE__ */
|
|
24806
|
+
return /* @__PURE__ */ React220.createElement(
|
|
24720
24807
|
FunAlert,
|
|
24721
24808
|
{
|
|
24722
24809
|
description: `Your order was delayed due to technical issues. If you have any questions reach out to ${FUN_ORG_NAME}.`
|
|
@@ -24724,17 +24811,17 @@ var CheckoutAlert = ({ state, refundState, onHelp }) => {
|
|
|
24724
24811
|
);
|
|
24725
24812
|
}
|
|
24726
24813
|
if (isProcessing || isCompleted) {
|
|
24727
|
-
return /* @__PURE__ */
|
|
24814
|
+
return /* @__PURE__ */ React220.createElement(HelpAlert, { onHelp });
|
|
24728
24815
|
}
|
|
24729
24816
|
};
|
|
24730
24817
|
|
|
24731
24818
|
// src/components/FunCheckoutHistory/FunCheckoutHistoryHelp.tsx
|
|
24732
24819
|
import { sendSupportMessage } from "@funkit/api-base";
|
|
24733
|
-
import
|
|
24820
|
+
import React223, { useEffect as useEffect43, useMemo as useMemo40, useRef as useRef19, useState as useState58 } from "react";
|
|
24734
24821
|
import { createPortal as createPortal15 } from "react-dom";
|
|
24735
24822
|
|
|
24736
24823
|
// src/components/FunInput/FunTextAreaInput.tsx
|
|
24737
|
-
import
|
|
24824
|
+
import React221 from "react";
|
|
24738
24825
|
|
|
24739
24826
|
// src/components/FunInput/FunTextAreaInput.css.ts
|
|
24740
24827
|
var baseStyles3 = "_1q9ws650";
|
|
@@ -24757,7 +24844,7 @@ function FunTextAreaInput({
|
|
|
24757
24844
|
overrideBackground,
|
|
24758
24845
|
isLoading
|
|
24759
24846
|
}) {
|
|
24760
|
-
const [focused, setFocused] =
|
|
24847
|
+
const [focused, setFocused] = React221.useState(false);
|
|
24761
24848
|
const onFocus = () => setFocused(true);
|
|
24762
24849
|
const onBlur = () => setFocused(false);
|
|
24763
24850
|
const getBorderColor2 = () => {
|
|
@@ -24769,7 +24856,7 @@ function FunTextAreaInput({
|
|
|
24769
24856
|
hover: "inputBorderHover"
|
|
24770
24857
|
};
|
|
24771
24858
|
};
|
|
24772
|
-
return /* @__PURE__ */
|
|
24859
|
+
return /* @__PURE__ */ React221.createElement(Box, { color: "primaryText", display: "flex", flexDirection: "column", gap: "4" }, label && /* @__PURE__ */ React221.createElement(Text, { size: "12", weight: textWeight }, label), isLoading ? /* @__PURE__ */ React221.createElement(FunSkeletonBlock, { height: "62" }) : /* @__PURE__ */ React221.createElement(
|
|
24773
24860
|
Box,
|
|
24774
24861
|
{
|
|
24775
24862
|
borderRadius: "connectButton",
|
|
@@ -24789,7 +24876,7 @@ function FunTextAreaInput({
|
|
|
24789
24876
|
hover: "offBackground"
|
|
24790
24877
|
}
|
|
24791
24878
|
},
|
|
24792
|
-
/* @__PURE__ */
|
|
24879
|
+
/* @__PURE__ */ React221.createElement(
|
|
24793
24880
|
"textarea",
|
|
24794
24881
|
{
|
|
24795
24882
|
type: inputProps?.type || "text",
|
|
@@ -24817,13 +24904,13 @@ function FunTextAreaInput({
|
|
|
24817
24904
|
}
|
|
24818
24905
|
}
|
|
24819
24906
|
)
|
|
24820
|
-
), error && typeof error === "string" && /* @__PURE__ */
|
|
24907
|
+
), error && typeof error === "string" && /* @__PURE__ */ React221.createElement(Text, { color: "error", size: "14", weight: "medium" }, error));
|
|
24821
24908
|
}
|
|
24822
24909
|
|
|
24823
24910
|
// src/components/Icons/SuccessIcon.tsx
|
|
24824
|
-
import
|
|
24911
|
+
import React222 from "react";
|
|
24825
24912
|
var SuccessIcon = ({ size = 50 }) => {
|
|
24826
|
-
return /* @__PURE__ */
|
|
24913
|
+
return /* @__PURE__ */ React222.createElement(
|
|
24827
24914
|
"svg",
|
|
24828
24915
|
{
|
|
24829
24916
|
width: size,
|
|
@@ -24832,7 +24919,7 @@ var SuccessIcon = ({ size = 50 }) => {
|
|
|
24832
24919
|
fill: "none",
|
|
24833
24920
|
xmlns: "http://www.w3.org/2000/svg"
|
|
24834
24921
|
},
|
|
24835
|
-
/* @__PURE__ */
|
|
24922
|
+
/* @__PURE__ */ React222.createElement(
|
|
24836
24923
|
"path",
|
|
24837
24924
|
{
|
|
24838
24925
|
d: "M24.9766 49.2891C21.6641 49.2891 18.5469 48.6562 15.625 47.3906C12.7031 46.1406 10.125 44.3984 7.89062 42.1641C5.67188 39.9297 3.92969 37.3516 2.66406 34.4297C1.39844 31.5078 0.765625 28.3906 0.765625 25.0781C0.765625 21.7656 1.39844 18.6484 2.66406 15.7266C3.92969 12.8047 5.67188 10.2344 7.89062 8.01562C10.125 5.78125 12.6953 4.03125 15.6016 2.76562C18.5234 1.5 21.6406 0.867188 24.9531 0.867188C28.2812 0.867188 31.4062 1.5 34.3281 2.76562C37.25 4.03125 39.8281 5.78125 42.0625 8.01562C44.2969 10.2344 46.0469 12.8047 47.3125 15.7266C48.5781 18.6484 49.2109 21.7656 49.2109 25.0781C49.2109 28.3906 48.5781 31.5078 47.3125 34.4297C46.0469 37.3516 44.2969 39.9297 42.0625 42.1641C39.8281 44.3984 37.25 46.1406 34.3281 47.3906C31.4062 48.6562 28.2891 49.2891 24.9766 49.2891ZM22.375 36.6328C22.8125 36.6328 23.2109 36.5312 23.5703 36.3281C23.9453 36.125 24.2734 35.8203 24.5547 35.4141L35.5234 18.3047C35.6797 18.0547 35.8203 17.7891 35.9453 17.5078C36.0703 17.2109 36.1328 16.9297 36.1328 16.6641C36.1328 16.0547 35.8984 15.5625 35.4297 15.1875C34.9766 14.8125 34.4609 14.625 33.8828 14.625C33.1172 14.625 32.4844 15.0312 31.9844 15.8438L22.2812 31.3594L17.7812 25.6406C17.4688 25.25 17.1641 24.9766 16.8672 24.8203C16.5703 24.6641 16.2344 24.5859 15.8594 24.5859C15.2656 24.5859 14.7578 24.8047 14.3359 25.2422C13.9297 25.6641 13.7266 26.1719 13.7266 26.7656C13.7266 27.0625 13.7812 27.3516 13.8906 27.6328C14 27.9141 14.1562 28.1875 14.3594 28.4531L20.1016 35.4375C20.4453 35.8594 20.7969 36.1641 21.1562 36.3516C21.5156 36.5391 21.9219 36.6328 22.375 36.6328Z",
|
|
@@ -24968,18 +25055,18 @@ function FunCheckoutHistoryHelp({
|
|
|
24968
25055
|
}
|
|
24969
25056
|
};
|
|
24970
25057
|
if (processStage === 1 /* SUCCESS */) {
|
|
24971
|
-
return /* @__PURE__ */
|
|
25058
|
+
return /* @__PURE__ */ React223.createElement(Box, { display: "flex", flexDirection: "column", gap: "24", paddingTop: "16" }, /* @__PURE__ */ React223.createElement(Box, { paddingY: "12", paddingX: "24" }, /* @__PURE__ */ React223.createElement(
|
|
24972
25059
|
FunMessage,
|
|
24973
25060
|
{
|
|
24974
25061
|
title: "Request sent",
|
|
24975
25062
|
description: "Our team has received your request and will be in touch shortly. We appreciate your patience.",
|
|
24976
|
-
icon: /* @__PURE__ */
|
|
25063
|
+
icon: /* @__PURE__ */ React223.createElement(SuccessIcon, null)
|
|
24977
25064
|
}
|
|
24978
|
-
)), /* @__PURE__ */
|
|
25065
|
+
)), /* @__PURE__ */ React223.createElement(FunButton, { title: "Close", onClick: onBackFromHelpPage }));
|
|
24979
25066
|
}
|
|
24980
25067
|
const bottomSectionRef = document.getElementById(bottomBarId);
|
|
24981
25068
|
const isLoadingCheckoutItem = checkoutHistoryInfo === void 0;
|
|
24982
|
-
return /* @__PURE__ */
|
|
25069
|
+
return /* @__PURE__ */ React223.createElement(Box, { ref: wrapperRef }, /* @__PURE__ */ React223.createElement(Box, { display: "flex", flexDirection: "column", gap: "24", paddingTop: "12" }, /* @__PURE__ */ React223.createElement(Box, { display: "flex", flexDirection: "column", gap: "10" }, /* @__PURE__ */ React223.createElement(Text, { size: "20", weight: "medium" }, "Tell us more"), /* @__PURE__ */ React223.createElement(Text, { size: "10" }, "If you're experiencing an issue or have a question, please fill out the form below and our support team will get back to you as soon as possible.")), /* @__PURE__ */ React223.createElement(Box, { display: "flex", flexDirection: "column", gap: "24" }, /* @__PURE__ */ React223.createElement(
|
|
24983
25070
|
FunInput,
|
|
24984
25071
|
{
|
|
24985
25072
|
label: "Email*",
|
|
@@ -24988,7 +25075,7 @@ function FunCheckoutHistoryHelp({
|
|
|
24988
25075
|
value: emailInput,
|
|
24989
25076
|
onChange: (e) => setEmailInput(e?.target?.value)
|
|
24990
25077
|
}
|
|
24991
|
-
), /* @__PURE__ */
|
|
25078
|
+
), /* @__PURE__ */ React223.createElement(
|
|
24992
25079
|
FunInput,
|
|
24993
25080
|
{
|
|
24994
25081
|
label: "Subject*",
|
|
@@ -24997,7 +25084,7 @@ function FunCheckoutHistoryHelp({
|
|
|
24997
25084
|
value: subjectInput,
|
|
24998
25085
|
onChange: (e) => setSubjectInput(e?.target?.value)
|
|
24999
25086
|
}
|
|
25000
|
-
), /* @__PURE__ */
|
|
25087
|
+
), /* @__PURE__ */ React223.createElement(
|
|
25001
25088
|
FunTextAreaInput,
|
|
25002
25089
|
{
|
|
25003
25090
|
label: "Description*",
|
|
@@ -25006,7 +25093,7 @@ function FunCheckoutHistoryHelp({
|
|
|
25006
25093
|
value: descriptionInput,
|
|
25007
25094
|
onChange: (e) => setDescriptionInput(e?.target?.value)
|
|
25008
25095
|
}
|
|
25009
|
-
), /* @__PURE__ */
|
|
25096
|
+
), /* @__PURE__ */ React223.createElement(
|
|
25010
25097
|
BaseDropdown_default,
|
|
25011
25098
|
{
|
|
25012
25099
|
size: "large",
|
|
@@ -25016,7 +25103,7 @@ function FunCheckoutHistoryHelp({
|
|
|
25016
25103
|
value: resolutionInput,
|
|
25017
25104
|
onOptionSelected: (option) => setResolutionInput(option.value),
|
|
25018
25105
|
renderDropdownOption: (option, isSelected) => {
|
|
25019
|
-
return /* @__PURE__ */
|
|
25106
|
+
return /* @__PURE__ */ React223.createElement(
|
|
25020
25107
|
BaseDropdownItem_default,
|
|
25021
25108
|
{
|
|
25022
25109
|
horizontalPadding: "8",
|
|
@@ -25036,7 +25123,7 @@ function FunCheckoutHistoryHelp({
|
|
|
25036
25123
|
openDropdownBackgroundColor: "inputBackground"
|
|
25037
25124
|
}
|
|
25038
25125
|
))), bottomSectionRef && createPortal15(
|
|
25039
|
-
/* @__PURE__ */
|
|
25126
|
+
/* @__PURE__ */ React223.createElement(
|
|
25040
25127
|
Dialog.BottomBar,
|
|
25041
25128
|
{
|
|
25042
25129
|
actionButtonProps: {
|
|
@@ -25044,7 +25131,7 @@ function FunCheckoutHistoryHelp({
|
|
|
25044
25131
|
onClick: onSubmitIssue,
|
|
25045
25132
|
isDisabled: isSubmitting || !subjectInput || !descriptionInput || !emailInput || !isEmailInputValid || !resolutionInput
|
|
25046
25133
|
},
|
|
25047
|
-
topSection: /* @__PURE__ */
|
|
25134
|
+
topSection: /* @__PURE__ */ React223.createElement(
|
|
25048
25135
|
FunNotification,
|
|
25049
25136
|
{
|
|
25050
25137
|
description: errorMessage,
|
|
@@ -25066,26 +25153,26 @@ import {
|
|
|
25066
25153
|
formatTimestamp as formatTimestamp2,
|
|
25067
25154
|
isTokenEquivalent as isTokenEquivalent8
|
|
25068
25155
|
} from "@funkit/utils";
|
|
25069
|
-
import
|
|
25156
|
+
import React225, { useCallback as useCallback41, useMemo as useMemo42, useRef as useRef20, useState as useState59 } from "react";
|
|
25070
25157
|
import { createPortal as createPortal16 } from "react-dom";
|
|
25071
25158
|
|
|
25072
25159
|
// src/components/FunCheckoutHistory/FunDirectExecutionStatus.tsx
|
|
25073
|
-
import
|
|
25160
|
+
import React224, { useMemo as useMemo41 } from "react";
|
|
25074
25161
|
function FunDirectExecutionStatus({
|
|
25075
25162
|
directExecution
|
|
25076
25163
|
}) {
|
|
25077
25164
|
const { isCompleted, isDelayed: isDelayed2, isFailed, isRefunded } = useCheckoutDirectExecutionHistory({ initDirectExecution: directExecution });
|
|
25078
25165
|
if (directExecution === void 0) {
|
|
25079
|
-
return /* @__PURE__ */
|
|
25166
|
+
return /* @__PURE__ */ React224.createElement(Box, { className: GradientLoadingBox }, /* @__PURE__ */ React224.createElement(FunSkeletonCircle, { size: "40" }));
|
|
25080
25167
|
}
|
|
25081
25168
|
if (isRefunded) return null;
|
|
25082
|
-
return /* @__PURE__ */
|
|
25169
|
+
return /* @__PURE__ */ React224.createElement(
|
|
25083
25170
|
StatusInner,
|
|
25084
25171
|
{
|
|
25085
25172
|
showCompleted: isCompleted,
|
|
25086
25173
|
showDelayed: isDelayed2,
|
|
25087
25174
|
showFailed: isFailed,
|
|
25088
|
-
pendingComponent: /* @__PURE__ */
|
|
25175
|
+
pendingComponent: /* @__PURE__ */ React224.createElement(PendingDirectExecutionStatus, { directExecution })
|
|
25089
25176
|
}
|
|
25090
25177
|
);
|
|
25091
25178
|
}
|
|
@@ -25100,7 +25187,7 @@ function PendingDirectExecutionStatus({
|
|
|
25100
25187
|
const startTimeMs = directExecution.createdTimeMs;
|
|
25101
25188
|
return getTimeFromNowSeconds(startTimeMs, totalSeconds * 1e3);
|
|
25102
25189
|
}, [totalSeconds, directExecution]);
|
|
25103
|
-
return /* @__PURE__ */
|
|
25190
|
+
return /* @__PURE__ */ React224.createElement(
|
|
25104
25191
|
PendingStatus,
|
|
25105
25192
|
{
|
|
25106
25193
|
totalSeconds,
|
|
@@ -25116,7 +25203,7 @@ function FunDirectExecutionStatusTagLoaded({
|
|
|
25116
25203
|
const { state, refundState, isDelayed: isDelayed2 } = useCheckoutDirectExecutionHistory({
|
|
25117
25204
|
initDirectExecution: directExecution
|
|
25118
25205
|
});
|
|
25119
|
-
return /* @__PURE__ */
|
|
25206
|
+
return /* @__PURE__ */ React225.createElement(StatusTag, { state, refundState, isDelayed: isDelayed2 });
|
|
25120
25207
|
}
|
|
25121
25208
|
function FunDirectExecutionHistoryDetail({
|
|
25122
25209
|
bottomBarId,
|
|
@@ -25166,25 +25253,25 @@ function FunDirectExecutionHistoryDetail({
|
|
|
25166
25253
|
includeGenerateActionsParams,
|
|
25167
25254
|
isLoaded
|
|
25168
25255
|
]);
|
|
25169
|
-
return /* @__PURE__ */
|
|
25256
|
+
return /* @__PURE__ */ React225.createElement(React225.Fragment, null, /* @__PURE__ */ React225.createElement(Box, { display: "flex", flexDirection: "column", gap: VERTICAL_SECTION_GAP }, /* @__PURE__ */ React225.createElement(Box, { style: { visibility: "hidden" } }, /* @__PURE__ */ React225.createElement(FunDirectExecutionStatus, { directExecution })), /* @__PURE__ */ React225.createElement(
|
|
25170
25257
|
DirectExecutionSummaryHistory,
|
|
25171
25258
|
{
|
|
25172
25259
|
directExecution,
|
|
25173
25260
|
isLoaded
|
|
25174
25261
|
}
|
|
25175
|
-
), /* @__PURE__ */
|
|
25262
|
+
), /* @__PURE__ */ React225.createElement(
|
|
25176
25263
|
DirectExecutionOrderDetail,
|
|
25177
25264
|
{
|
|
25178
25265
|
directExecution,
|
|
25179
25266
|
isLoaded
|
|
25180
25267
|
}
|
|
25181
|
-
), /* @__PURE__ */
|
|
25268
|
+
), /* @__PURE__ */ React225.createElement(
|
|
25182
25269
|
HelpAlert,
|
|
25183
25270
|
{
|
|
25184
25271
|
onHelp: () => window.open(CONTACT_US_LINK, "_blank", "noopener")
|
|
25185
25272
|
}
|
|
25186
25273
|
)), bottomSectionRef && createPortal16(
|
|
25187
|
-
/* @__PURE__ */
|
|
25274
|
+
/* @__PURE__ */ React225.createElement(
|
|
25188
25275
|
Dialog.BottomBar,
|
|
25189
25276
|
{
|
|
25190
25277
|
onClose,
|
|
@@ -25215,26 +25302,26 @@ function DirectExecutionSummaryHistory({
|
|
|
25215
25302
|
const clientMetadata = isLoaded && directExecution?.clientMetadata;
|
|
25216
25303
|
const isAccountPayment = clientMetadata && clientMetadata.selectedPaymentMethodInfo?.paymentMethod === "balance" /* ACCOUNT_BALANCE */;
|
|
25217
25304
|
const sourceRedirectAddress = isAccountPayment ? directExecution?.sourceOfFund?.split("|")?.[2] : null;
|
|
25218
|
-
return /* @__PURE__ */
|
|
25305
|
+
return /* @__PURE__ */ React225.createElement(React225.Fragment, null, /* @__PURE__ */ React225.createElement(FunTxSummaryBox, null, /* @__PURE__ */ React225.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React225.createElement(FunTxSummaryLineItemKeyText, { text: "Fill status" }), isLoaded ? /* @__PURE__ */ React225.createElement(
|
|
25219
25306
|
FunDirectExecutionStatusTagLoaded,
|
|
25220
25307
|
{
|
|
25221
25308
|
directExecution
|
|
25222
25309
|
}
|
|
25223
|
-
) : /* @__PURE__ */
|
|
25310
|
+
) : /* @__PURE__ */ React225.createElement(FunSkeletonBlock, { height: "10", width: "44" })), isCompleted && /* @__PURE__ */ React225.createElement(React225.Fragment, null, /* @__PURE__ */ React225.createElement(FunDivider, { marginTop: "12", marginBottom: "12" }), /* @__PURE__ */ React225.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React225.createElement(FunTxSummaryLineItemKeyText, { text: "Total time" }), /* @__PURE__ */ React225.createElement(Text, { weight: "medium", size: "12" }, formatSecondsToReadableForm5(
|
|
25224
25311
|
getDirectExecutionRunTimeMs(directExecution)
|
|
25225
|
-
))))), /* @__PURE__ */
|
|
25312
|
+
))))), /* @__PURE__ */ React225.createElement(FunTxSummaryBox, null, clientMetadata ? /* @__PURE__ */ React225.createElement(
|
|
25226
25313
|
PaymentRouteSummary,
|
|
25227
25314
|
{
|
|
25228
25315
|
paymentMethodInfo: clientMetadata.selectedPaymentMethodInfo,
|
|
25229
25316
|
customRecipient: clientMetadata.initSettings.config.customRecipient,
|
|
25230
|
-
sourceRedirect: sourceRedirectAddress ? /* @__PURE__ */
|
|
25317
|
+
sourceRedirect: sourceRedirectAddress ? /* @__PURE__ */ React225.createElement(
|
|
25231
25318
|
AddressRedirectButton,
|
|
25232
25319
|
{
|
|
25233
25320
|
chainId: directExecution.fromChainId,
|
|
25234
25321
|
address: sourceRedirectAddress
|
|
25235
25322
|
}
|
|
25236
25323
|
) : void 0,
|
|
25237
|
-
destinationRedirect: /* @__PURE__ */
|
|
25324
|
+
destinationRedirect: /* @__PURE__ */ React225.createElement(
|
|
25238
25325
|
AddressRedirectButton,
|
|
25239
25326
|
{
|
|
25240
25327
|
chainId: directExecution.toChainId,
|
|
@@ -25243,7 +25330,7 @@ function DirectExecutionSummaryHistory({
|
|
|
25243
25330
|
}
|
|
25244
25331
|
)
|
|
25245
25332
|
}
|
|
25246
|
-
) : /* @__PURE__ */
|
|
25333
|
+
) : /* @__PURE__ */ React225.createElement(PaymentRouteSummarySkeletonLoader, null)), /* @__PURE__ */ React225.createElement(FunTxSummaryBox, null, /* @__PURE__ */ React225.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React225.createElement(FunTxSummaryLineItemKeyText, { text: receiveAmountLabel }), isLoaded && clientMetadata ? /* @__PURE__ */ React225.createElement(Box, { display: "flex", gap: "5", alignItems: "center" }, /* @__PURE__ */ React225.createElement(
|
|
25247
25334
|
AsyncImage,
|
|
25248
25335
|
{
|
|
25249
25336
|
src: clientMetadata.initSettings.config.iconSrc || "",
|
|
@@ -25252,11 +25339,11 @@ function DirectExecutionSummaryHistory({
|
|
|
25252
25339
|
height: 15,
|
|
25253
25340
|
useAsImage: true
|
|
25254
25341
|
}
|
|
25255
|
-
), /* @__PURE__ */
|
|
25342
|
+
), /* @__PURE__ */ React225.createElement(Text, { size: "12", weight: "medium" }, formatCryptoAndStringify7(
|
|
25256
25343
|
Number(
|
|
25257
25344
|
clientMetadata.initSettings.config.targetAssetAmount || 0
|
|
25258
25345
|
)
|
|
25259
|
-
))) : /* @__PURE__ */
|
|
25346
|
+
))) : /* @__PURE__ */ React225.createElement(Box, { display: "flex", gap: "5", alignItems: "center" }, /* @__PURE__ */ React225.createElement(FunSkeletonCircle, { size: "15" }), /* @__PURE__ */ React225.createElement(FunSkeletonBlock, { height: "10", width: "93" })))));
|
|
25260
25347
|
}
|
|
25261
25348
|
function DirectExecutionOrderDetail({
|
|
25262
25349
|
directExecution,
|
|
@@ -25264,7 +25351,7 @@ function DirectExecutionOrderDetail({
|
|
|
25264
25351
|
}) {
|
|
25265
25352
|
const [isExpanded, setIsExpanded] = useState59(false);
|
|
25266
25353
|
const contentRef = useRef20(null);
|
|
25267
|
-
return /* @__PURE__ */
|
|
25354
|
+
return /* @__PURE__ */ React225.createElement(Box, { ref: contentRef, paddingX: "12" }, /* @__PURE__ */ React225.createElement(
|
|
25268
25355
|
Box,
|
|
25269
25356
|
{
|
|
25270
25357
|
display: "flex",
|
|
@@ -25282,9 +25369,9 @@ function DirectExecutionOrderDetail({
|
|
|
25282
25369
|
},
|
|
25283
25370
|
className: expandableTriggerBaseStyles
|
|
25284
25371
|
},
|
|
25285
|
-
/* @__PURE__ */
|
|
25286
|
-
/* @__PURE__ */
|
|
25287
|
-
), isLoaded && /* @__PURE__ */
|
|
25372
|
+
/* @__PURE__ */ React225.createElement(Text, { size: "12", color: "tertiaryText" }, "More details"),
|
|
25373
|
+
/* @__PURE__ */ React225.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "center" }, isLoaded ? /* @__PURE__ */ React225.createElement(ArrowIcon, { direction: isExpanded ? "down" : "right" }) : /* @__PURE__ */ React225.createElement(FunSkeletonCircle, { size: "16" }))
|
|
25374
|
+
), isLoaded && /* @__PURE__ */ React225.createElement(Box, { className: isExpanded ? contentExpanded : contentCollapsed }, /* @__PURE__ */ React225.createElement(Box, { paddingTop: "12" }, /* @__PURE__ */ React225.createElement(
|
|
25288
25375
|
DirectExecutionOrderDetailSection,
|
|
25289
25376
|
{
|
|
25290
25377
|
directExecution
|
|
@@ -25302,13 +25389,13 @@ function DirectExecutionOrderDetailSection({
|
|
|
25302
25389
|
const { isProcessing, isFailed, isRefunded, isCompleted } = useCheckoutDirectExecutionHistory({ initDirectExecution: directExecution });
|
|
25303
25390
|
const { txHash, createdTimeMs, fromChainId, toChainId, listenerInfo } = directExecution;
|
|
25304
25391
|
const updateTime = getDirectExecutionUpdatedTimeMs({ directExecution });
|
|
25305
|
-
return /* @__PURE__ */
|
|
25392
|
+
return /* @__PURE__ */ React225.createElement(Box, { display: "flex", flexDirection: "column", gap: "12" }, /* @__PURE__ */ React225.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React225.createElement(Text, { color: "tertiaryText", size: "12" }, "Deposit tx"), /* @__PURE__ */ React225.createElement(Box, { display: "flex", alignItems: "center", gap: "4" }, /* @__PURE__ */ React225.createElement(Text, { color: "tertiaryText", size: "12" }, formatAddress7(txHash)), /* @__PURE__ */ React225.createElement(TransactionRedirectButton, { chainId: fromChainId, txHash }))), isCompleted && listenerInfo?.txHashes?.[0] ? /* @__PURE__ */ React225.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React225.createElement(Text, { color: "tertiaryText", size: "12" }, "Completion tx"), /* @__PURE__ */ React225.createElement(Box, { display: "flex", alignItems: "center", gap: "4" }, /* @__PURE__ */ React225.createElement(Text, { color: "tertiaryText", size: "12" }, formatAddress7(listenerInfo.txHashes[0])), /* @__PURE__ */ React225.createElement(
|
|
25306
25393
|
TransactionRedirectButton,
|
|
25307
25394
|
{
|
|
25308
25395
|
chainId: toChainId,
|
|
25309
25396
|
txHash: listenerInfo.txHashes[0]
|
|
25310
25397
|
}
|
|
25311
|
-
))) : null, /* @__PURE__ */
|
|
25398
|
+
))) : null, /* @__PURE__ */ React225.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React225.createElement(Text, { color: "tertiaryText", size: "12" }, "Order submitted"), /* @__PURE__ */ React225.createElement(Text, { color: "tertiaryText", size: "12" }, getTimestamp2(createdTimeMs))), !isProcessing && updateTime && /* @__PURE__ */ React225.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React225.createElement(Text, { color: "tertiaryText", size: "12" }, `Order ${isFailed ? "failed" : isRefunded ? "refunded" : "filled"}`), /* @__PURE__ */ React225.createElement(Text, { color: "tertiaryText", size: "12" }, getTimestamp2(updateTime))));
|
|
25312
25399
|
}
|
|
25313
25400
|
|
|
25314
25401
|
// src/components/FunCheckoutHistory/FunCheckoutHistoryContent.tsx
|
|
@@ -25328,7 +25415,7 @@ function FunCheckoutHistoryContent({
|
|
|
25328
25415
|
});
|
|
25329
25416
|
const isDirectExecutionRecord = isCheckoutHistoryDirectExecution(depositAddress);
|
|
25330
25417
|
if (isDirectExecutionRecord && directExecution) {
|
|
25331
|
-
return /* @__PURE__ */
|
|
25418
|
+
return /* @__PURE__ */ React226.createElement(
|
|
25332
25419
|
FunDirectExecutionHistoryDetail,
|
|
25333
25420
|
{
|
|
25334
25421
|
bottomBarId,
|
|
@@ -25339,7 +25426,7 @@ function FunCheckoutHistoryContent({
|
|
|
25339
25426
|
}
|
|
25340
25427
|
);
|
|
25341
25428
|
}
|
|
25342
|
-
return /* @__PURE__ */
|
|
25429
|
+
return /* @__PURE__ */ React226.createElement(Box, null, currentPage === "detail" /* DETAIL */ ? /* @__PURE__ */ React226.createElement(
|
|
25343
25430
|
FunCheckoutHistoryDetail,
|
|
25344
25431
|
{
|
|
25345
25432
|
includeGenerateActionsParams,
|
|
@@ -25349,7 +25436,7 @@ function FunCheckoutHistoryContent({
|
|
|
25349
25436
|
onClose,
|
|
25350
25437
|
onAnimationComplete
|
|
25351
25438
|
}
|
|
25352
|
-
) : currentPage === "help" /* HELP */ ? /* @__PURE__ */
|
|
25439
|
+
) : currentPage === "help" /* HELP */ ? /* @__PURE__ */ React226.createElement(
|
|
25353
25440
|
FunCheckoutHistoryHelp,
|
|
25354
25441
|
{
|
|
25355
25442
|
checkoutHistoryInfo,
|
|
@@ -25361,7 +25448,7 @@ function FunCheckoutHistoryContent({
|
|
|
25361
25448
|
|
|
25362
25449
|
// src/components/FunCheckoutHistory/useCustomStatusAnimationAboveTopbar.tsx
|
|
25363
25450
|
import { clamp as clamp3 } from "@funkit/utils";
|
|
25364
|
-
import
|
|
25451
|
+
import React227, { useRef as useRef21, useState as useState60 } from "react";
|
|
25365
25452
|
var TOPBAR_HEIGHT = 56;
|
|
25366
25453
|
var DURATION_MS = 200;
|
|
25367
25454
|
var STATUS_SIZE_PENDING = 76;
|
|
@@ -25399,7 +25486,7 @@ function useCustomStatusAnimationAboveTopbar({
|
|
|
25399
25486
|
};
|
|
25400
25487
|
return {
|
|
25401
25488
|
onScroll: (event) => setScrollPos(event.target.scrollTop),
|
|
25402
|
-
topbar: /* @__PURE__ */
|
|
25489
|
+
topbar: /* @__PURE__ */ React227.createElement(React227.Fragment, null, /* @__PURE__ */ React227.createElement("div", { className: topbarFadeWrapper }, topbar, /* @__PURE__ */ React227.createElement(
|
|
25403
25490
|
"div",
|
|
25404
25491
|
{
|
|
25405
25492
|
className: topbarFadeBackground,
|
|
@@ -25408,7 +25495,7 @@ function useCustomStatusAnimationAboveTopbar({
|
|
|
25408
25495
|
transition: `opacity ${DURATION_MS / 1e3}s ease-in`
|
|
25409
25496
|
}
|
|
25410
25497
|
}
|
|
25411
|
-
)), isCheckoutDetailView && depositAddress && /* @__PURE__ */
|
|
25498
|
+
)), isCheckoutDetailView && depositAddress && /* @__PURE__ */ React227.createElement(
|
|
25412
25499
|
"div",
|
|
25413
25500
|
{
|
|
25414
25501
|
className: topbarOverflowContent,
|
|
@@ -25426,7 +25513,7 @@ function useCustomStatusAnimationAboveTopbar({
|
|
|
25426
25513
|
top: TOPBAR_HEIGHT + paddingTop - scrollPos
|
|
25427
25514
|
}
|
|
25428
25515
|
},
|
|
25429
|
-
isCheckoutHistoryDirectExecution(depositAddress) ? /* @__PURE__ */
|
|
25516
|
+
isCheckoutHistoryDirectExecution(depositAddress) ? /* @__PURE__ */ React227.createElement(FunDirectExecutionStatus, { directExecution: directExecutionInfo }) : /* @__PURE__ */ React227.createElement(FunCheckoutStatus, { checkoutHistoryItem: checkoutHistoryInfo })
|
|
25430
25517
|
)),
|
|
25431
25518
|
withTopDivider: isCheckoutDetailView ? scrollPos > startFadePos ? "scroll" : "never" : withTopDivider
|
|
25432
25519
|
};
|
|
@@ -25444,14 +25531,14 @@ function useCheckoutModalTitle(depositAddress, defaultTitle) {
|
|
|
25444
25531
|
import { IN_PROGRESS_CHECKOUT_STATES as IN_PROGRESS_CHECKOUT_STATES2 } from "@funkit/api-base";
|
|
25445
25532
|
import { formatTimestampToDate, fullMonthNames } from "@funkit/utils";
|
|
25446
25533
|
import clsx20 from "clsx";
|
|
25447
|
-
import
|
|
25534
|
+
import React236, { useEffect as useEffect44, useMemo as useMemo43, useRef as useRef22, useState as useState62 } from "react";
|
|
25448
25535
|
import { Virtuoso } from "react-virtuoso";
|
|
25449
25536
|
import { useAccount as useAccount6 } from "wagmi";
|
|
25450
25537
|
|
|
25451
25538
|
// src/components/Icons/GreenRoundCheckmark.tsx
|
|
25452
|
-
import
|
|
25539
|
+
import React228 from "react";
|
|
25453
25540
|
var GreenRoundCheckmark = ({ size = 15 }) => {
|
|
25454
|
-
return /* @__PURE__ */
|
|
25541
|
+
return /* @__PURE__ */ React228.createElement(
|
|
25455
25542
|
"svg",
|
|
25456
25543
|
{
|
|
25457
25544
|
width: size,
|
|
@@ -25460,7 +25547,7 @@ var GreenRoundCheckmark = ({ size = 15 }) => {
|
|
|
25460
25547
|
fill: "none",
|
|
25461
25548
|
xmlns: "http://www.w3.org/2000/svg"
|
|
25462
25549
|
},
|
|
25463
|
-
/* @__PURE__ */
|
|
25550
|
+
/* @__PURE__ */ React228.createElement(
|
|
25464
25551
|
"path",
|
|
25465
25552
|
{
|
|
25466
25553
|
d: "M5 10.4551C4.31315 10.4551 3.66862 10.3249 3.06641 10.0645C2.46419 9.80729 1.93522 9.45085 1.47949 8.99512C1.02376 8.53613 0.66569 8.00716 0.405273 7.4082C0.148112 6.80599 0.0195312 6.16146 0.0195312 5.47461C0.0195312 4.78776 0.148112 4.14323 0.405273 3.54102C0.66569 2.9388 1.02376 2.40983 1.47949 1.9541C1.93522 1.49837 2.46419 1.14193 3.06641 0.884766C3.66862 0.624349 4.31315 0.494141 5 0.494141C5.68685 0.494141 6.33138 0.624349 6.93359 0.884766C7.53581 1.14193 8.06478 1.49837 8.52051 1.9541C8.97624 2.40983 9.33268 2.9388 9.58984 3.54102C9.85026 4.14323 9.98047 4.78776 9.98047 5.47461C9.98047 6.16146 9.85026 6.80599 9.58984 7.4082C9.33268 8.00716 8.97624 8.53613 8.52051 8.99512C8.06478 9.45085 7.53581 9.80729 6.93359 10.0645C6.33138 10.3249 5.68685 10.4551 5 10.4551ZM4.45312 7.85742C4.53776 7.85742 4.61426 7.83789 4.68262 7.79883C4.75098 7.75977 4.8112 7.70117 4.86328 7.62305L7.1582 4.00488C7.1875 3.95605 7.21517 3.90397 7.24121 3.84863C7.26725 3.79329 7.28027 3.73796 7.28027 3.68262C7.28027 3.56868 7.23796 3.47917 7.15332 3.41406C7.06868 3.3457 6.97428 3.31152 6.87012 3.31152C6.72689 3.31152 6.6097 3.38639 6.51855 3.53613L4.43359 6.88574L3.44238 5.60645C3.38053 5.52507 3.32031 5.46973 3.26172 5.44043C3.20638 5.41113 3.1429 5.39648 3.07129 5.39648C2.96061 5.39648 2.86784 5.43717 2.79297 5.51855C2.7181 5.59668 2.68066 5.69108 2.68066 5.80176C2.68066 5.8571 2.69043 5.91243 2.70996 5.96777C2.73275 6.01986 2.76204 6.07031 2.79785 6.11914L4.02344 7.62305C4.08854 7.70768 4.15527 7.7679 4.22363 7.80371C4.29199 7.83952 4.36849 7.85742 4.45312 7.85742Z",
|
|
@@ -25471,10 +25558,10 @@ var GreenRoundCheckmark = ({ size = 15 }) => {
|
|
|
25471
25558
|
};
|
|
25472
25559
|
|
|
25473
25560
|
// src/modals/ProfileDetails/FunProfileViews/Home/BalanceSection.tsx
|
|
25474
|
-
import
|
|
25561
|
+
import React229 from "react";
|
|
25475
25562
|
import { formatCurrencyAndStringify as formatCurrencyAndStringify12 } from "@funkit/utils";
|
|
25476
25563
|
var BalanceSection = ({ totalBalance }) => {
|
|
25477
|
-
return /* @__PURE__ */
|
|
25564
|
+
return /* @__PURE__ */ React229.createElement(Box, { display: "flex", flexDirection: "column", gap: "16" }, /* @__PURE__ */ React229.createElement(Box, { display: "flex", justifyContent: "center", alignItems: "center" }, /* @__PURE__ */ React229.createElement(Text, { as: "h1", color: "primaryText", weight: "medium", size: "40" }, formatCurrencyAndStringify12(
|
|
25478
25565
|
Number.parseFloat(totalBalance.toString())
|
|
25479
25566
|
))));
|
|
25480
25567
|
};
|
|
@@ -25493,12 +25580,12 @@ import {
|
|
|
25493
25580
|
isNotNullish as isNotNullish11
|
|
25494
25581
|
} from "@funkit/utils";
|
|
25495
25582
|
import clsx19 from "clsx";
|
|
25496
|
-
import
|
|
25583
|
+
import React231 from "react";
|
|
25497
25584
|
|
|
25498
25585
|
// src/components/Icons/RedRoundErrorCross.tsx
|
|
25499
|
-
import
|
|
25586
|
+
import React230 from "react";
|
|
25500
25587
|
var RedRoundErrorCross = ({ size = 15 }) => {
|
|
25501
|
-
return /* @__PURE__ */
|
|
25588
|
+
return /* @__PURE__ */ React230.createElement(
|
|
25502
25589
|
"svg",
|
|
25503
25590
|
{
|
|
25504
25591
|
width: size,
|
|
@@ -25507,8 +25594,8 @@ var RedRoundErrorCross = ({ size = 15 }) => {
|
|
|
25507
25594
|
fill: "none",
|
|
25508
25595
|
xmlns: "http://www.w3.org/2000/svg"
|
|
25509
25596
|
},
|
|
25510
|
-
/* @__PURE__ */
|
|
25511
|
-
/* @__PURE__ */
|
|
25597
|
+
/* @__PURE__ */ React230.createElement("circle", { cx: "4", cy: "4.5", r: "4", fill: "#F34126" }),
|
|
25598
|
+
/* @__PURE__ */ React230.createElement(
|
|
25512
25599
|
"path",
|
|
25513
25600
|
{
|
|
25514
25601
|
d: "M2.57111 2.59761L4 4.02654L5.42889 2.59761C5.54807 2.47844 5.7369 2.46734 5.87797 2.57755L5.90238 2.59979C6.03254 2.72994 6.03254 2.94096 5.90238 3.07111L4.47346 4.5L5.90238 5.92889C6.02156 6.04806 6.03266 6.2369 5.92244 6.37797L5.90022 6.40239C5.77007 6.53254 5.55904 6.53254 5.42888 6.40238L4 4.97346L2.57111 6.40239C2.45193 6.52156 2.2631 6.53266 2.12203 6.42245L2.09761 6.40021C1.96746 6.27006 1.96746 6.05904 2.09761 5.92889L3.52654 4.5L2.09761 3.07111C1.97844 2.95194 1.96734 2.7631 2.07755 2.62203L2.09978 2.59761C2.22993 2.46746 2.44095 2.46746 2.57111 2.59761ZM2.36024 6.33149L2.35293 6.33242C2.35536 6.33217 2.3578 6.33185 2.36024 6.33149ZM2.31088 6.33152L2.31385 6.33194L2.31088 6.33152ZM2.3814 6.3269L2.37242 6.3292C2.37542 6.32852 2.37842 6.32775 2.3814 6.3269ZM2.40026 6.32026L2.39333 6.323C2.39564 6.32215 2.39795 6.32123 2.40026 6.32026ZM2.25106 6.31043L2.23334 6.29839C2.24074 6.30415 2.2485 6.30919 2.25656 6.31353L2.25106 6.31043ZM2.41976 6.31047L2.4144 6.31349C2.4144 6.31349 2.41796 6.31153 2.41976 6.31047ZM5.81353 6.24343L5.81042 6.24894L5.79839 6.26667C5.80415 6.25927 5.80919 6.25149 5.81353 6.24343ZM5.82275 6.2231L5.82025 6.22939C5.82114 6.22729 5.82197 6.2252 5.82275 6.2231ZM5.82913 6.20184L5.82703 6.21006C5.82778 6.20739 5.8285 6.20462 5.82913 6.20184ZM5.83241 6.18215L5.83152 6.18912C5.83186 6.18683 5.83216 6.18449 5.83241 6.18215ZM5.66455 2.83328L4 4.49787L2.33545 2.83328L2.33327 2.83545L3.99787 4.5L2.33327 6.16455L2.33545 6.16672L4 4.50213L5.66455 6.16672L5.66673 6.16455L4.00213 4.5L5.66673 2.83545L5.66455 2.83328ZM5.83331 6.16189L5.83332 6.16672L5.83331 6.16189ZM5.83149 6.13977L5.83242 6.14707C5.83216 6.14465 5.83186 6.1422 5.83149 6.13977ZM5.8269 6.1186L5.8292 6.12758C5.82852 6.12458 5.82776 6.12158 5.8269 6.1186ZM5.82026 6.09974L5.823 6.10667C5.82214 6.10436 5.82123 6.10204 5.82026 6.09974ZM5.81048 6.08024L5.81349 6.0856C5.81349 6.0856 5.81153 6.08203 5.81048 6.08024ZM2.18651 2.9144L2.18903 2.9189L2.18651 2.9144ZM2.177 2.89333L2.17924 2.89907C2.17845 2.89716 2.17772 2.89526 2.177 2.89333ZM2.1708 2.87242L2.17226 2.87835C2.17174 2.87638 2.17125 2.87441 2.1708 2.87242ZM2.16751 2.85227L2.16806 2.85705L2.16751 2.85227ZM2.16674 2.83061L2.16667 2.83545L2.16674 2.83061ZM2.16848 2.81088L2.16806 2.81385L2.16848 2.81088ZM2.18957 2.75106L2.20161 2.73333C2.19585 2.74073 2.1908 2.74851 2.18647 2.75657L2.18957 2.75106ZM2.41433 2.68647L2.41984 2.68957L2.43756 2.70161C2.43016 2.69585 2.42238 2.69081 2.41433 2.68647ZM5.5856 2.68651L5.5811 2.68903L5.5856 2.68651ZM2.2565 2.68651L2.25199 2.68903L2.2565 2.68651ZM5.74344 2.68647L5.74894 2.68957L5.76666 2.70161C5.75926 2.69585 5.75149 2.69081 5.74344 2.68647ZM2.27691 2.67725L2.27183 2.67924L2.27691 2.67725ZM2.3933 2.67699L2.40029 2.67975C2.39796 2.67877 2.39564 2.67785 2.3933 2.67699ZM5.60667 2.677L5.60093 2.67924C5.60284 2.67846 5.60473 2.67771 5.60667 2.677ZM5.7231 2.67725L5.72939 2.67975C5.72729 2.67887 5.7252 2.67804 5.7231 2.67725ZM2.29821 2.67086L2.29254 2.67226L2.29821 2.67086ZM2.37241 2.6708L2.38143 2.6731C2.37842 2.67225 2.37542 2.67148 2.37241 2.6708ZM5.62758 2.6708L5.62165 2.67226C5.62363 2.67173 5.62559 2.67125 5.62758 2.6708ZM5.70184 2.67087L5.71006 2.67297C5.7074 2.67221 5.70463 2.67151 5.70184 2.67087ZM2.31856 2.66752L2.31385 2.66806L2.31856 2.66752ZM2.35224 2.66751L2.36022 2.66851C2.35757 2.66811 2.35491 2.66778 2.35224 2.66751ZM5.64774 2.66751L5.64295 2.66806L5.64774 2.66751ZM5.68148 2.66752L5.68912 2.66848C5.68661 2.6681 5.68405 2.66778 5.68148 2.66752ZM5.65972 2.66674L5.66941 2.66674C5.66618 2.66664 5.66295 2.66664 5.65972 2.66674ZM2.33059 2.66674L2.34028 2.66674C2.33705 2.66664 2.33382 2.66664 2.33059 2.66674Z",
|
|
@@ -25543,7 +25630,7 @@ var HomeCheckoutDisplayRow = ({
|
|
|
25543
25630
|
const checkoutClientMetadata = checkoutHistoryItem.clientMetadata;
|
|
25544
25631
|
const getStatusElement = () => {
|
|
25545
25632
|
if (isCompleted) {
|
|
25546
|
-
return /* @__PURE__ */
|
|
25633
|
+
return /* @__PURE__ */ React231.createElement(
|
|
25547
25634
|
Box,
|
|
25548
25635
|
{
|
|
25549
25636
|
display: "flex",
|
|
@@ -25551,12 +25638,12 @@ var HomeCheckoutDisplayRow = ({
|
|
|
25551
25638
|
gap: STATUS_FLEX_GAP_X,
|
|
25552
25639
|
alignItems: "center"
|
|
25553
25640
|
},
|
|
25554
|
-
/* @__PURE__ */
|
|
25555
|
-
/* @__PURE__ */
|
|
25641
|
+
/* @__PURE__ */ React231.createElement(GreenRoundCheckmark, { size: Number.parseInt(STATUS_ICON_SIZE) }),
|
|
25642
|
+
/* @__PURE__ */ React231.createElement(Text, { size: STATUS_TEXT_SIZE, color: "success" }, "Completed")
|
|
25556
25643
|
);
|
|
25557
25644
|
}
|
|
25558
25645
|
if (isError || isFailed || isExpired) {
|
|
25559
|
-
return /* @__PURE__ */
|
|
25646
|
+
return /* @__PURE__ */ React231.createElement(
|
|
25560
25647
|
Box,
|
|
25561
25648
|
{
|
|
25562
25649
|
display: "flex",
|
|
@@ -25564,12 +25651,12 @@ var HomeCheckoutDisplayRow = ({
|
|
|
25564
25651
|
gap: STATUS_FLEX_GAP_X,
|
|
25565
25652
|
alignItems: "center"
|
|
25566
25653
|
},
|
|
25567
|
-
/* @__PURE__ */
|
|
25568
|
-
/* @__PURE__ */
|
|
25654
|
+
/* @__PURE__ */ React231.createElement(RedRoundErrorCross, { size: Number.parseInt(STATUS_ICON_SIZE) }),
|
|
25655
|
+
/* @__PURE__ */ React231.createElement(Text, { size: STATUS_TEXT_SIZE, color: "error" }, "Failed")
|
|
25569
25656
|
);
|
|
25570
25657
|
}
|
|
25571
25658
|
if (isProcessing) {
|
|
25572
|
-
return /* @__PURE__ */
|
|
25659
|
+
return /* @__PURE__ */ React231.createElement(
|
|
25573
25660
|
Box,
|
|
25574
25661
|
{
|
|
25575
25662
|
display: "flex",
|
|
@@ -25577,7 +25664,7 @@ var HomeCheckoutDisplayRow = ({
|
|
|
25577
25664
|
gap: STATUS_FLEX_GAP_X,
|
|
25578
25665
|
alignItems: "center"
|
|
25579
25666
|
},
|
|
25580
|
-
/* @__PURE__ */
|
|
25667
|
+
/* @__PURE__ */ React231.createElement(
|
|
25581
25668
|
Box,
|
|
25582
25669
|
{
|
|
25583
25670
|
width: STATUS_ICON_SIZE,
|
|
@@ -25586,11 +25673,11 @@ var HomeCheckoutDisplayRow = ({
|
|
|
25586
25673
|
background: "standby"
|
|
25587
25674
|
}
|
|
25588
25675
|
),
|
|
25589
|
-
/* @__PURE__ */
|
|
25676
|
+
/* @__PURE__ */ React231.createElement(Text, { size: STATUS_TEXT_SIZE, color: "standby" }, "Processing")
|
|
25590
25677
|
);
|
|
25591
25678
|
}
|
|
25592
25679
|
};
|
|
25593
|
-
return /* @__PURE__ */
|
|
25680
|
+
return /* @__PURE__ */ React231.createElement(
|
|
25594
25681
|
Box,
|
|
25595
25682
|
{
|
|
25596
25683
|
className: clsx19(
|
|
@@ -25615,7 +25702,7 @@ var HomeCheckoutDisplayRow = ({
|
|
|
25615
25702
|
}
|
|
25616
25703
|
}
|
|
25617
25704
|
},
|
|
25618
|
-
/* @__PURE__ */
|
|
25705
|
+
/* @__PURE__ */ React231.createElement(Box, { display: "flex", alignItems: "center", gap: ROW_FLEX_GAP_X, width: "full" }, isNotNullish11(checkoutClientMetadata.initSettings.config.iconSrc) && /* @__PURE__ */ React231.createElement(
|
|
25619
25706
|
Box,
|
|
25620
25707
|
{
|
|
25621
25708
|
display: "flex",
|
|
@@ -25626,7 +25713,7 @@ var HomeCheckoutDisplayRow = ({
|
|
|
25626
25713
|
minWidth: "29px"
|
|
25627
25714
|
}
|
|
25628
25715
|
},
|
|
25629
|
-
/* @__PURE__ */
|
|
25716
|
+
/* @__PURE__ */ React231.createElement(
|
|
25630
25717
|
FunAssetAvatar,
|
|
25631
25718
|
{
|
|
25632
25719
|
assetSrc: checkoutClientMetadata.initSettings.config.iconSrc,
|
|
@@ -25636,7 +25723,7 @@ var HomeCheckoutDisplayRow = ({
|
|
|
25636
25723
|
chainId: checkoutClientMetadata.initSettings.config.targetChain
|
|
25637
25724
|
}
|
|
25638
25725
|
)
|
|
25639
|
-
), /* @__PURE__ */
|
|
25726
|
+
), /* @__PURE__ */ React231.createElement(Box, { display: "flex", flexDirection: "column", width: "full" }, /* @__PURE__ */ React231.createElement(
|
|
25640
25727
|
Box,
|
|
25641
25728
|
{
|
|
25642
25729
|
display: "flex",
|
|
@@ -25644,19 +25731,19 @@ var HomeCheckoutDisplayRow = ({
|
|
|
25644
25731
|
alignItems: "center",
|
|
25645
25732
|
gap: "16"
|
|
25646
25733
|
},
|
|
25647
|
-
/* @__PURE__ */
|
|
25648
|
-
/* @__PURE__ */
|
|
25734
|
+
/* @__PURE__ */ React231.createElement(Text, { size: TEXT_SIZE_MEDIUM2, weight: "medium", color: "primaryText" }, checkoutClientMetadata.initSettings.config.checkoutItemTitle),
|
|
25735
|
+
/* @__PURE__ */ React231.createElement(Text, { size: TEXT_SIZE_MEDIUM2, weight: "medium", color: "primaryText" }, `${formatCurrencyAndStringify13(
|
|
25649
25736
|
checkoutClientMetadata?.finalDollarValue || 0
|
|
25650
25737
|
)} USD`)
|
|
25651
|
-
), /* @__PURE__ */
|
|
25738
|
+
), /* @__PURE__ */ React231.createElement(Box, { display: "flex", justifyContent: "space-between", gap: "16" }, /* @__PURE__ */ React231.createElement(Text, { size: TEXT_SIZE_SMALL2, color: "secondaryText" }, formatTimestamp3(new Date(checkoutHistoryItem.createdTimeMs), {
|
|
25652
25739
|
year: "none",
|
|
25653
25740
|
seconds: "none",
|
|
25654
25741
|
month: "short"
|
|
25655
|
-
})), /* @__PURE__ */
|
|
25742
|
+
})), /* @__PURE__ */ React231.createElement(Box, null, getStatusElement()))))
|
|
25656
25743
|
);
|
|
25657
25744
|
};
|
|
25658
25745
|
var HomeCheckoutDisplayRowSkeleton = () => {
|
|
25659
|
-
return /* @__PURE__ */
|
|
25746
|
+
return /* @__PURE__ */ React231.createElement(
|
|
25660
25747
|
Box,
|
|
25661
25748
|
{
|
|
25662
25749
|
display: "flex",
|
|
@@ -25666,8 +25753,8 @@ var HomeCheckoutDisplayRowSkeleton = () => {
|
|
|
25666
25753
|
paddingX: PROFILE_SIDE_PADDING,
|
|
25667
25754
|
paddingY: ROW_PADDING_Y
|
|
25668
25755
|
},
|
|
25669
|
-
/* @__PURE__ */
|
|
25670
|
-
/* @__PURE__ */
|
|
25756
|
+
/* @__PURE__ */ React231.createElement(FunSkeletonCircle, { size: DEFAULT_ICON_SIZE }),
|
|
25757
|
+
/* @__PURE__ */ React231.createElement(Box, { display: "flex", flexDirection: "column", style: { flexGrow: 1 } }, /* @__PURE__ */ React231.createElement(
|
|
25671
25758
|
FunSkeletonBlock,
|
|
25672
25759
|
{
|
|
25673
25760
|
height: TEXT_SIZE_MEDIUM2,
|
|
@@ -25675,7 +25762,7 @@ var HomeCheckoutDisplayRowSkeleton = () => {
|
|
|
25675
25762
|
marginTop: TEXT_SKELETON_MARGIN_TOP2,
|
|
25676
25763
|
width: TEXT_SKELETON_WIDTH_LONG2
|
|
25677
25764
|
}
|
|
25678
|
-
), /* @__PURE__ */
|
|
25765
|
+
), /* @__PURE__ */ React231.createElement(
|
|
25679
25766
|
FunSkeletonBlock,
|
|
25680
25767
|
{
|
|
25681
25768
|
height: TEXT_SIZE_SMALL2,
|
|
@@ -25684,7 +25771,7 @@ var HomeCheckoutDisplayRowSkeleton = () => {
|
|
|
25684
25771
|
width: TEXT_SKELETON_WIDTH_MEDIUM
|
|
25685
25772
|
}
|
|
25686
25773
|
)),
|
|
25687
|
-
/* @__PURE__ */
|
|
25774
|
+
/* @__PURE__ */ React231.createElement(Box, { alignItems: "flex-end", display: "flex", flexDirection: "column" }, /* @__PURE__ */ React231.createElement(
|
|
25688
25775
|
FunSkeletonBlock,
|
|
25689
25776
|
{
|
|
25690
25777
|
height: TEXT_SIZE_MEDIUM2,
|
|
@@ -25692,7 +25779,7 @@ var HomeCheckoutDisplayRowSkeleton = () => {
|
|
|
25692
25779
|
marginTop: TEXT_SKELETON_MARGIN_TOP2,
|
|
25693
25780
|
width: TEXT_SKELETON_WIDTH_MEDIUM
|
|
25694
25781
|
}
|
|
25695
|
-
), /* @__PURE__ */
|
|
25782
|
+
), /* @__PURE__ */ React231.createElement(
|
|
25696
25783
|
FunSkeletonBlock,
|
|
25697
25784
|
{
|
|
25698
25785
|
height: STATUS_TEXT_SIZE,
|
|
@@ -25710,7 +25797,7 @@ import {
|
|
|
25710
25797
|
formatCurrencyAndStringify as formatCurrencyAndStringify14,
|
|
25711
25798
|
isMobile as isMobile10
|
|
25712
25799
|
} from "@funkit/utils";
|
|
25713
|
-
import
|
|
25800
|
+
import React232 from "react";
|
|
25714
25801
|
var TEXT_SIZE = "13";
|
|
25715
25802
|
var TEXT_SKELETON_MARGIN_TOP3 = "2";
|
|
25716
25803
|
var TEXT_SKELETON_MARGIN_BOTTOM3 = "3";
|
|
@@ -25725,7 +25812,7 @@ var HomeTokenBalanceDisplayRow = ({
|
|
|
25725
25812
|
asset.tokenBalance,
|
|
25726
25813
|
asset.decimals
|
|
25727
25814
|
);
|
|
25728
|
-
return /* @__PURE__ */
|
|
25815
|
+
return /* @__PURE__ */ React232.createElement(
|
|
25729
25816
|
Box,
|
|
25730
25817
|
{
|
|
25731
25818
|
display: "flex",
|
|
@@ -25739,7 +25826,7 @@ var HomeTokenBalanceDisplayRow = ({
|
|
|
25739
25826
|
paddingY: ROW_PADDING_Y2,
|
|
25740
25827
|
className: baseStyles4
|
|
25741
25828
|
},
|
|
25742
|
-
/* @__PURE__ */
|
|
25829
|
+
/* @__PURE__ */ React232.createElement(
|
|
25743
25830
|
Box,
|
|
25744
25831
|
{
|
|
25745
25832
|
display: "flex",
|
|
@@ -25748,7 +25835,7 @@ var HomeTokenBalanceDisplayRow = ({
|
|
|
25748
25835
|
alignItems: "flex-start",
|
|
25749
25836
|
height: "full"
|
|
25750
25837
|
},
|
|
25751
|
-
/* @__PURE__ */
|
|
25838
|
+
/* @__PURE__ */ React232.createElement(
|
|
25752
25839
|
FunAssetAvatar,
|
|
25753
25840
|
{
|
|
25754
25841
|
assetSrc: asset.logo,
|
|
@@ -25758,22 +25845,22 @@ var HomeTokenBalanceDisplayRow = ({
|
|
|
25758
25845
|
assetIconSize: DEFAULT_ICON_SIZE
|
|
25759
25846
|
}
|
|
25760
25847
|
),
|
|
25761
|
-
/* @__PURE__ */
|
|
25848
|
+
/* @__PURE__ */ React232.createElement(
|
|
25762
25849
|
Box,
|
|
25763
25850
|
{
|
|
25764
25851
|
display: "flex",
|
|
25765
25852
|
flexDirection: "column",
|
|
25766
25853
|
justifyContent: "space-between"
|
|
25767
25854
|
},
|
|
25768
|
-
/* @__PURE__ */
|
|
25769
|
-
/* @__PURE__ */
|
|
25855
|
+
/* @__PURE__ */ React232.createElement(Text, { color: "primaryText", size: TEXT_SIZE, weight: "regular" }, asset.name),
|
|
25856
|
+
/* @__PURE__ */ React232.createElement(Text, { color: "secondaryText", size: TEXT_SIZE, weight: "regular" }, formatCryptoAndStringify8(normalizedAmount, asset.symbol))
|
|
25770
25857
|
)
|
|
25771
25858
|
),
|
|
25772
|
-
/* @__PURE__ */
|
|
25859
|
+
/* @__PURE__ */ React232.createElement(Text, { color: "primaryText", size: TEXT_SIZE, weight: "regular" }, formatCurrencyAndStringify14(asset.totalUsdValue || 0))
|
|
25773
25860
|
);
|
|
25774
25861
|
};
|
|
25775
25862
|
var HomeTokenBalanceDisplayRowSkeleton = () => {
|
|
25776
|
-
return /* @__PURE__ */
|
|
25863
|
+
return /* @__PURE__ */ React232.createElement(
|
|
25777
25864
|
Box,
|
|
25778
25865
|
{
|
|
25779
25866
|
display: "flex",
|
|
@@ -25783,8 +25870,8 @@ var HomeTokenBalanceDisplayRowSkeleton = () => {
|
|
|
25783
25870
|
paddingX: PROFILE_SIDE_PADDING,
|
|
25784
25871
|
paddingY: ROW_PADDING_Y2
|
|
25785
25872
|
},
|
|
25786
|
-
/* @__PURE__ */
|
|
25787
|
-
/* @__PURE__ */
|
|
25873
|
+
/* @__PURE__ */ React232.createElement(FunSkeletonCircle, { size: DEFAULT_ICON_SIZE }),
|
|
25874
|
+
/* @__PURE__ */ React232.createElement(Box, { display: "flex", flexDirection: "column", style: { flexGrow: 1 } }, /* @__PURE__ */ React232.createElement(
|
|
25788
25875
|
FunSkeletonBlock,
|
|
25789
25876
|
{
|
|
25790
25877
|
height: TEXT_SIZE,
|
|
@@ -25792,7 +25879,7 @@ var HomeTokenBalanceDisplayRowSkeleton = () => {
|
|
|
25792
25879
|
marginTop: TEXT_SKELETON_MARGIN_TOP3,
|
|
25793
25880
|
width: TEXT_SKELETON_WIDTH_SHORT3
|
|
25794
25881
|
}
|
|
25795
|
-
), /* @__PURE__ */
|
|
25882
|
+
), /* @__PURE__ */ React232.createElement(
|
|
25796
25883
|
FunSkeletonBlock,
|
|
25797
25884
|
{
|
|
25798
25885
|
height: TEXT_SIZE,
|
|
@@ -25801,7 +25888,7 @@ var HomeTokenBalanceDisplayRowSkeleton = () => {
|
|
|
25801
25888
|
width: TEXT_SKELETON_WIDTH_LONG3
|
|
25802
25889
|
}
|
|
25803
25890
|
)),
|
|
25804
|
-
/* @__PURE__ */
|
|
25891
|
+
/* @__PURE__ */ React232.createElement(
|
|
25805
25892
|
FunSkeletonBlock,
|
|
25806
25893
|
{
|
|
25807
25894
|
height: TEXT_SIZE,
|
|
@@ -25814,13 +25901,13 @@ var HomeTokenBalanceDisplayRowSkeleton = () => {
|
|
|
25814
25901
|
};
|
|
25815
25902
|
|
|
25816
25903
|
// src/modals/ProfileDetails/FunProfileViews/Home/ProfileTitleSection.tsx
|
|
25817
|
-
import
|
|
25904
|
+
import React235 from "react";
|
|
25818
25905
|
import { useCallback as useCallback42, useState as useState61 } from "react";
|
|
25819
25906
|
|
|
25820
25907
|
// src/components/Icons/LogoutIcon.tsx
|
|
25821
|
-
import
|
|
25908
|
+
import React233 from "react";
|
|
25822
25909
|
var LogoutIcon = ({ size = 16 }) => {
|
|
25823
|
-
return /* @__PURE__ */
|
|
25910
|
+
return /* @__PURE__ */ React233.createElement(
|
|
25824
25911
|
"svg",
|
|
25825
25912
|
{
|
|
25826
25913
|
width: size,
|
|
@@ -25829,7 +25916,7 @@ var LogoutIcon = ({ size = 16 }) => {
|
|
|
25829
25916
|
fill: "none",
|
|
25830
25917
|
xmlns: "http://www.w3.org/2000/svg"
|
|
25831
25918
|
},
|
|
25832
|
-
/* @__PURE__ */
|
|
25919
|
+
/* @__PURE__ */ React233.createElement(
|
|
25833
25920
|
"path",
|
|
25834
25921
|
{
|
|
25835
25922
|
d: "M9.33463 13.3337H4.0013C3.26492 13.3337 2.66797 12.7367 2.66797 12.0003V4.00033C2.66797 3.26395 3.26492 2.66699 4.0013 2.66699H9.33463M6.66797 8.00033H14.0013M14.0013 8.00033L12.0013 10.0003M14.0013 8.00033L12.0013 6.00033",
|
|
@@ -25844,9 +25931,9 @@ var LogoutIcon = ({ size = 16 }) => {
|
|
|
25844
25931
|
};
|
|
25845
25932
|
|
|
25846
25933
|
// src/components/Icons/SettingsIcon.tsx
|
|
25847
|
-
import
|
|
25934
|
+
import React234 from "react";
|
|
25848
25935
|
var SettingsIcon = ({ size = 16 }) => {
|
|
25849
|
-
return /* @__PURE__ */
|
|
25936
|
+
return /* @__PURE__ */ React234.createElement(
|
|
25850
25937
|
"svg",
|
|
25851
25938
|
{
|
|
25852
25939
|
width: size,
|
|
@@ -25855,14 +25942,14 @@ var SettingsIcon = ({ size = 16 }) => {
|
|
|
25855
25942
|
fill: "none",
|
|
25856
25943
|
xmlns: "http://www.w3.org/2000/svg"
|
|
25857
25944
|
},
|
|
25858
|
-
/* @__PURE__ */
|
|
25945
|
+
/* @__PURE__ */ React234.createElement(
|
|
25859
25946
|
"path",
|
|
25860
25947
|
{
|
|
25861
25948
|
d: "M8.75 10.167C9.85457 10.167 10.75 9.27156 10.75 8.16699C10.75 7.06242 9.85457 6.16699 8.75 6.16699C7.64543 6.16699 6.75 7.06242 6.75 8.16699C6.75 9.27156 7.64543 10.167 8.75 10.167Z",
|
|
25862
25949
|
stroke: "currentColor"
|
|
25863
25950
|
}
|
|
25864
25951
|
),
|
|
25865
|
-
/* @__PURE__ */
|
|
25952
|
+
/* @__PURE__ */ React234.createElement(
|
|
25866
25953
|
"path",
|
|
25867
25954
|
{
|
|
25868
25955
|
d: "M9.92726 1.60149C9.68219 1.5 9.37159 1.5 8.75032 1.5C8.12906 1.5 7.81846 1.5 7.57339 1.60149C7.2467 1.73682 6.98714 1.99639 6.85181 2.32309C6.79004 2.47223 6.76586 2.64567 6.7564 2.89866C6.7425 3.27045 6.55183 3.61459 6.22962 3.80062C5.90742 3.98664 5.51405 3.97969 5.18512 3.80584C4.96129 3.68753 4.799 3.62175 4.63895 3.60068C4.28835 3.55452 3.93378 3.64953 3.65323 3.8648C3.44282 4.02625 3.2875 4.29527 2.97688 4.83329C2.66625 5.37131 2.51094 5.64032 2.47632 5.90327C2.43016 6.25387 2.52517 6.60844 2.74044 6.889C2.8387 7.01707 2.97679 7.12467 3.19112 7.25933C3.50619 7.45733 3.70892 7.7946 3.7089 8.16667C3.70888 8.53873 3.50616 8.87593 3.19111 9.07387C2.97676 9.2086 2.83864 9.31627 2.74038 9.44433C2.5251 9.72487 2.4301 10.0794 2.47626 10.43C2.51087 10.6929 2.66618 10.962 2.97681 11.5C3.28744 12.038 3.44276 12.3071 3.65316 12.4685C3.93371 12.6837 4.28828 12.7787 4.63888 12.7326C4.79892 12.7115 4.9612 12.6457 5.18502 12.5275C5.51397 12.3536 5.90736 12.3467 6.22959 12.5327C6.55182 12.7187 6.7425 13.0629 6.7564 13.4347C6.76586 13.6877 6.79004 13.8611 6.85181 14.0103C6.98714 14.3369 7.2467 14.5965 7.57339 14.7319C7.81846 14.8333 8.12906 14.8333 8.75032 14.8333C9.37159 14.8333 9.68219 14.8333 9.92726 14.7319C10.2539 14.5965 10.5135 14.3369 10.6488 14.0103C10.7106 13.8611 10.7348 13.6877 10.7443 13.4347C10.7581 13.0629 10.9488 12.7187 11.271 12.5327C11.5932 12.3466 11.9866 12.3536 12.3156 12.5275C12.5394 12.6457 12.7017 12.7115 12.8617 12.7325C13.2123 12.7787 13.5669 12.6837 13.8474 12.4685C14.0578 12.307 14.2131 12.038 14.5237 11.4999C14.8344 10.9619 14.9897 10.6929 15.0243 10.43C15.0705 10.0794 14.9755 9.7248 14.7602 9.44427C14.6619 9.3162 14.5238 9.20853 14.3095 9.07387C13.9945 8.87593 13.7917 8.53867 13.7917 8.1666C13.7917 7.79453 13.9945 7.4574 14.3095 7.25947C14.5239 7.12473 14.662 7.01713 14.7603 6.889C14.9755 6.60849 15.0705 6.25391 15.0244 5.90331C14.9898 5.64037 14.8345 5.37135 14.5238 4.83333C14.2132 4.29531 14.0579 4.0263 13.8475 3.86485C13.5669 3.64957 13.2123 3.55457 12.8617 3.60073C12.7017 3.62179 12.5395 3.68757 12.3156 3.80587C11.9867 3.97973 11.5933 3.98668 11.2711 3.80064C10.9488 3.61461 10.7581 3.27044 10.7443 2.89863C10.7348 2.64565 10.7106 2.47222 10.6488 2.32309C10.5135 1.99639 10.2539 1.73682 9.92726 1.60149Z",
|
|
@@ -25888,7 +25975,7 @@ var ProfileTitleSection = ({
|
|
|
25888
25975
|
[]
|
|
25889
25976
|
);
|
|
25890
25977
|
const isDydx = isDydxCustomer(apiKey);
|
|
25891
|
-
return /* @__PURE__ */
|
|
25978
|
+
return /* @__PURE__ */ React235.createElement(
|
|
25892
25979
|
Box,
|
|
25893
25980
|
{
|
|
25894
25981
|
display: "flex",
|
|
@@ -25897,7 +25984,7 @@ var ProfileTitleSection = ({
|
|
|
25897
25984
|
width: "full",
|
|
25898
25985
|
minHeight: "28"
|
|
25899
25986
|
},
|
|
25900
|
-
/* @__PURE__ */
|
|
25987
|
+
/* @__PURE__ */ React235.createElement(
|
|
25901
25988
|
Box,
|
|
25902
25989
|
{
|
|
25903
25990
|
display: "flex",
|
|
@@ -25906,7 +25993,7 @@ var ProfileTitleSection = ({
|
|
|
25906
25993
|
gap: "8",
|
|
25907
25994
|
className: animateOut ? animateTitleOutClass : animateTitleInClass
|
|
25908
25995
|
},
|
|
25909
|
-
!isDydx && account.address && /* @__PURE__ */
|
|
25996
|
+
!isDydx && account.address && /* @__PURE__ */ React235.createElement(
|
|
25910
25997
|
Avatar,
|
|
25911
25998
|
{
|
|
25912
25999
|
address: account.address,
|
|
@@ -25915,21 +26002,21 @@ var ProfileTitleSection = ({
|
|
|
25915
26002
|
size: 20
|
|
25916
26003
|
}
|
|
25917
26004
|
),
|
|
25918
|
-
/* @__PURE__ */
|
|
26005
|
+
/* @__PURE__ */ React235.createElement(Text, { color: "primaryText", size: "13", weight: "medium" }, isDydx ? "Checkouts" : userInfo.nameTruncated)
|
|
25919
26006
|
),
|
|
25920
|
-
/* @__PURE__ */
|
|
26007
|
+
/* @__PURE__ */ React235.createElement(Box, { display: "flex", alignItems: "center", flexDirection: "row" }, !isDisconnectExpanded && !isDydx && /* @__PURE__ */ React235.createElement(
|
|
25921
26008
|
FunIconButton,
|
|
25922
26009
|
{
|
|
25923
|
-
icon: /* @__PURE__ */
|
|
26010
|
+
icon: /* @__PURE__ */ React235.createElement(SettingsIcon, { size: 17 }),
|
|
25924
26011
|
onClick: () => onChangeView(1 /* SETTINGS */),
|
|
25925
26012
|
paddingX: "4",
|
|
25926
26013
|
paddingY: "4"
|
|
25927
26014
|
}
|
|
25928
|
-
), !isDydx && /* @__PURE__ */
|
|
26015
|
+
), !isDydx && /* @__PURE__ */ React235.createElement(FunClickOutside, { onClick: collapseDisconnect }, /* @__PURE__ */ React235.createElement(
|
|
25929
26016
|
FunIconButton,
|
|
25930
26017
|
{
|
|
25931
26018
|
size: "28",
|
|
25932
|
-
icon: /* @__PURE__ */
|
|
26019
|
+
icon: /* @__PURE__ */ React235.createElement(LogoutIcon, { size: 15 }),
|
|
25933
26020
|
paddingX: isDisconnectExpanded ? "6" : void 0,
|
|
25934
26021
|
"aria-label": "Disconnect",
|
|
25935
26022
|
onClick: isDisconnectExpanded ? onLogout : () => setIsDisconnectExpanded(true),
|
|
@@ -25937,12 +26024,12 @@ var ProfileTitleSection = ({
|
|
|
25937
26024
|
onMouseLeave: collapseDisconnect,
|
|
25938
26025
|
onBlur: collapseDisconnect
|
|
25939
26026
|
},
|
|
25940
|
-
isDisconnectExpanded && /* @__PURE__ */
|
|
25941
|
-
)), !isDisconnectExpanded && /* @__PURE__ */
|
|
26027
|
+
isDisconnectExpanded && /* @__PURE__ */ React235.createElement(Text, { size: "10", color: "secondaryText", weight: "medium" }, "Disconnect")
|
|
26028
|
+
)), !isDisconnectExpanded && /* @__PURE__ */ React235.createElement(
|
|
25942
26029
|
FunIconButton,
|
|
25943
26030
|
{
|
|
25944
26031
|
size: "28",
|
|
25945
|
-
icon: /* @__PURE__ */
|
|
26032
|
+
icon: /* @__PURE__ */ React235.createElement(CloseIcon, { size: 12 }),
|
|
25946
26033
|
onClick: onClose
|
|
25947
26034
|
}
|
|
25948
26035
|
))
|
|
@@ -25957,10 +26044,10 @@ var SelectedHomeTab = /* @__PURE__ */ ((SelectedHomeTab2) => {
|
|
|
25957
26044
|
})(SelectedHomeTab || {});
|
|
25958
26045
|
var EmptyTabAlert = () => {
|
|
25959
26046
|
const { appName } = useFunkitConfig();
|
|
25960
|
-
return /* @__PURE__ */
|
|
26047
|
+
return /* @__PURE__ */ React236.createElement(Box, { paddingX: PROFILE_SIDE_PADDING }, /* @__PURE__ */ React236.createElement(
|
|
25961
26048
|
FunAlert,
|
|
25962
26049
|
{
|
|
25963
|
-
icon: /* @__PURE__ */
|
|
26050
|
+
icon: /* @__PURE__ */ React236.createElement(GreenRoundCheckmark, null),
|
|
25964
26051
|
description: `Execute your first checkout on ${appName}`
|
|
25965
26052
|
}
|
|
25966
26053
|
));
|
|
@@ -25994,7 +26081,7 @@ function Home({
|
|
|
25994
26081
|
}, []);
|
|
25995
26082
|
const AssetsList = useMemo43(() => {
|
|
25996
26083
|
if (walletAssets && !Object.keys(walletAssets).length) {
|
|
25997
|
-
return /* @__PURE__ */
|
|
26084
|
+
return /* @__PURE__ */ React236.createElement(EmptyTabAlert, null);
|
|
25998
26085
|
}
|
|
25999
26086
|
const assets = walletAssets ? Object.values(walletAssets).sort(
|
|
26000
26087
|
(a, b) => (b.totalUsdValue ?? 0) - (a.totalUsdValue ?? 0)
|
|
@@ -26002,7 +26089,7 @@ function Home({
|
|
|
26002
26089
|
const itemHeight = HOME_TOKEN_BALANCE_DISPLAY_ROW_HEIGHT;
|
|
26003
26090
|
const itemMargin = 8;
|
|
26004
26091
|
const height = assets.length * (itemHeight + itemMargin) - itemMargin;
|
|
26005
|
-
return /* @__PURE__ */
|
|
26092
|
+
return /* @__PURE__ */ React236.createElement(Box, { ref: virtuosoParentRef }, /* @__PURE__ */ React236.createElement(
|
|
26006
26093
|
Virtuoso,
|
|
26007
26094
|
{
|
|
26008
26095
|
className: clsx20(hideScrollBar, scrollContent),
|
|
@@ -26014,14 +26101,14 @@ function Home({
|
|
|
26014
26101
|
itemContent: (index, asset) => (
|
|
26015
26102
|
// gaps/margins between items must be part of the measured content
|
|
26016
26103
|
// thus we wrap items in padded divs (margin is not measured)
|
|
26017
|
-
/* @__PURE__ */
|
|
26104
|
+
/* @__PURE__ */ React236.createElement("div", { style: { paddingTop: index === 0 ? 0 : itemMargin } }, asset ? /* @__PURE__ */ React236.createElement(HomeTokenBalanceDisplayRow, { asset }) : /* @__PURE__ */ React236.createElement(HomeTokenBalanceDisplayRowSkeleton, null))
|
|
26018
26105
|
)
|
|
26019
26106
|
}
|
|
26020
26107
|
));
|
|
26021
26108
|
}, [walletAssets]);
|
|
26022
26109
|
const CheckoutsList = useMemo43(() => {
|
|
26023
26110
|
if (checkoutHistoryList.length === 0 && isCheckoutHistoryInited) {
|
|
26024
|
-
return /* @__PURE__ */
|
|
26111
|
+
return /* @__PURE__ */ React236.createElement(EmptyTabAlert, null);
|
|
26025
26112
|
}
|
|
26026
26113
|
const processingCheckouts = checkoutHistoryList.filter(
|
|
26027
26114
|
(checkoutHistoryItem) => IN_PROGRESS_CHECKOUT_STATES2.includes(checkoutHistoryItem.state)
|
|
@@ -26083,7 +26170,7 @@ function Home({
|
|
|
26083
26170
|
const groupHeight = 15;
|
|
26084
26171
|
const groupMargin = 24;
|
|
26085
26172
|
const height = groups.length * (groupHeight + groupMargin) + (items.length - groups.length) * (itemHeight + itemMargin) - groupMargin;
|
|
26086
|
-
return /* @__PURE__ */
|
|
26173
|
+
return /* @__PURE__ */ React236.createElement(Box, { ref: virtuosoParentRef }, /* @__PURE__ */ React236.createElement(
|
|
26087
26174
|
Virtuoso,
|
|
26088
26175
|
{
|
|
26089
26176
|
className: clsx20(hideScrollBar, scrollContent),
|
|
@@ -26097,13 +26184,13 @@ function Home({
|
|
|
26097
26184
|
itemContent: (index, data) => (
|
|
26098
26185
|
// gaps/margins between items must be part of the measured content
|
|
26099
26186
|
// thus we wrap items in padded divs (margin is not measured)
|
|
26100
|
-
"group" in data ? /* @__PURE__ */
|
|
26187
|
+
"group" in data ? /* @__PURE__ */ React236.createElement("div", { style: { paddingTop: index === 0 ? 0 : groupMargin } }, /* @__PURE__ */ React236.createElement(Box, { paddingX: PROFILE_SIDE_PADDING }, /* @__PURE__ */ React236.createElement(Text, { size: "10", color: "secondaryText" }, data.group))) : /* @__PURE__ */ React236.createElement("div", { style: { paddingTop: index === 0 ? 0 : itemMargin } }, data.checkout ? /* @__PURE__ */ React236.createElement(
|
|
26101
26188
|
HomeCheckoutDisplayRow,
|
|
26102
26189
|
{
|
|
26103
26190
|
checkoutHistoryItem: data.checkout,
|
|
26104
26191
|
onSelect: handleCheckoutSelect
|
|
26105
26192
|
}
|
|
26106
|
-
) : /* @__PURE__ */
|
|
26193
|
+
) : /* @__PURE__ */ React236.createElement(HomeCheckoutDisplayRowSkeleton, null))
|
|
26107
26194
|
)
|
|
26108
26195
|
}
|
|
26109
26196
|
));
|
|
@@ -26112,7 +26199,7 @@ function Home({
|
|
|
26112
26199
|
if (tab === selectedView) return;
|
|
26113
26200
|
navigateTo(tab, tab === "assets" /* ASSETS */ ? { reverse: true } : {});
|
|
26114
26201
|
};
|
|
26115
|
-
return /* @__PURE__ */
|
|
26202
|
+
return /* @__PURE__ */ React236.createElement(Box, { paddingTop: "14" }, /* @__PURE__ */ React236.createElement(
|
|
26116
26203
|
ProfileTitleSection,
|
|
26117
26204
|
{
|
|
26118
26205
|
animateOut: animation.isOut,
|
|
@@ -26122,7 +26209,7 @@ function Home({
|
|
|
26122
26209
|
onLogout: handleLogout,
|
|
26123
26210
|
onClose
|
|
26124
26211
|
}
|
|
26125
|
-
), /* @__PURE__ */
|
|
26212
|
+
), /* @__PURE__ */ React236.createElement(
|
|
26126
26213
|
Box,
|
|
26127
26214
|
{
|
|
26128
26215
|
display: "flex",
|
|
@@ -26132,8 +26219,8 @@ function Home({
|
|
|
26132
26219
|
gap: "24",
|
|
26133
26220
|
className: getContentAnimation(animation, true)
|
|
26134
26221
|
},
|
|
26135
|
-
!isDydx && /* @__PURE__ */
|
|
26136
|
-
/* @__PURE__ */
|
|
26222
|
+
!isDydx && /* @__PURE__ */ React236.createElement(BalanceSection, { totalBalance: totalWalletAssetsUsd }),
|
|
26223
|
+
/* @__PURE__ */ React236.createElement(
|
|
26137
26224
|
Box,
|
|
26138
26225
|
{
|
|
26139
26226
|
display: "flex",
|
|
@@ -26144,7 +26231,7 @@ function Home({
|
|
|
26144
26231
|
marginLeft: `-${Number.parseInt(PROFILE_SIDE_PADDING)}px`
|
|
26145
26232
|
}
|
|
26146
26233
|
},
|
|
26147
|
-
isDydx ? CheckoutsList : /* @__PURE__ */
|
|
26234
|
+
isDydx ? CheckoutsList : /* @__PURE__ */ React236.createElement(React236.Fragment, null, /* @__PURE__ */ React236.createElement(
|
|
26148
26235
|
Box,
|
|
26149
26236
|
{
|
|
26150
26237
|
display: "flex",
|
|
@@ -26152,7 +26239,7 @@ function Home({
|
|
|
26152
26239
|
gap: "24",
|
|
26153
26240
|
paddingX: PROFILE_SIDE_PADDING
|
|
26154
26241
|
},
|
|
26155
|
-
tabs2.map(({ tab, label }) => /* @__PURE__ */
|
|
26242
|
+
tabs2.map(({ tab, label }) => /* @__PURE__ */ React236.createElement(
|
|
26156
26243
|
Box,
|
|
26157
26244
|
{
|
|
26158
26245
|
key: label,
|
|
@@ -26161,7 +26248,7 @@ function Home({
|
|
|
26161
26248
|
tabIndex: 0,
|
|
26162
26249
|
className: tabLabelStyles
|
|
26163
26250
|
},
|
|
26164
|
-
/* @__PURE__ */
|
|
26251
|
+
/* @__PURE__ */ React236.createElement(
|
|
26165
26252
|
Text,
|
|
26166
26253
|
{
|
|
26167
26254
|
weight: "bold",
|
|
@@ -26171,7 +26258,7 @@ function Home({
|
|
|
26171
26258
|
label
|
|
26172
26259
|
)
|
|
26173
26260
|
))
|
|
26174
|
-
), /* @__PURE__ */
|
|
26261
|
+
), /* @__PURE__ */ React236.createElement(Box, { className: getContentAnimation(tabAnimation, false) }, selectedView === "assets" /* ASSETS */ && AssetsList, selectedView === "checkouts" /* CHECKOUTS */ && CheckoutsList))
|
|
26175
26262
|
)
|
|
26176
26263
|
));
|
|
26177
26264
|
}
|
|
@@ -26249,11 +26336,11 @@ function ProfileDetails({ onClose, defaultTab }) {
|
|
|
26249
26336
|
depositAddress: selectedPurchaseId,
|
|
26250
26337
|
isCheckoutDetailView,
|
|
26251
26338
|
paddingTop: PADDING_TOP,
|
|
26252
|
-
topbar: dialogTitleMap[view] && /* @__PURE__ */
|
|
26339
|
+
topbar: dialogTitleMap[view] && /* @__PURE__ */ React237.createElement(Dialog.Title, { onClose, ...dialogTitleMap[view] }),
|
|
26253
26340
|
withTopDivider: withDivider,
|
|
26254
26341
|
scrollableContent: PROFILE_DETAILS_DIALOG_CONTENT_ID
|
|
26255
26342
|
});
|
|
26256
|
-
return /* @__PURE__ */
|
|
26343
|
+
return /* @__PURE__ */ React237.createElement(FunCheckoutModalHeightAnimationWrapper, null, topbar, /* @__PURE__ */ React237.createElement(
|
|
26257
26344
|
Dialog.Content,
|
|
26258
26345
|
{
|
|
26259
26346
|
display: "flex",
|
|
@@ -26270,7 +26357,7 @@ function ProfileDetails({ onClose, defaultTab }) {
|
|
|
26270
26357
|
withTopDivider,
|
|
26271
26358
|
id: PROFILE_DETAILS_DIALOG_CONTENT_ID
|
|
26272
26359
|
},
|
|
26273
|
-
view === 0 /* HOME */ ? /* @__PURE__ */
|
|
26360
|
+
view === 0 /* HOME */ ? /* @__PURE__ */ React237.createElement(
|
|
26274
26361
|
Home,
|
|
26275
26362
|
{
|
|
26276
26363
|
animation,
|
|
@@ -26279,7 +26366,7 @@ function ProfileDetails({ onClose, defaultTab }) {
|
|
|
26279
26366
|
onSelectActivity: onSelectActivityWrapper,
|
|
26280
26367
|
defaultHomeTab: selectedHomeTab
|
|
26281
26368
|
}
|
|
26282
|
-
) : view === 1 /* SETTINGS */ ? /* @__PURE__ */
|
|
26369
|
+
) : view === 1 /* SETTINGS */ ? /* @__PURE__ */ React237.createElement(Settings, null) : view === 3 /* SINGLE_ACTIVITY */ ? /* @__PURE__ */ React237.createElement(
|
|
26283
26370
|
FunCheckoutHistoryContent,
|
|
26284
26371
|
{
|
|
26285
26372
|
depositAddress: selectedPurchaseId || "0x",
|
|
@@ -26290,7 +26377,7 @@ function ProfileDetails({ onClose, defaultTab }) {
|
|
|
26290
26377
|
bottomBarId: HISTORY_BOTTOM_BAR_ID
|
|
26291
26378
|
}
|
|
26292
26379
|
) : null
|
|
26293
|
-
), /* @__PURE__ */
|
|
26380
|
+
), /* @__PURE__ */ React237.createElement(Dialog.BottomSection, { id: HISTORY_BOTTOM_BAR_ID }));
|
|
26294
26381
|
}
|
|
26295
26382
|
|
|
26296
26383
|
// src/modals/AccountModal/AccountModal.tsx
|
|
@@ -26298,7 +26385,7 @@ var TITLE_ID = "fun_account_modal_title";
|
|
|
26298
26385
|
function AccountModal({ onClose, open, defaultTab }) {
|
|
26299
26386
|
const { walletAddress } = useGeneralWallet();
|
|
26300
26387
|
if (!walletAddress) return null;
|
|
26301
|
-
return /* @__PURE__ */
|
|
26388
|
+
return /* @__PURE__ */ React238.createElement(
|
|
26302
26389
|
Dialog,
|
|
26303
26390
|
{
|
|
26304
26391
|
onClose,
|
|
@@ -26306,18 +26393,18 @@ function AccountModal({ onClose, open, defaultTab }) {
|
|
|
26306
26393
|
titleId: TITLE_ID,
|
|
26307
26394
|
isSmartCloseable: true
|
|
26308
26395
|
},
|
|
26309
|
-
/* @__PURE__ */
|
|
26396
|
+
/* @__PURE__ */ React238.createElement(ActivityTraversalProvider, null, /* @__PURE__ */ React238.createElement(ProfileDetails, { onClose, defaultTab }))
|
|
26310
26397
|
);
|
|
26311
26398
|
}
|
|
26312
26399
|
|
|
26313
26400
|
// src/modals/ChainModal/ChainModal.tsx
|
|
26314
26401
|
import { isMobile as isMobile13 } from "@funkit/utils";
|
|
26315
|
-
import
|
|
26402
|
+
import React242 from "react";
|
|
26316
26403
|
import { useAccount as useAccount7, useConfig as useConfig3 } from "wagmi";
|
|
26317
26404
|
|
|
26318
26405
|
// src/components/Icons/DisconnectSqIcon.tsx
|
|
26319
|
-
import
|
|
26320
|
-
var DisconnectSqIcon = ({ size }) => /* @__PURE__ */
|
|
26406
|
+
import React239 from "react";
|
|
26407
|
+
var DisconnectSqIcon = ({ size }) => /* @__PURE__ */ React239.createElement(
|
|
26321
26408
|
"svg",
|
|
26322
26409
|
{
|
|
26323
26410
|
fill: "none",
|
|
@@ -26326,7 +26413,7 @@ var DisconnectSqIcon = ({ size }) => /* @__PURE__ */ React238.createElement(
|
|
|
26326
26413
|
width: size,
|
|
26327
26414
|
xmlns: "http://www.w3.org/2000/svg"
|
|
26328
26415
|
},
|
|
26329
|
-
/* @__PURE__ */
|
|
26416
|
+
/* @__PURE__ */ React239.createElement(
|
|
26330
26417
|
"path",
|
|
26331
26418
|
{
|
|
26332
26419
|
d: "M6.742 22.195h8.367c1.774 0 2.743-.968 2.743-2.758V16.11h-2.016v3.11c0 .625-.305.96-.969.96H6.984c-.664 0-.968-.335-.968-.96V7.984c0-.632.304-.968.968-.968h7.883c.664 0 .969.336.969.968v3.133h2.016v-3.36c0-1.78-.97-2.757-2.743-2.757H6.742C4.97 5 4 5.977 4 7.758v11.68c0 1.789.969 2.757 2.742 2.757Zm5.438-7.703h7.601l1.149-.07-.602.406-1.008.938a.816.816 0 0 0-.258.593c0 .407.313.782.758.782.227 0 .39-.086.547-.243l2.492-2.593c.235-.235.313-.47.313-.711 0-.242-.078-.477-.313-.719l-2.492-2.586c-.156-.156-.32-.25-.547-.25-.445 0-.758.367-.758.781 0 .227.094.446.258.594l1.008.945.602.407-1.149-.079H12.18a.904.904 0 0 0 0 1.805Z",
|
|
@@ -26337,13 +26424,13 @@ var DisconnectSqIcon = ({ size }) => /* @__PURE__ */ React238.createElement(
|
|
|
26337
26424
|
|
|
26338
26425
|
// src/components/MenuButton/MenuButton.tsx
|
|
26339
26426
|
import { isMobile as isMobile11 } from "@funkit/utils";
|
|
26340
|
-
import
|
|
26427
|
+
import React240 from "react";
|
|
26341
26428
|
|
|
26342
26429
|
// src/components/MenuButton/MenuButton.css.ts
|
|
26343
26430
|
var unsetBackgroundOnHover = "_10pw5x60";
|
|
26344
26431
|
|
|
26345
26432
|
// src/components/MenuButton/MenuButton.tsx
|
|
26346
|
-
var MenuButton =
|
|
26433
|
+
var MenuButton = React240.forwardRef(
|
|
26347
26434
|
({
|
|
26348
26435
|
children,
|
|
26349
26436
|
currentlySelected = false,
|
|
@@ -26352,7 +26439,7 @@ var MenuButton = React239.forwardRef(
|
|
|
26352
26439
|
...urlProps
|
|
26353
26440
|
}, ref) => {
|
|
26354
26441
|
const mobile = isMobile11();
|
|
26355
|
-
return /* @__PURE__ */
|
|
26442
|
+
return /* @__PURE__ */ React240.createElement(
|
|
26356
26443
|
Box,
|
|
26357
26444
|
{
|
|
26358
26445
|
as: "button",
|
|
@@ -26364,7 +26451,7 @@ var MenuButton = React239.forwardRef(
|
|
|
26364
26451
|
testId,
|
|
26365
26452
|
type: "button"
|
|
26366
26453
|
},
|
|
26367
|
-
/* @__PURE__ */
|
|
26454
|
+
/* @__PURE__ */ React240.createElement(
|
|
26368
26455
|
Box,
|
|
26369
26456
|
{
|
|
26370
26457
|
borderRadius: "menuButton",
|
|
@@ -26398,7 +26485,7 @@ MenuButton.displayName = "MenuButton";
|
|
|
26398
26485
|
|
|
26399
26486
|
// src/modals/ChainModal/Chain.tsx
|
|
26400
26487
|
import { isMobile as isMobile12 } from "@funkit/utils";
|
|
26401
|
-
import
|
|
26488
|
+
import React241, { Fragment as Fragment4 } from "react";
|
|
26402
26489
|
function ChainLineItem({
|
|
26403
26490
|
chainId,
|
|
26404
26491
|
chainIconSize,
|
|
@@ -26409,7 +26496,7 @@ function ChainLineItem({
|
|
|
26409
26496
|
const enabledChainItem = enabledChainMap?.[chainId];
|
|
26410
26497
|
const chainItem = chainMetadataById[chainId] || enabledChainItem;
|
|
26411
26498
|
if (!chainItem) return null;
|
|
26412
|
-
return /* @__PURE__ */
|
|
26499
|
+
return /* @__PURE__ */ React241.createElement(
|
|
26413
26500
|
Box,
|
|
26414
26501
|
{
|
|
26415
26502
|
alignItems: "center",
|
|
@@ -26418,7 +26505,7 @@ function ChainLineItem({
|
|
|
26418
26505
|
gap,
|
|
26419
26506
|
height: chainIconSize
|
|
26420
26507
|
},
|
|
26421
|
-
/* @__PURE__ */
|
|
26508
|
+
/* @__PURE__ */ React241.createElement(Box, { height: "full" }, /* @__PURE__ */ React241.createElement(
|
|
26422
26509
|
AsyncImage,
|
|
26423
26510
|
{
|
|
26424
26511
|
alt: chainItem.name,
|
|
@@ -26430,7 +26517,7 @@ function ChainLineItem({
|
|
|
26430
26517
|
testId: `chain-option-${chainId}-icon`
|
|
26431
26518
|
}
|
|
26432
26519
|
)),
|
|
26433
|
-
!hideChainName ? /* @__PURE__ */
|
|
26520
|
+
!hideChainName ? /* @__PURE__ */ React241.createElement("div", null, chainItem.name) : null
|
|
26434
26521
|
);
|
|
26435
26522
|
}
|
|
26436
26523
|
var Chain2 = ({
|
|
@@ -26445,14 +26532,14 @@ var Chain2 = ({
|
|
|
26445
26532
|
const funkitConnectChains = useFunkitConnectChains();
|
|
26446
26533
|
const { loginType } = useGeneralWallet();
|
|
26447
26534
|
const isCurrentChain = currentChainId === chainId && !isLoading;
|
|
26448
|
-
return /* @__PURE__ */
|
|
26535
|
+
return /* @__PURE__ */ React241.createElement(Fragment4, null, /* @__PURE__ */ React241.createElement(
|
|
26449
26536
|
MenuButton,
|
|
26450
26537
|
{
|
|
26451
26538
|
currentlySelected: isCurrentChain,
|
|
26452
26539
|
onClick: isCurrentChain ? void 0 : () => switchChain({ chainId }),
|
|
26453
26540
|
testId: `chain-option-${chainId}`
|
|
26454
26541
|
},
|
|
26455
|
-
/* @__PURE__ */
|
|
26542
|
+
/* @__PURE__ */ React241.createElement(Box, { fontFamily: "body", fontSize: "16", fontWeight: "bold" }, /* @__PURE__ */ React241.createElement(
|
|
26456
26543
|
Box,
|
|
26457
26544
|
{
|
|
26458
26545
|
alignItems: "center",
|
|
@@ -26460,8 +26547,8 @@ var Chain2 = ({
|
|
|
26460
26547
|
flexDirection: "row",
|
|
26461
26548
|
justifyContent: "space-between"
|
|
26462
26549
|
},
|
|
26463
|
-
/* @__PURE__ */
|
|
26464
|
-
isCurrentChain && /* @__PURE__ */
|
|
26550
|
+
/* @__PURE__ */ React241.createElement(ChainLineItem, { chainId, chainIconSize }),
|
|
26551
|
+
isCurrentChain && /* @__PURE__ */ React241.createElement(
|
|
26465
26552
|
Box,
|
|
26466
26553
|
{
|
|
26467
26554
|
alignItems: "center",
|
|
@@ -26469,10 +26556,10 @@ var Chain2 = ({
|
|
|
26469
26556
|
flexDirection: "row",
|
|
26470
26557
|
marginRight: "6"
|
|
26471
26558
|
},
|
|
26472
|
-
/* @__PURE__ */
|
|
26473
|
-
/* @__PURE__ */
|
|
26559
|
+
/* @__PURE__ */ React241.createElement(Text, { color: "accentColorForeground", size: "14", weight: "medium" }, "Connected"),
|
|
26560
|
+
/* @__PURE__ */ React241.createElement(FunDot, null)
|
|
26474
26561
|
),
|
|
26475
|
-
isLoading && /* @__PURE__ */
|
|
26562
|
+
isLoading && /* @__PURE__ */ React241.createElement(
|
|
26476
26563
|
Box,
|
|
26477
26564
|
{
|
|
26478
26565
|
alignItems: "center",
|
|
@@ -26480,8 +26567,8 @@ var Chain2 = ({
|
|
|
26480
26567
|
flexDirection: "row",
|
|
26481
26568
|
marginRight: "6"
|
|
26482
26569
|
},
|
|
26483
|
-
/* @__PURE__ */
|
|
26484
|
-
/* @__PURE__ */
|
|
26570
|
+
/* @__PURE__ */ React241.createElement(Text, { color: "primaryText", size: "14", weight: "medium" }, loginType === "web2" /* Web2 */ ? "Switching" : "Confirm in Wallet"),
|
|
26571
|
+
/* @__PURE__ */ React241.createElement(
|
|
26485
26572
|
Box,
|
|
26486
26573
|
{
|
|
26487
26574
|
background: "standby",
|
|
@@ -26493,7 +26580,7 @@ var Chain2 = ({
|
|
|
26493
26580
|
)
|
|
26494
26581
|
)
|
|
26495
26582
|
))
|
|
26496
|
-
), mobile && idx < funkitConnectChains.length - 1 && /* @__PURE__ */
|
|
26583
|
+
), mobile && idx < funkitConnectChains.length - 1 && /* @__PURE__ */ React241.createElement(Box, { background: "generalBorderDim", height: "1", marginX: "8" }));
|
|
26497
26584
|
};
|
|
26498
26585
|
var Chain_default = Chain2;
|
|
26499
26586
|
|
|
@@ -26517,7 +26604,7 @@ function ChainModal({ onClose, open }) {
|
|
|
26517
26604
|
if (!chainId) {
|
|
26518
26605
|
return null;
|
|
26519
26606
|
}
|
|
26520
|
-
return /* @__PURE__ */
|
|
26607
|
+
return /* @__PURE__ */ React242.createElement(
|
|
26521
26608
|
Dialog,
|
|
26522
26609
|
{
|
|
26523
26610
|
onClose,
|
|
@@ -26525,15 +26612,15 @@ function ChainModal({ onClose, open }) {
|
|
|
26525
26612
|
titleId,
|
|
26526
26613
|
isSmartCloseable: true
|
|
26527
26614
|
},
|
|
26528
|
-
/* @__PURE__ */
|
|
26615
|
+
/* @__PURE__ */ React242.createElement(Dialog.Content, { paddingTop: "18" }, /* @__PURE__ */ React242.createElement(Box, { display: "flex", flexDirection: "column", gap: "14" }, /* @__PURE__ */ React242.createElement(
|
|
26529
26616
|
Box,
|
|
26530
26617
|
{
|
|
26531
26618
|
display: "flex",
|
|
26532
26619
|
flexDirection: "row",
|
|
26533
26620
|
justifyContent: "space-between"
|
|
26534
26621
|
},
|
|
26535
|
-
mobile && /* @__PURE__ */
|
|
26536
|
-
/* @__PURE__ */
|
|
26622
|
+
mobile && /* @__PURE__ */ React242.createElement(Box, { width: "30" }),
|
|
26623
|
+
/* @__PURE__ */ React242.createElement(Box, { paddingBottom: "0", paddingLeft: "8", paddingTop: "4" }, /* @__PURE__ */ React242.createElement(
|
|
26537
26624
|
Text,
|
|
26538
26625
|
{
|
|
26539
26626
|
as: "h1",
|
|
@@ -26544,8 +26631,8 @@ function ChainModal({ onClose, open }) {
|
|
|
26544
26631
|
},
|
|
26545
26632
|
"Switch Networks"
|
|
26546
26633
|
)),
|
|
26547
|
-
/* @__PURE__ */
|
|
26548
|
-
), !isCurrentChainSupported && /* @__PURE__ */
|
|
26634
|
+
/* @__PURE__ */ React242.createElement(CloseButton, { onClose })
|
|
26635
|
+
), !isCurrentChainSupported && /* @__PURE__ */ React242.createElement(Box, { marginX: "8", textAlign: mobile ? "center" : "left" }, /* @__PURE__ */ React242.createElement(Text, { color: "tertiaryText", size: "14", weight: "medium" }, "Wrong network detected, switch or disconnect to continue.")), /* @__PURE__ */ React242.createElement(
|
|
26549
26636
|
Box,
|
|
26550
26637
|
{
|
|
26551
26638
|
className: mobile ? MobileScrollClassName : DesktopScrollClassName,
|
|
@@ -26556,7 +26643,7 @@ function ChainModal({ onClose, open }) {
|
|
|
26556
26643
|
paddingBottom: "16"
|
|
26557
26644
|
},
|
|
26558
26645
|
funkitConnectChains.map(({ id }, idx) => {
|
|
26559
|
-
return /* @__PURE__ */
|
|
26646
|
+
return /* @__PURE__ */ React242.createElement(
|
|
26560
26647
|
Chain_default,
|
|
26561
26648
|
{
|
|
26562
26649
|
key: id,
|
|
@@ -26569,13 +26656,13 @@ function ChainModal({ onClose, open }) {
|
|
|
26569
26656
|
}
|
|
26570
26657
|
);
|
|
26571
26658
|
}),
|
|
26572
|
-
!isCurrentChainSupported && /* @__PURE__ */
|
|
26659
|
+
!isCurrentChainSupported && /* @__PURE__ */ React242.createElement(React242.Fragment, null, /* @__PURE__ */ React242.createElement(Box, { background: "generalBorderDim", height: "1", marginX: "8" }), /* @__PURE__ */ React242.createElement(
|
|
26573
26660
|
MenuButton,
|
|
26574
26661
|
{
|
|
26575
26662
|
onClick: () => handleLogout(),
|
|
26576
26663
|
testId: "chain-option-disconnect"
|
|
26577
26664
|
},
|
|
26578
|
-
/* @__PURE__ */
|
|
26665
|
+
/* @__PURE__ */ React242.createElement(
|
|
26579
26666
|
Box,
|
|
26580
26667
|
{
|
|
26581
26668
|
color: "error",
|
|
@@ -26583,7 +26670,7 @@ function ChainModal({ onClose, open }) {
|
|
|
26583
26670
|
fontSize: "16",
|
|
26584
26671
|
fontWeight: "bold"
|
|
26585
26672
|
},
|
|
26586
|
-
/* @__PURE__ */
|
|
26673
|
+
/* @__PURE__ */ React242.createElement(
|
|
26587
26674
|
Box,
|
|
26588
26675
|
{
|
|
26589
26676
|
alignItems: "center",
|
|
@@ -26591,7 +26678,7 @@ function ChainModal({ onClose, open }) {
|
|
|
26591
26678
|
flexDirection: "row",
|
|
26592
26679
|
justifyContent: "space-between"
|
|
26593
26680
|
},
|
|
26594
|
-
/* @__PURE__ */
|
|
26681
|
+
/* @__PURE__ */ React242.createElement(
|
|
26595
26682
|
Box,
|
|
26596
26683
|
{
|
|
26597
26684
|
alignItems: "center",
|
|
@@ -26600,7 +26687,7 @@ function ChainModal({ onClose, open }) {
|
|
|
26600
26687
|
gap: "4",
|
|
26601
26688
|
height: chainIconSize
|
|
26602
26689
|
},
|
|
26603
|
-
/* @__PURE__ */
|
|
26690
|
+
/* @__PURE__ */ React242.createElement(
|
|
26604
26691
|
Box,
|
|
26605
26692
|
{
|
|
26606
26693
|
alignItems: "center",
|
|
@@ -26609,9 +26696,9 @@ function ChainModal({ onClose, open }) {
|
|
|
26609
26696
|
justifyContent: "center",
|
|
26610
26697
|
marginRight: "8"
|
|
26611
26698
|
},
|
|
26612
|
-
/* @__PURE__ */
|
|
26699
|
+
/* @__PURE__ */ React242.createElement(DisconnectSqIcon, { size: Number(chainIconSize) })
|
|
26613
26700
|
),
|
|
26614
|
-
/* @__PURE__ */
|
|
26701
|
+
/* @__PURE__ */ React242.createElement("div", null, "Disconnect")
|
|
26615
26702
|
)
|
|
26616
26703
|
)
|
|
26617
26704
|
)
|
|
@@ -26624,10 +26711,10 @@ function ChainModal({ onClose, open }) {
|
|
|
26624
26711
|
import { FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST as FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST3 } from "@funkit/chains";
|
|
26625
26712
|
import { LogLevel, initializeRelayClient } from "@funkit/fun-relay";
|
|
26626
26713
|
import { FlagKey as FlagKey32 } from "@funkit/utils";
|
|
26627
|
-
import
|
|
26714
|
+
import React252, { useRef as useRef24 } from "react";
|
|
26628
26715
|
|
|
26629
26716
|
// src/components/DydxSwitchModalTab/DydxSwitchModalTab.tsx
|
|
26630
|
-
import
|
|
26717
|
+
import React244, { useCallback as useCallback44 } from "react";
|
|
26631
26718
|
|
|
26632
26719
|
// src/hooks/useFunkitMaxCheckoutUsdInfo.ts
|
|
26633
26720
|
import { FlagKey as FlagKey30, formatCurrencyAndStringify as formatCurrencyAndStringify15 } from "@funkit/utils";
|
|
@@ -26647,8 +26734,8 @@ var useFunkitMaxCheckoutUsdInfo = () => {
|
|
|
26647
26734
|
};
|
|
26648
26735
|
|
|
26649
26736
|
// src/components/DydxSwitchModalTab/Icons.tsx
|
|
26650
|
-
import
|
|
26651
|
-
var Instant = /* @__PURE__ */
|
|
26737
|
+
import React243 from "react";
|
|
26738
|
+
var Instant = /* @__PURE__ */ React243.createElement(
|
|
26652
26739
|
"svg",
|
|
26653
26740
|
{
|
|
26654
26741
|
width: "20",
|
|
@@ -26657,7 +26744,7 @@ var Instant = /* @__PURE__ */ React242.createElement(
|
|
|
26657
26744
|
fill: "none",
|
|
26658
26745
|
xmlns: "http://www.w3.org/2000/svg"
|
|
26659
26746
|
},
|
|
26660
|
-
/* @__PURE__ */
|
|
26747
|
+
/* @__PURE__ */ React243.createElement(
|
|
26661
26748
|
"path",
|
|
26662
26749
|
{
|
|
26663
26750
|
d: "M11.983 1.90702C12.0175 1.74537 11.9976 1.57686 11.9264 1.42768C11.8552 1.2785 11.7368 1.157 11.5894 1.08208C11.4421 1.00716 11.2741 0.98301 11.1117 1.01338C10.9492 1.04375 10.8013 1.12694 10.691 1.25002L2.19098 10.75C2.09446 10.8579 2.03124 10.9915 2.00895 11.1345C1.98665 11.2776 2.00624 11.424 2.06534 11.5562C2.12445 11.6884 2.22054 11.8006 2.34203 11.8794C2.46352 11.9581 2.6052 12 2.74998 12H9.32198L8.01698 18.093C7.98251 18.2547 8.00241 18.4232 8.07358 18.5724C8.14475 18.7216 8.2632 18.843 8.41054 18.918C8.55787 18.9929 8.72582 19.017 8.8883 18.9867C9.05077 18.9563 9.19866 18.8731 9.30898 18.75L17.809 9.25002C17.9055 9.14211 17.9687 9.00857 17.991 8.86551C18.0133 8.72246 17.9937 8.57601 17.9346 8.44385C17.8755 8.31168 17.7794 8.19945 17.6579 8.12069C17.5364 8.04194 17.3948 8.00003 17.25 8.00002H10.678L11.983 1.90702Z",
|
|
@@ -26665,7 +26752,7 @@ var Instant = /* @__PURE__ */ React242.createElement(
|
|
|
26665
26752
|
}
|
|
26666
26753
|
)
|
|
26667
26754
|
);
|
|
26668
|
-
var Standard = /* @__PURE__ */
|
|
26755
|
+
var Standard = /* @__PURE__ */ React243.createElement(
|
|
26669
26756
|
"svg",
|
|
26670
26757
|
{
|
|
26671
26758
|
width: "16",
|
|
@@ -26674,7 +26761,7 @@ var Standard = /* @__PURE__ */ React242.createElement(
|
|
|
26674
26761
|
fill: "none",
|
|
26675
26762
|
xmlns: "http://www.w3.org/2000/svg"
|
|
26676
26763
|
},
|
|
26677
|
-
/* @__PURE__ */
|
|
26764
|
+
/* @__PURE__ */ React243.createElement(
|
|
26678
26765
|
"path",
|
|
26679
26766
|
{
|
|
26680
26767
|
fillRule: "evenodd",
|
|
@@ -26690,7 +26777,7 @@ function DydxSwitchTabInternal({
|
|
|
26690
26777
|
limitLabel,
|
|
26691
26778
|
onSwitch
|
|
26692
26779
|
}) {
|
|
26693
|
-
return /* @__PURE__ */
|
|
26780
|
+
return /* @__PURE__ */ React244.createElement(
|
|
26694
26781
|
Box,
|
|
26695
26782
|
{
|
|
26696
26783
|
display: "flex",
|
|
@@ -26701,7 +26788,7 @@ function DydxSwitchTabInternal({
|
|
|
26701
26788
|
userSelect: "none",
|
|
26702
26789
|
id: "dydx-payment-switcher"
|
|
26703
26790
|
},
|
|
26704
|
-
/* @__PURE__ */
|
|
26791
|
+
/* @__PURE__ */ React244.createElement(
|
|
26705
26792
|
Box,
|
|
26706
26793
|
{
|
|
26707
26794
|
width: "half",
|
|
@@ -26714,11 +26801,11 @@ function DydxSwitchTabInternal({
|
|
|
26714
26801
|
paddingY: "12",
|
|
26715
26802
|
background: "dydxSwitchActiveBackground"
|
|
26716
26803
|
},
|
|
26717
|
-
/* @__PURE__ */
|
|
26718
|
-
/* @__PURE__ */
|
|
26719
|
-
/* @__PURE__ */
|
|
26804
|
+
/* @__PURE__ */ React244.createElement(Text, { color: "buttonBackground", style: { float: "right" } }, Instant),
|
|
26805
|
+
/* @__PURE__ */ React244.createElement(Text, { size: "16", color: "primaryText" }, "Instant"),
|
|
26806
|
+
/* @__PURE__ */ React244.createElement(Text, { size: "12", color: "primaryText" }, "Higher fees, ", limitLabel, " limit")
|
|
26720
26807
|
),
|
|
26721
|
-
/* @__PURE__ */
|
|
26808
|
+
/* @__PURE__ */ React244.createElement(
|
|
26722
26809
|
Box,
|
|
26723
26810
|
{
|
|
26724
26811
|
width: "half",
|
|
@@ -26728,9 +26815,9 @@ function DydxSwitchTabInternal({
|
|
|
26728
26815
|
cursor: "pointer",
|
|
26729
26816
|
onClick: onSwitch
|
|
26730
26817
|
},
|
|
26731
|
-
/* @__PURE__ */
|
|
26732
|
-
/* @__PURE__ */
|
|
26733
|
-
/* @__PURE__ */
|
|
26818
|
+
/* @__PURE__ */ React244.createElement(Text, { color: "tertiaryText", style: { float: "right" } }, Standard),
|
|
26819
|
+
/* @__PURE__ */ React244.createElement(Text, { size: "16", color: "tertiaryText" }, "Standard", " "),
|
|
26820
|
+
/* @__PURE__ */ React244.createElement(Text, { size: "12", color: "tertiaryText" }, "Lowest fees, no limit")
|
|
26734
26821
|
)
|
|
26735
26822
|
);
|
|
26736
26823
|
}
|
|
@@ -26755,7 +26842,7 @@ function DydxSwitchTab({
|
|
|
26755
26842
|
}
|
|
26756
26843
|
|
|
26757
26844
|
// src/components/FunCheckoutBlocked/FunCheckoutBlocked.tsx
|
|
26758
|
-
import
|
|
26845
|
+
import React245 from "react";
|
|
26759
26846
|
|
|
26760
26847
|
// src/components/FunCheckoutBlocked/FunCheckoutBlocked.css.ts
|
|
26761
26848
|
var funCheckoutBlockedStyle = "hkjz5k0";
|
|
@@ -26767,21 +26854,21 @@ var blockedReasonToDescription = {
|
|
|
26767
26854
|
};
|
|
26768
26855
|
var FunCheckoutBlocked = ({ reason }) => {
|
|
26769
26856
|
const description = blockedReasonToDescription[reason];
|
|
26770
|
-
return /* @__PURE__ */
|
|
26857
|
+
return /* @__PURE__ */ React245.createElement(Box, { className: funCheckoutBlockedStyle }, /* @__PURE__ */ React245.createElement(FunAlert, { icon: /* @__PURE__ */ React245.createElement(FunInfoIcon, null), description }));
|
|
26771
26858
|
};
|
|
26772
26859
|
|
|
26773
26860
|
// src/modals/CheckoutModal/TransferToken/CheckoutNotifications.tsx
|
|
26774
26861
|
import clsx23 from "clsx";
|
|
26775
|
-
import
|
|
26862
|
+
import React251, { useEffect as useEffect46, useMemo as useMemo44, useState as useState65 } from "react";
|
|
26776
26863
|
|
|
26777
26864
|
// src/components/FunNotificationBanner/FunNotificationShowMoreButton.tsx
|
|
26778
|
-
import
|
|
26865
|
+
import React246 from "react";
|
|
26779
26866
|
var FunNotificationShowMoreButton = ({
|
|
26780
26867
|
numberOfNotifications,
|
|
26781
26868
|
isExpanded,
|
|
26782
26869
|
onClick
|
|
26783
26870
|
}) => {
|
|
26784
|
-
const buttonTitleCompoent = /* @__PURE__ */
|
|
26871
|
+
const buttonTitleCompoent = /* @__PURE__ */ React246.createElement(Box, { display: "flex", gap: "4", alignItems: "center" }, /* @__PURE__ */ React246.createElement(Text, { size: "13" }, isExpanded ? "Show less" : `${numberOfNotifications} more`), /* @__PURE__ */ React246.createElement(
|
|
26785
26872
|
Box,
|
|
26786
26873
|
{
|
|
26787
26874
|
width: "16",
|
|
@@ -26790,7 +26877,7 @@ var FunNotificationShowMoreButton = ({
|
|
|
26790
26877
|
alignItems: "center",
|
|
26791
26878
|
justifyContent: "center"
|
|
26792
26879
|
},
|
|
26793
|
-
/* @__PURE__ */
|
|
26880
|
+
/* @__PURE__ */ React246.createElement(
|
|
26794
26881
|
Box,
|
|
26795
26882
|
{
|
|
26796
26883
|
color: "secondaryText",
|
|
@@ -26801,10 +26888,10 @@ var FunNotificationShowMoreButton = ({
|
|
|
26801
26888
|
justifyContent: "center",
|
|
26802
26889
|
style: isExpanded ? { transform: "rotate(180deg)" } : void 0
|
|
26803
26890
|
},
|
|
26804
|
-
/* @__PURE__ */
|
|
26891
|
+
/* @__PURE__ */ React246.createElement(CaretDownIcon, null)
|
|
26805
26892
|
)
|
|
26806
26893
|
));
|
|
26807
|
-
return /* @__PURE__ */
|
|
26894
|
+
return /* @__PURE__ */ React246.createElement(
|
|
26808
26895
|
FunButton,
|
|
26809
26896
|
{
|
|
26810
26897
|
type: "tertiary",
|
|
@@ -26885,11 +26972,11 @@ var useRecentDirectExecutions = ({
|
|
|
26885
26972
|
};
|
|
26886
26973
|
|
|
26887
26974
|
// src/modals/CheckoutModal/TransferToken/CheckoutNotification.tsx
|
|
26888
|
-
import
|
|
26975
|
+
import React249 from "react";
|
|
26889
26976
|
|
|
26890
26977
|
// src/components/FunNotificationBanner/FunNotificationBanner.tsx
|
|
26891
|
-
import { AnimatePresence as AnimatePresence5, motion as
|
|
26892
|
-
import
|
|
26978
|
+
import { AnimatePresence as AnimatePresence5, motion as motion13 } from "motion/react";
|
|
26979
|
+
import React248, { useState as useState64 } from "react";
|
|
26893
26980
|
import clsx22 from "clsx";
|
|
26894
26981
|
|
|
26895
26982
|
// src/components/FunNotificationBanner/FunNotificationBanner.css.ts
|
|
@@ -26898,8 +26985,8 @@ var showMoreButtonStyle = "_4yitd93 _1rsrm2fy9 _1rsrm2f1e _1rsrm2f1b _1rsrm2fjf
|
|
|
26898
26985
|
|
|
26899
26986
|
// src/components/FunNotificationBanner/FunNotificationBannerIcon.tsx
|
|
26900
26987
|
import clsx21 from "clsx";
|
|
26901
|
-
import { motion as
|
|
26902
|
-
import
|
|
26988
|
+
import { motion as motion12, useAnimate as useAnimate2 } from "motion/react";
|
|
26989
|
+
import React247, { useCallback as useCallback45, useEffect as useEffect45, useRef as useRef23 } from "react";
|
|
26903
26990
|
|
|
26904
26991
|
// src/components/FunNotificationBanner/FunNotificationBannerIcon.css.ts
|
|
26905
26992
|
var STATUS_SPINNER_BOTTOM_POSITION = -5;
|
|
@@ -26912,8 +26999,8 @@ var statusSpinner = "_1i8t3xj4 qe221a3";
|
|
|
26912
26999
|
function generateAnimationPrefixClassName(className) {
|
|
26913
27000
|
return `framer-fnb-${className}`;
|
|
26914
27001
|
}
|
|
26915
|
-
var successIcon = /* @__PURE__ */
|
|
26916
|
-
|
|
27002
|
+
var successIcon = /* @__PURE__ */ React247.createElement(
|
|
27003
|
+
motion12.svg,
|
|
26917
27004
|
{
|
|
26918
27005
|
width: "16",
|
|
26919
27006
|
height: "16",
|
|
@@ -26921,9 +27008,9 @@ var successIcon = /* @__PURE__ */ React246.createElement(
|
|
|
26921
27008
|
fill: "none",
|
|
26922
27009
|
xmlns: "http://www.w3.org/2000/svg"
|
|
26923
27010
|
},
|
|
26924
|
-
/* @__PURE__ */
|
|
26925
|
-
/* @__PURE__ */
|
|
26926
|
-
|
|
27011
|
+
/* @__PURE__ */ React247.createElement("circle", { cx: "8", cy: "8", r: "8", fill: "#66CC00" }),
|
|
27012
|
+
/* @__PURE__ */ React247.createElement(
|
|
27013
|
+
motion12.path,
|
|
26927
27014
|
{
|
|
26928
27015
|
d: "M5 8L7 10L11.5 5.5",
|
|
26929
27016
|
stroke: "white",
|
|
@@ -26932,7 +27019,7 @@ var successIcon = /* @__PURE__ */ React246.createElement(
|
|
|
26932
27019
|
}
|
|
26933
27020
|
)
|
|
26934
27021
|
);
|
|
26935
|
-
var errorIcon = /* @__PURE__ */
|
|
27022
|
+
var errorIcon = /* @__PURE__ */ React247.createElement(
|
|
26936
27023
|
"svg",
|
|
26937
27024
|
{
|
|
26938
27025
|
width: "16",
|
|
@@ -26941,8 +27028,8 @@ var errorIcon = /* @__PURE__ */ React246.createElement(
|
|
|
26941
27028
|
fill: "none",
|
|
26942
27029
|
xmlns: "http://www.w3.org/2000/svg"
|
|
26943
27030
|
},
|
|
26944
|
-
/* @__PURE__ */
|
|
26945
|
-
/* @__PURE__ */
|
|
27031
|
+
/* @__PURE__ */ React247.createElement("g", { filter: "url(#filter0_i_19769_7642)" }, /* @__PURE__ */ React247.createElement("circle", { cx: "8", cy: "8", r: "8", fill: "#F34126" })),
|
|
27032
|
+
/* @__PURE__ */ React247.createElement(
|
|
26946
27033
|
"path",
|
|
26947
27034
|
{
|
|
26948
27035
|
d: "M5 5L11 11",
|
|
@@ -26951,7 +27038,7 @@ var errorIcon = /* @__PURE__ */ React246.createElement(
|
|
|
26951
27038
|
strokeLinejoin: "round"
|
|
26952
27039
|
}
|
|
26953
27040
|
),
|
|
26954
|
-
/* @__PURE__ */
|
|
27041
|
+
/* @__PURE__ */ React247.createElement(
|
|
26955
27042
|
"path",
|
|
26956
27043
|
{
|
|
26957
27044
|
d: "M5 11L11 5",
|
|
@@ -26960,7 +27047,7 @@ var errorIcon = /* @__PURE__ */ React246.createElement(
|
|
|
26960
27047
|
strokeLinejoin: "round"
|
|
26961
27048
|
}
|
|
26962
27049
|
),
|
|
26963
|
-
/* @__PURE__ */
|
|
27050
|
+
/* @__PURE__ */ React247.createElement("defs", null, /* @__PURE__ */ React247.createElement(
|
|
26964
27051
|
"filter",
|
|
26965
27052
|
{
|
|
26966
27053
|
id: "filter0_i_19769_7642",
|
|
@@ -26971,8 +27058,8 @@ var errorIcon = /* @__PURE__ */ React246.createElement(
|
|
|
26971
27058
|
filterUnits: "userSpaceOnUse",
|
|
26972
27059
|
colorInterpolationFilters: "sRGB"
|
|
26973
27060
|
},
|
|
26974
|
-
/* @__PURE__ */
|
|
26975
|
-
/* @__PURE__ */
|
|
27061
|
+
/* @__PURE__ */ React247.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
27062
|
+
/* @__PURE__ */ React247.createElement(
|
|
26976
27063
|
"feBlend",
|
|
26977
27064
|
{
|
|
26978
27065
|
mode: "normal",
|
|
@@ -26981,7 +27068,7 @@ var errorIcon = /* @__PURE__ */ React246.createElement(
|
|
|
26981
27068
|
result: "shape"
|
|
26982
27069
|
}
|
|
26983
27070
|
),
|
|
26984
|
-
/* @__PURE__ */
|
|
27071
|
+
/* @__PURE__ */ React247.createElement(
|
|
26985
27072
|
"feColorMatrix",
|
|
26986
27073
|
{
|
|
26987
27074
|
in: "SourceAlpha",
|
|
@@ -26990,16 +27077,16 @@ var errorIcon = /* @__PURE__ */ React246.createElement(
|
|
|
26990
27077
|
result: "hardAlpha"
|
|
26991
27078
|
}
|
|
26992
27079
|
),
|
|
26993
|
-
/* @__PURE__ */
|
|
26994
|
-
/* @__PURE__ */
|
|
26995
|
-
/* @__PURE__ */
|
|
27080
|
+
/* @__PURE__ */ React247.createElement("feOffset", { dy: "-1" }),
|
|
27081
|
+
/* @__PURE__ */ React247.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
27082
|
+
/* @__PURE__ */ React247.createElement(
|
|
26996
27083
|
"feColorMatrix",
|
|
26997
27084
|
{
|
|
26998
27085
|
type: "matrix",
|
|
26999
27086
|
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"
|
|
27000
27087
|
}
|
|
27001
27088
|
),
|
|
27002
|
-
/* @__PURE__ */
|
|
27089
|
+
/* @__PURE__ */ React247.createElement(
|
|
27003
27090
|
"feBlend",
|
|
27004
27091
|
{
|
|
27005
27092
|
mode: "normal",
|
|
@@ -27009,8 +27096,8 @@ var errorIcon = /* @__PURE__ */ React246.createElement(
|
|
|
27009
27096
|
)
|
|
27010
27097
|
))
|
|
27011
27098
|
);
|
|
27012
|
-
var pendingIcon = /* @__PURE__ */
|
|
27013
|
-
|
|
27099
|
+
var pendingIcon = /* @__PURE__ */ React247.createElement(
|
|
27100
|
+
motion12.svg,
|
|
27014
27101
|
{
|
|
27015
27102
|
width: "16",
|
|
27016
27103
|
height: "16",
|
|
@@ -27018,9 +27105,9 @@ var pendingIcon = /* @__PURE__ */ React246.createElement(
|
|
|
27018
27105
|
fill: "none",
|
|
27019
27106
|
xmlns: "http://www.w3.org/2000/svg"
|
|
27020
27107
|
},
|
|
27021
|
-
/* @__PURE__ */
|
|
27022
|
-
/* @__PURE__ */
|
|
27023
|
-
|
|
27108
|
+
/* @__PURE__ */ React247.createElement("g", { filter: "url(#filter0_i_19866_15799)" }, /* @__PURE__ */ React247.createElement("circle", { cx: "8", cy: "8", r: "8", fill: "#8C8C8C" })),
|
|
27109
|
+
/* @__PURE__ */ React247.createElement("g", { clipPath: "url(#clip0_19866_15799)" }, /* @__PURE__ */ React247.createElement(
|
|
27110
|
+
motion12.path,
|
|
27024
27111
|
{
|
|
27025
27112
|
d: "M8 5V8L10 9M13 8C13 10.7614 10.7614 13 8 13C5.23858 13 3 10.7614 3 8C3 5.23858 5.23858 3 8 3C10.7614 3 13 5.23858 13 8Z",
|
|
27026
27113
|
stroke: "white",
|
|
@@ -27029,7 +27116,7 @@ var pendingIcon = /* @__PURE__ */ React246.createElement(
|
|
|
27029
27116
|
strokeLinejoin: "round"
|
|
27030
27117
|
}
|
|
27031
27118
|
)),
|
|
27032
|
-
/* @__PURE__ */
|
|
27119
|
+
/* @__PURE__ */ React247.createElement("defs", null, /* @__PURE__ */ React247.createElement(
|
|
27033
27120
|
"filter",
|
|
27034
27121
|
{
|
|
27035
27122
|
id: "filter0_i_19866_15799",
|
|
@@ -27040,8 +27127,8 @@ var pendingIcon = /* @__PURE__ */ React246.createElement(
|
|
|
27040
27127
|
filterUnits: "userSpaceOnUse",
|
|
27041
27128
|
colorInterpolationFilters: "sRGB"
|
|
27042
27129
|
},
|
|
27043
|
-
/* @__PURE__ */
|
|
27044
|
-
/* @__PURE__ */
|
|
27130
|
+
/* @__PURE__ */ React247.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
27131
|
+
/* @__PURE__ */ React247.createElement(
|
|
27045
27132
|
"feBlend",
|
|
27046
27133
|
{
|
|
27047
27134
|
mode: "normal",
|
|
@@ -27050,7 +27137,7 @@ var pendingIcon = /* @__PURE__ */ React246.createElement(
|
|
|
27050
27137
|
result: "shape"
|
|
27051
27138
|
}
|
|
27052
27139
|
),
|
|
27053
|
-
/* @__PURE__ */
|
|
27140
|
+
/* @__PURE__ */ React247.createElement(
|
|
27054
27141
|
"feColorMatrix",
|
|
27055
27142
|
{
|
|
27056
27143
|
in: "SourceAlpha",
|
|
@@ -27059,16 +27146,16 @@ var pendingIcon = /* @__PURE__ */ React246.createElement(
|
|
|
27059
27146
|
result: "hardAlpha"
|
|
27060
27147
|
}
|
|
27061
27148
|
),
|
|
27062
|
-
/* @__PURE__ */
|
|
27063
|
-
/* @__PURE__ */
|
|
27064
|
-
/* @__PURE__ */
|
|
27149
|
+
/* @__PURE__ */ React247.createElement("feOffset", { dy: "-1" }),
|
|
27150
|
+
/* @__PURE__ */ React247.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
27151
|
+
/* @__PURE__ */ React247.createElement(
|
|
27065
27152
|
"feColorMatrix",
|
|
27066
27153
|
{
|
|
27067
27154
|
type: "matrix",
|
|
27068
27155
|
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"
|
|
27069
27156
|
}
|
|
27070
27157
|
),
|
|
27071
|
-
/* @__PURE__ */
|
|
27158
|
+
/* @__PURE__ */ React247.createElement(
|
|
27072
27159
|
"feBlend",
|
|
27073
27160
|
{
|
|
27074
27161
|
mode: "normal",
|
|
@@ -27076,10 +27163,10 @@ var pendingIcon = /* @__PURE__ */ React246.createElement(
|
|
|
27076
27163
|
result: "effect1_innerShadow_19866_15799"
|
|
27077
27164
|
}
|
|
27078
27165
|
)
|
|
27079
|
-
), /* @__PURE__ */
|
|
27166
|
+
), /* @__PURE__ */ React247.createElement("clipPath", { id: "clip0_19866_15799" }, /* @__PURE__ */ React247.createElement("rect", { width: "12", height: "12", fill: "white", transform: "translate(2 2)" })))
|
|
27080
27167
|
);
|
|
27081
|
-
var downloadIcon = /* @__PURE__ */
|
|
27082
|
-
|
|
27168
|
+
var downloadIcon = /* @__PURE__ */ React247.createElement(
|
|
27169
|
+
motion12.svg,
|
|
27083
27170
|
{
|
|
27084
27171
|
width: "16",
|
|
27085
27172
|
height: "16",
|
|
@@ -27087,9 +27174,9 @@ var downloadIcon = /* @__PURE__ */ React246.createElement(
|
|
|
27087
27174
|
fill: "none",
|
|
27088
27175
|
xmlns: "http://www.w3.org/2000/svg"
|
|
27089
27176
|
},
|
|
27090
|
-
/* @__PURE__ */
|
|
27091
|
-
/* @__PURE__ */
|
|
27092
|
-
|
|
27177
|
+
/* @__PURE__ */ React247.createElement("circle", { cx: "8", cy: "8", r: "8", fill: "#66CC00" }),
|
|
27178
|
+
/* @__PURE__ */ React247.createElement(
|
|
27179
|
+
motion12.path,
|
|
27093
27180
|
{
|
|
27094
27181
|
d: "M8 4C8 6.14788 8 11.5 8 11.5M8 11.5L11 8.5M8 11.5L5 8.5",
|
|
27095
27182
|
stroke: "white",
|
|
@@ -27099,7 +27186,7 @@ var downloadIcon = /* @__PURE__ */ React246.createElement(
|
|
|
27099
27186
|
)
|
|
27100
27187
|
);
|
|
27101
27188
|
var SpinnerBase = ({ variant }) => {
|
|
27102
|
-
return /* @__PURE__ */
|
|
27189
|
+
return /* @__PURE__ */ React247.createElement(motion12.div, null, /* @__PURE__ */ React247.createElement(
|
|
27103
27190
|
Box,
|
|
27104
27191
|
{
|
|
27105
27192
|
className: clsx21(
|
|
@@ -27108,7 +27195,7 @@ var SpinnerBase = ({ variant }) => {
|
|
|
27108
27195
|
),
|
|
27109
27196
|
color: variant === "processing" ? "success" : "inputBorderHover"
|
|
27110
27197
|
},
|
|
27111
|
-
/* @__PURE__ */
|
|
27198
|
+
/* @__PURE__ */ React247.createElement(
|
|
27112
27199
|
"svg",
|
|
27113
27200
|
{
|
|
27114
27201
|
width: "24",
|
|
@@ -27117,7 +27204,7 @@ var SpinnerBase = ({ variant }) => {
|
|
|
27117
27204
|
fill: "none",
|
|
27118
27205
|
xmlns: "http://www.w3.org/2000/svg"
|
|
27119
27206
|
},
|
|
27120
|
-
/* @__PURE__ */
|
|
27207
|
+
/* @__PURE__ */ React247.createElement(
|
|
27121
27208
|
"circle",
|
|
27122
27209
|
{
|
|
27123
27210
|
opacity: "0.5",
|
|
@@ -27133,8 +27220,8 @@ var SpinnerBase = ({ variant }) => {
|
|
|
27133
27220
|
)
|
|
27134
27221
|
));
|
|
27135
27222
|
};
|
|
27136
|
-
var ProcessingSpinner = () => /* @__PURE__ */
|
|
27137
|
-
var DelayedSpinner = () => /* @__PURE__ */
|
|
27223
|
+
var ProcessingSpinner = () => /* @__PURE__ */ React247.createElement(SpinnerBase, { variant: "processing" });
|
|
27224
|
+
var DelayedSpinner = () => /* @__PURE__ */ React247.createElement(SpinnerBase, { variant: "delayed" });
|
|
27138
27225
|
var statusIconMap = {
|
|
27139
27226
|
processing: downloadIcon,
|
|
27140
27227
|
delayed: downloadIcon,
|
|
@@ -27365,7 +27452,7 @@ var FunNotificationBannerIcon = ({
|
|
|
27365
27452
|
triggerAnimationDelayedToFailed,
|
|
27366
27453
|
triggerAnimationProcessingToCompleted
|
|
27367
27454
|
]);
|
|
27368
|
-
return /* @__PURE__ */
|
|
27455
|
+
return /* @__PURE__ */ React247.createElement(Box, { width: "32", height: "32", position: "relative", ref: animationScope }, statusRef.current === "processing" && /* @__PURE__ */ React247.createElement(ProcessingSpinner, null), statusRef.current === "delayed" && /* @__PURE__ */ React247.createElement(DelayedSpinner, null), /* @__PURE__ */ React247.createElement(Box, { className: shadowStyle }, /* @__PURE__ */ React247.createElement(
|
|
27369
27456
|
AsyncImage,
|
|
27370
27457
|
{
|
|
27371
27458
|
alt: "",
|
|
@@ -27375,7 +27462,7 @@ var FunNotificationBannerIcon = ({
|
|
|
27375
27462
|
src: iconUrl ?? void 0,
|
|
27376
27463
|
fallbackSrc: fallbackIconUrl
|
|
27377
27464
|
}
|
|
27378
|
-
)), statusRef.current && /* @__PURE__ */
|
|
27465
|
+
)), statusRef.current && /* @__PURE__ */ React247.createElement(
|
|
27379
27466
|
Box,
|
|
27380
27467
|
{
|
|
27381
27468
|
className: clsx21(
|
|
@@ -27385,7 +27472,7 @@ var FunNotificationBannerIcon = ({
|
|
|
27385
27472
|
width: "20",
|
|
27386
27473
|
height: "20"
|
|
27387
27474
|
},
|
|
27388
|
-
/* @__PURE__ */
|
|
27475
|
+
/* @__PURE__ */ React247.createElement(Box, { className: clsx21(statusIcon) }, Object.entries(statusIconMap).map(([key, value]) => /* @__PURE__ */ React247.createElement(
|
|
27389
27476
|
"div",
|
|
27390
27477
|
{
|
|
27391
27478
|
key,
|
|
@@ -27410,7 +27497,7 @@ var FunNotificationBannerIcon = ({
|
|
|
27410
27497
|
};
|
|
27411
27498
|
|
|
27412
27499
|
// src/components/FunNotificationBanner/FunNotificationBanner.tsx
|
|
27413
|
-
var closeIcon = /* @__PURE__ */
|
|
27500
|
+
var closeIcon = /* @__PURE__ */ React248.createElement(
|
|
27414
27501
|
"svg",
|
|
27415
27502
|
{
|
|
27416
27503
|
width: "16",
|
|
@@ -27419,7 +27506,7 @@ var closeIcon = /* @__PURE__ */ React247.createElement(
|
|
|
27419
27506
|
fill: "none",
|
|
27420
27507
|
xmlns: "http://www.w3.org/2000/svg"
|
|
27421
27508
|
},
|
|
27422
|
-
/* @__PURE__ */
|
|
27509
|
+
/* @__PURE__ */ React248.createElement(
|
|
27423
27510
|
"path",
|
|
27424
27511
|
{
|
|
27425
27512
|
d: "M4.89066 4.15281C4.68691 3.94906 4.35657 3.94906 4.15281 4.15281C3.94906 4.35657 3.94906 4.68691 4.15281 4.89066L7.26215 8L4.15281 11.1093C3.94906 11.3131 3.94906 11.6434 4.15281 11.8472C4.35657 12.0509 4.68691 12.0509 4.89066 11.8472L8 8.73785L11.1093 11.8472C11.3131 12.0509 11.6434 12.0509 11.8472 11.8472C12.0509 11.6434 12.0509 11.3131 11.8472 11.1093L8.73785 8L11.8472 4.89066C12.0509 4.68691 12.0509 4.35657 11.8472 4.15281C11.6434 3.94906 11.3131 3.94906 11.1093 4.15281L8 7.26215L4.89066 4.15281Z",
|
|
@@ -27443,8 +27530,8 @@ var FunNotificationBanner = ({
|
|
|
27443
27530
|
setIsOpen(false);
|
|
27444
27531
|
onClosed?.();
|
|
27445
27532
|
};
|
|
27446
|
-
return /* @__PURE__ */
|
|
27447
|
-
|
|
27533
|
+
return /* @__PURE__ */ React248.createElement(AnimatePresence5, null, isOpen ? /* @__PURE__ */ React248.createElement(
|
|
27534
|
+
motion13.div,
|
|
27448
27535
|
{
|
|
27449
27536
|
initial: {
|
|
27450
27537
|
height: 0,
|
|
@@ -27472,7 +27559,7 @@ var FunNotificationBanner = ({
|
|
|
27472
27559
|
}
|
|
27473
27560
|
}
|
|
27474
27561
|
},
|
|
27475
|
-
/* @__PURE__ */
|
|
27562
|
+
/* @__PURE__ */ React248.createElement(Box, { className: clsx22(notificationBannerStyle) }, /* @__PURE__ */ React248.createElement(
|
|
27476
27563
|
FunIconButton,
|
|
27477
27564
|
{
|
|
27478
27565
|
borderRadius: "full",
|
|
@@ -27486,14 +27573,14 @@ var FunNotificationBanner = ({
|
|
|
27486
27573
|
right: "4px"
|
|
27487
27574
|
}
|
|
27488
27575
|
}
|
|
27489
|
-
), /* @__PURE__ */
|
|
27576
|
+
), /* @__PURE__ */ React248.createElement(Box, { padding: "16", display: "flex", gap: "16" }, /* @__PURE__ */ React248.createElement(
|
|
27490
27577
|
FunNotificationBannerIcon,
|
|
27491
27578
|
{
|
|
27492
27579
|
iconUrl,
|
|
27493
27580
|
status,
|
|
27494
27581
|
fallbackIconUrl
|
|
27495
27582
|
}
|
|
27496
|
-
), /* @__PURE__ */
|
|
27583
|
+
), /* @__PURE__ */ React248.createElement(Box, { display: "flex", flexDirection: "column" }, /* @__PURE__ */ React248.createElement(Box, { display: "flex", flexDirection: "column", gap: "6" }, /* @__PURE__ */ React248.createElement(
|
|
27497
27584
|
Text,
|
|
27498
27585
|
{
|
|
27499
27586
|
weight: "medium",
|
|
@@ -27501,7 +27588,7 @@ var FunNotificationBanner = ({
|
|
|
27501
27588
|
style: { lineHeight: "13px" }
|
|
27502
27589
|
},
|
|
27503
27590
|
title
|
|
27504
|
-
), /* @__PURE__ */
|
|
27591
|
+
), /* @__PURE__ */ React248.createElement(Text, { size: "12", color: "secondaryText" }, description)), disclaimer && /* @__PURE__ */ React248.createElement(
|
|
27505
27592
|
Box,
|
|
27506
27593
|
{
|
|
27507
27594
|
marginTop: "12",
|
|
@@ -27512,9 +27599,9 @@ var FunNotificationBanner = ({
|
|
|
27512
27599
|
borderRadius: "8",
|
|
27513
27600
|
borderColor: "mediumStroke"
|
|
27514
27601
|
},
|
|
27515
|
-
/* @__PURE__ */
|
|
27516
|
-
), /* @__PURE__ */
|
|
27517
|
-
|
|
27602
|
+
/* @__PURE__ */ React248.createElement(Text, { color: "secondaryText", size: "12" }, disclaimer)
|
|
27603
|
+
), /* @__PURE__ */ React248.createElement(AnimatePresence5, null, showMore && /* @__PURE__ */ React248.createElement(
|
|
27604
|
+
motion13.div,
|
|
27518
27605
|
{
|
|
27519
27606
|
initial: {
|
|
27520
27607
|
height: 0,
|
|
@@ -27550,27 +27637,27 @@ var FunNotificationBanner = ({
|
|
|
27550
27637
|
}
|
|
27551
27638
|
}
|
|
27552
27639
|
},
|
|
27553
|
-
/* @__PURE__ */
|
|
27640
|
+
/* @__PURE__ */ React248.createElement(
|
|
27554
27641
|
Box,
|
|
27555
27642
|
{
|
|
27556
27643
|
marginTop: "12"
|
|
27557
27644
|
},
|
|
27558
27645
|
children
|
|
27559
27646
|
)
|
|
27560
|
-
)))), children && /* @__PURE__ */
|
|
27647
|
+
)))), children && /* @__PURE__ */ React248.createElement(
|
|
27561
27648
|
"button",
|
|
27562
27649
|
{
|
|
27563
27650
|
type: "button",
|
|
27564
27651
|
onClick: () => setShowMore((value) => !value),
|
|
27565
27652
|
className: showMoreButtonStyle
|
|
27566
27653
|
},
|
|
27567
|
-
/* @__PURE__ */
|
|
27654
|
+
/* @__PURE__ */ React248.createElement(
|
|
27568
27655
|
Text,
|
|
27569
27656
|
{
|
|
27570
27657
|
size: "12",
|
|
27571
27658
|
color: { base: "secondaryText", hover: "primaryText" }
|
|
27572
27659
|
},
|
|
27573
|
-
/* @__PURE__ */
|
|
27660
|
+
/* @__PURE__ */ React248.createElement(Box, { paddingY: "8", textAlign: "center" }, showMore ? "See less" : "See more")
|
|
27574
27661
|
)
|
|
27575
27662
|
))
|
|
27576
27663
|
) : null);
|
|
@@ -27610,7 +27697,7 @@ var CheckoutNotification = ({
|
|
|
27610
27697
|
const { status } = getCheckoutStateBooleans(checkout.state);
|
|
27611
27698
|
const notificationStatus = isDelayed(checkout) ? "delayed" : status;
|
|
27612
27699
|
const normalizedTicker = initSettings.config.targetAssetTicker?.toUpperCase();
|
|
27613
|
-
return /* @__PURE__ */
|
|
27700
|
+
return /* @__PURE__ */ React249.createElement(
|
|
27614
27701
|
FunNotificationBanner,
|
|
27615
27702
|
{
|
|
27616
27703
|
description: parseDescription(checkout),
|
|
@@ -27620,7 +27707,7 @@ var CheckoutNotification = ({
|
|
|
27620
27707
|
status: notificationStatus,
|
|
27621
27708
|
onClosed: () => onClose(depositAddress)
|
|
27622
27709
|
},
|
|
27623
|
-
/* @__PURE__ */
|
|
27710
|
+
/* @__PURE__ */ React249.createElement(
|
|
27624
27711
|
Box,
|
|
27625
27712
|
{
|
|
27626
27713
|
paddingY: "8",
|
|
@@ -27631,7 +27718,7 @@ var CheckoutNotification = ({
|
|
|
27631
27718
|
borderWidth: "1",
|
|
27632
27719
|
borderStyle: "solid"
|
|
27633
27720
|
},
|
|
27634
|
-
/* @__PURE__ */
|
|
27721
|
+
/* @__PURE__ */ React249.createElement(OrderDetailSection, { checkoutHistoryItem: checkout })
|
|
27635
27722
|
)
|
|
27636
27723
|
);
|
|
27637
27724
|
};
|
|
@@ -27668,7 +27755,7 @@ var parseDescription = (checkout) => {
|
|
|
27668
27755
|
};
|
|
27669
27756
|
var parseDisclaimer = (checkout, onHelp) => {
|
|
27670
27757
|
const { isError } = getCheckoutStateBooleans(checkout.state);
|
|
27671
|
-
const contactLink = /* @__PURE__ */
|
|
27758
|
+
const contactLink = /* @__PURE__ */ React249.createElement(
|
|
27672
27759
|
FunLinkButton,
|
|
27673
27760
|
{
|
|
27674
27761
|
text: "Contact us",
|
|
@@ -27679,16 +27766,16 @@ var parseDisclaimer = (checkout, onHelp) => {
|
|
|
27679
27766
|
}
|
|
27680
27767
|
);
|
|
27681
27768
|
if (isError) {
|
|
27682
|
-
return /* @__PURE__ */
|
|
27769
|
+
return /* @__PURE__ */ React249.createElement(React249.Fragment, null, "Your deposit is being processed. ", contactLink, " for more info.");
|
|
27683
27770
|
}
|
|
27684
27771
|
if (checkout.refundState === "REFUNDED") return "Your order was refunded.";
|
|
27685
27772
|
if (checkout.refundState === "PROCEEDED" || isDelayed(checkout)) {
|
|
27686
|
-
return /* @__PURE__ */
|
|
27773
|
+
return /* @__PURE__ */ React249.createElement(React249.Fragment, null, "Transaction was delayed but your funds are safe. ", contactLink, " for more info.");
|
|
27687
27774
|
}
|
|
27688
27775
|
};
|
|
27689
27776
|
|
|
27690
27777
|
// src/modals/CheckoutModal/TransferToken/DirectExecutionNotification.tsx
|
|
27691
|
-
import
|
|
27778
|
+
import React250 from "react";
|
|
27692
27779
|
var mapDirectExecutionStateToNotificationStatus = (isDelayed2, isRefunded, isCompleted, isFailed) => {
|
|
27693
27780
|
if (isDelayed2) return "delayed";
|
|
27694
27781
|
if (isCompleted) return "completed";
|
|
@@ -27712,7 +27799,7 @@ var DirectExecutionNotification = ({
|
|
|
27712
27799
|
isFailed
|
|
27713
27800
|
);
|
|
27714
27801
|
const normalizedTicker = initSettings.config.targetAssetTicker?.toUpperCase();
|
|
27715
|
-
return /* @__PURE__ */
|
|
27802
|
+
return /* @__PURE__ */ React250.createElement(
|
|
27716
27803
|
FunNotificationBanner,
|
|
27717
27804
|
{
|
|
27718
27805
|
description: parseDescription2(
|
|
@@ -27732,7 +27819,7 @@ var DirectExecutionNotification = ({
|
|
|
27732
27819
|
status: notificationStatus,
|
|
27733
27820
|
onClosed: () => onClose(directExecution.txHash)
|
|
27734
27821
|
},
|
|
27735
|
-
/* @__PURE__ */
|
|
27822
|
+
/* @__PURE__ */ React250.createElement(
|
|
27736
27823
|
Box,
|
|
27737
27824
|
{
|
|
27738
27825
|
paddingY: "8",
|
|
@@ -27743,7 +27830,7 @@ var DirectExecutionNotification = ({
|
|
|
27743
27830
|
borderWidth: "1",
|
|
27744
27831
|
borderStyle: "solid"
|
|
27745
27832
|
},
|
|
27746
|
-
/* @__PURE__ */
|
|
27833
|
+
/* @__PURE__ */ React250.createElement(DirectExecutionOrderDetailSection, { directExecution })
|
|
27747
27834
|
)
|
|
27748
27835
|
);
|
|
27749
27836
|
};
|
|
@@ -27769,7 +27856,7 @@ var parseDescription2 = (isDelayed2, isRefunded, isCompleted, isFailed) => {
|
|
|
27769
27856
|
return "";
|
|
27770
27857
|
};
|
|
27771
27858
|
var parseDisclaimer2 = (isRefunded, isDelayed2, isFailed, onHelp) => {
|
|
27772
|
-
const contactLink = /* @__PURE__ */
|
|
27859
|
+
const contactLink = /* @__PURE__ */ React250.createElement(
|
|
27773
27860
|
FunLinkButton,
|
|
27774
27861
|
{
|
|
27775
27862
|
text: "Contact us",
|
|
@@ -27780,10 +27867,10 @@ var parseDisclaimer2 = (isRefunded, isDelayed2, isFailed, onHelp) => {
|
|
|
27780
27867
|
}
|
|
27781
27868
|
);
|
|
27782
27869
|
if (isFailed || isRefunded) {
|
|
27783
|
-
return /* @__PURE__ */
|
|
27870
|
+
return /* @__PURE__ */ React250.createElement(React250.Fragment, null, "Your deposit didn't complete. ", contactLink, " for more info.");
|
|
27784
27871
|
}
|
|
27785
27872
|
if (isDelayed2) {
|
|
27786
|
-
return /* @__PURE__ */
|
|
27873
|
+
return /* @__PURE__ */ React250.createElement(React250.Fragment, null, "Your deposit is delayed but funds are safe. ", contactLink, " for more info.");
|
|
27787
27874
|
}
|
|
27788
27875
|
};
|
|
27789
27876
|
|
|
@@ -27833,7 +27920,7 @@ var CheckoutNotifications = ({
|
|
|
27833
27920
|
}, [isExpanded, combinedNotifications]);
|
|
27834
27921
|
const handleNotificationClose = (id) => setClosedNotifications((prev) => [...prev, id]);
|
|
27835
27922
|
if (!isVisible) return null;
|
|
27836
|
-
return /* @__PURE__ */
|
|
27923
|
+
return /* @__PURE__ */ React251.createElement(
|
|
27837
27924
|
Box,
|
|
27838
27925
|
{
|
|
27839
27926
|
position: "absolute",
|
|
@@ -27841,9 +27928,9 @@ var CheckoutNotifications = ({
|
|
|
27841
27928
|
maxHeight: "full",
|
|
27842
27929
|
style: { bottom: 0, left: 0, right: 0, zIndex: OVERLAY_Z_INDEX }
|
|
27843
27930
|
},
|
|
27844
|
-
/* @__PURE__ */
|
|
27931
|
+
/* @__PURE__ */ React251.createElement(Box, { display: "flex", flexDirection: "column", gap: "8", padding: "8" }, displayedNotifications.map((item) => {
|
|
27845
27932
|
if (item.isDirectExecution) {
|
|
27846
|
-
return /* @__PURE__ */
|
|
27933
|
+
return /* @__PURE__ */ React251.createElement(
|
|
27847
27934
|
DirectExecutionNotification,
|
|
27848
27935
|
{
|
|
27849
27936
|
key: item.txHash,
|
|
@@ -27853,7 +27940,7 @@ var CheckoutNotifications = ({
|
|
|
27853
27940
|
}
|
|
27854
27941
|
);
|
|
27855
27942
|
}
|
|
27856
|
-
return /* @__PURE__ */
|
|
27943
|
+
return /* @__PURE__ */ React251.createElement(
|
|
27857
27944
|
CheckoutNotification,
|
|
27858
27945
|
{
|
|
27859
27946
|
key: item.depositAddr,
|
|
@@ -27862,7 +27949,7 @@ var CheckoutNotifications = ({
|
|
|
27862
27949
|
onHelp
|
|
27863
27950
|
}
|
|
27864
27951
|
);
|
|
27865
|
-
}), combinedNotifications.length > COLLAPSED_COUNT && /* @__PURE__ */
|
|
27952
|
+
}), combinedNotifications.length > COLLAPSED_COUNT && /* @__PURE__ */ React251.createElement(
|
|
27866
27953
|
FunNotificationShowMoreButton,
|
|
27867
27954
|
{
|
|
27868
27955
|
isExpanded,
|
|
@@ -27901,7 +27988,7 @@ initializeRelayClient({
|
|
|
27901
27988
|
var CHECKOUT_DIALOG_CONTENT_ID = "checkout-dialog-content";
|
|
27902
27989
|
function FunCheckoutModalStepComponent(props) {
|
|
27903
27990
|
const { Component: Component2 } = CheckoutModalSteps[props.modalState.step];
|
|
27904
|
-
return /* @__PURE__ */
|
|
27991
|
+
return /* @__PURE__ */ React252.createElement(Component2, { ...props });
|
|
27905
27992
|
}
|
|
27906
27993
|
function FunCheckoutModalInner({
|
|
27907
27994
|
checkoutItem,
|
|
@@ -27959,7 +28046,7 @@ function FunCheckoutModalInner({
|
|
|
27959
28046
|
depositAddress: checkoutItem.depositAddress ?? void 0,
|
|
27960
28047
|
isCheckoutDetailView: modalState.step === "checkout_complete" /* CHECKOUT_COMPLETE */,
|
|
27961
28048
|
paddingTop: 0,
|
|
27962
|
-
topbar: /* @__PURE__ */
|
|
28049
|
+
topbar: /* @__PURE__ */ React252.createElement(
|
|
27963
28050
|
Dialog.Title,
|
|
27964
28051
|
{
|
|
27965
28052
|
hasBackButton: hasBack && !isBlocked,
|
|
@@ -27975,7 +28062,7 @@ function FunCheckoutModalInner({
|
|
|
27975
28062
|
withTopDivider: checkoutConfig.modalTitleMeta ? "always" : "scroll",
|
|
27976
28063
|
scrollableContent: CHECKOUT_DIALOG_CONTENT_ID
|
|
27977
28064
|
});
|
|
27978
|
-
return /* @__PURE__ */
|
|
28065
|
+
return /* @__PURE__ */ React252.createElement(
|
|
27979
28066
|
Dialog,
|
|
27980
28067
|
{
|
|
27981
28068
|
open,
|
|
@@ -27984,7 +28071,7 @@ function FunCheckoutModalInner({
|
|
|
27984
28071
|
titleId: "fun-checkout-modal",
|
|
27985
28072
|
isHidden: modalState.isSoftHidden
|
|
27986
28073
|
},
|
|
27987
|
-
/* @__PURE__ */
|
|
28074
|
+
/* @__PURE__ */ React252.createElement(FunCheckoutModalHeightAnimationWrapper, { checkoutStep: modalState.step }, topbar, /* @__PURE__ */ React252.createElement(
|
|
27988
28075
|
Dialog.Content,
|
|
27989
28076
|
{
|
|
27990
28077
|
fullHeight: showFullHeight,
|
|
@@ -27994,20 +28081,20 @@ function FunCheckoutModalInner({
|
|
|
27994
28081
|
withBottomDivider: modalState.step === "transfer_token" /* TRANSFER_TOKEN */ || modalState.step === "fiat_account_detail" /* FIAT_ACCOUNT_DETAIL */ ? "never" : "scroll",
|
|
27995
28082
|
id: CHECKOUT_DIALOG_CONTENT_ID
|
|
27996
28083
|
},
|
|
27997
|
-
isBlocked ? /* @__PURE__ */
|
|
28084
|
+
isBlocked ? /* @__PURE__ */ React252.createElement(
|
|
27998
28085
|
FunCheckoutBlocked,
|
|
27999
28086
|
{
|
|
28000
28087
|
reason: isUserGeoblocked ? "geoblock" : "security"
|
|
28001
28088
|
}
|
|
28002
|
-
) : /* @__PURE__ */
|
|
28089
|
+
) : /* @__PURE__ */ React252.createElement(React252.Fragment, null, /* @__PURE__ */ React252.createElement(
|
|
28003
28090
|
DydxSwitchTab,
|
|
28004
28091
|
{
|
|
28005
28092
|
onSwitch: checkoutItem.initSettings.onDydxSwitch,
|
|
28006
28093
|
showSwitch: showDydxSwitch,
|
|
28007
28094
|
onClose: onCloseWrapper
|
|
28008
28095
|
}
|
|
28009
|
-
), /* @__PURE__ */
|
|
28010
|
-
), /* @__PURE__ */
|
|
28096
|
+
), /* @__PURE__ */ React252.createElement(FunCheckoutModalStepComponent, { ...modalProps }))
|
|
28097
|
+
), /* @__PURE__ */ React252.createElement(Dialog.BottomSection, { id: CHECKOUT_MODAL_BOTTOM_BAR_ID }), !isBlocked && /* @__PURE__ */ React252.createElement(
|
|
28011
28098
|
CheckoutNotifications,
|
|
28012
28099
|
{
|
|
28013
28100
|
onHelp: handleCheckoutHelp,
|
|
@@ -28021,7 +28108,7 @@ function FunCheckoutModal({ onClose, open }) {
|
|
|
28021
28108
|
if (!checkoutItem) {
|
|
28022
28109
|
return null;
|
|
28023
28110
|
}
|
|
28024
|
-
return /* @__PURE__ */
|
|
28111
|
+
return /* @__PURE__ */ React252.createElement(
|
|
28025
28112
|
FunCheckoutModalInner,
|
|
28026
28113
|
{
|
|
28027
28114
|
checkoutItem,
|
|
@@ -28032,7 +28119,7 @@ function FunCheckoutModal({ onClose, open }) {
|
|
|
28032
28119
|
}
|
|
28033
28120
|
|
|
28034
28121
|
// src/modals/ConnectModal/ConnectModal.tsx
|
|
28035
|
-
import
|
|
28122
|
+
import React253 from "react";
|
|
28036
28123
|
import { useAccount as useAccount8 } from "wagmi";
|
|
28037
28124
|
var TITLE_ID2 = "rk_connect_title";
|
|
28038
28125
|
function ConnectModal({
|
|
@@ -28043,12 +28130,12 @@ function ConnectModal({
|
|
|
28043
28130
|
const connectionStatus = useConnectionStatus();
|
|
28044
28131
|
const { disconnect } = useFunkitDisconnect();
|
|
28045
28132
|
const { isConnecting } = useAccount8();
|
|
28046
|
-
const onConnectModalCancel =
|
|
28133
|
+
const onConnectModalCancel = React253.useCallback(() => {
|
|
28047
28134
|
if (isConnecting) disconnect();
|
|
28048
28135
|
onClose();
|
|
28049
28136
|
}, [onClose, disconnect, isConnecting]);
|
|
28050
28137
|
if (connectionStatus === "disconnected" || connectionStatus === "loading") {
|
|
28051
|
-
return /* @__PURE__ */
|
|
28138
|
+
return /* @__PURE__ */ React253.createElement(
|
|
28052
28139
|
Dialog,
|
|
28053
28140
|
{
|
|
28054
28141
|
onClose: onConnectModalCancel,
|
|
@@ -28056,7 +28143,7 @@ function ConnectModal({
|
|
|
28056
28143
|
titleId: TITLE_ID2,
|
|
28057
28144
|
isSmartCloseable: true
|
|
28058
28145
|
},
|
|
28059
|
-
/* @__PURE__ */
|
|
28146
|
+
/* @__PURE__ */ React253.createElement(
|
|
28060
28147
|
FunConnectOptions,
|
|
28061
28148
|
{
|
|
28062
28149
|
onClose: onConnectModalCancel,
|
|
@@ -28150,7 +28237,7 @@ function ModalProvider({ children }) {
|
|
|
28150
28237
|
useEffect47(() => {
|
|
28151
28238
|
if (isUnauthenticated) closeModals();
|
|
28152
28239
|
}, [isUnauthenticated]);
|
|
28153
|
-
return /* @__PURE__ */
|
|
28240
|
+
return /* @__PURE__ */ React254.createElement(
|
|
28154
28241
|
ModalContext.Provider,
|
|
28155
28242
|
{
|
|
28156
28243
|
value: useMemo45(
|
|
@@ -28188,7 +28275,7 @@ function ModalProvider({ children }) {
|
|
|
28188
28275
|
)
|
|
28189
28276
|
},
|
|
28190
28277
|
children,
|
|
28191
|
-
/* @__PURE__ */
|
|
28278
|
+
/* @__PURE__ */ React254.createElement(
|
|
28192
28279
|
ConnectModal,
|
|
28193
28280
|
{
|
|
28194
28281
|
onClose: closeConnectModal,
|
|
@@ -28196,7 +28283,7 @@ function ModalProvider({ children }) {
|
|
|
28196
28283
|
walletsOnly: !!walletsOnly
|
|
28197
28284
|
}
|
|
28198
28285
|
),
|
|
28199
|
-
/* @__PURE__ */
|
|
28286
|
+
/* @__PURE__ */ React254.createElement(
|
|
28200
28287
|
AccountModal,
|
|
28201
28288
|
{
|
|
28202
28289
|
onClose: closeAccountModal,
|
|
@@ -28204,8 +28291,8 @@ function ModalProvider({ children }) {
|
|
|
28204
28291
|
defaultTab: accountModalTab
|
|
28205
28292
|
}
|
|
28206
28293
|
),
|
|
28207
|
-
/* @__PURE__ */
|
|
28208
|
-
/* @__PURE__ */
|
|
28294
|
+
/* @__PURE__ */ React254.createElement(ChainModal, { onClose: closeChainModal, open: chainModalOpen }),
|
|
28295
|
+
/* @__PURE__ */ React254.createElement(
|
|
28209
28296
|
FunCheckoutModal,
|
|
28210
28297
|
{
|
|
28211
28298
|
onClose: closeFunCheckoutModal,
|
|
@@ -28946,7 +29033,7 @@ var FunkitWeb2Provider = ({
|
|
|
28946
29033
|
handleFunkitWeb2Logout,
|
|
28947
29034
|
web2UserInfo
|
|
28948
29035
|
};
|
|
28949
|
-
return /* @__PURE__ */
|
|
29036
|
+
return /* @__PURE__ */ React255.createElement(FunkitWeb2Context.Provider, { value: contextValue }, privyIframeUrl ? /* @__PURE__ */ React255.createElement(
|
|
28950
29037
|
"iframe",
|
|
28951
29038
|
{
|
|
28952
29039
|
id: PRIVY_IFRAME_ID,
|
|
@@ -28979,7 +29066,7 @@ function useConnectionStatus() {
|
|
|
28979
29066
|
}
|
|
28980
29067
|
|
|
28981
29068
|
// src/providers/ShowBalanceContext.tsx
|
|
28982
|
-
import
|
|
29069
|
+
import React256, {
|
|
28983
29070
|
createContext as createContext19,
|
|
28984
29071
|
useContext as useContext19,
|
|
28985
29072
|
useState as useState68
|
|
@@ -28990,13 +29077,13 @@ var ShowBalanceContext = createContext19({
|
|
|
28990
29077
|
});
|
|
28991
29078
|
function ShowBalanceProvider({ children }) {
|
|
28992
29079
|
const [showBalance, setShowBalance] = useState68();
|
|
28993
|
-
return /* @__PURE__ */
|
|
29080
|
+
return /* @__PURE__ */ React256.createElement(ShowBalanceContext.Provider, { value: { showBalance, setShowBalance } }, children);
|
|
28994
29081
|
}
|
|
28995
29082
|
var useShowBalance = () => useContext19(ShowBalanceContext);
|
|
28996
29083
|
|
|
28997
29084
|
// src/components/ConnectButton/ConnectButtonRenderer.tsx
|
|
28998
29085
|
import { formatCurrencyAndStringify as formatCurrencyAndStringify16, isMobile as isMobile14, noop as noop8 } from "@funkit/utils";
|
|
28999
|
-
import
|
|
29086
|
+
import React257 from "react";
|
|
29000
29087
|
import { useAccount as useAccount11, useBalance, useConfig as useConfig6 } from "wagmi";
|
|
29001
29088
|
|
|
29002
29089
|
// src/hooks/useIsMounted.ts
|
|
@@ -29087,7 +29174,7 @@ function ConnectButtonRenderer({
|
|
|
29087
29174
|
const { openChainModal } = useChainModal();
|
|
29088
29175
|
const { openAccountModal } = useAccountModal();
|
|
29089
29176
|
const { accountModalOpen, chainModalOpen, connectModalOpen } = useModalState();
|
|
29090
|
-
return /* @__PURE__ */
|
|
29177
|
+
return /* @__PURE__ */ React257.createElement(React257.Fragment, null, children({
|
|
29091
29178
|
account: address ? {
|
|
29092
29179
|
address,
|
|
29093
29180
|
balanceDecimals: balanceData?.decimals,
|
|
@@ -29143,7 +29230,7 @@ function ChainSelectorButton({
|
|
|
29143
29230
|
openChainModal,
|
|
29144
29231
|
chain
|
|
29145
29232
|
}) {
|
|
29146
|
-
return /* @__PURE__ */
|
|
29233
|
+
return /* @__PURE__ */ React258.createElement(
|
|
29147
29234
|
Box,
|
|
29148
29235
|
{
|
|
29149
29236
|
alignItems: "center",
|
|
@@ -29171,7 +29258,7 @@ function ChainSelectorButton({
|
|
|
29171
29258
|
type: "button",
|
|
29172
29259
|
...connectButtonStyles
|
|
29173
29260
|
},
|
|
29174
|
-
unsupportedChain ? /* @__PURE__ */
|
|
29261
|
+
unsupportedChain ? /* @__PURE__ */ React258.createElement(Box, { alignItems: "center", display: "flex", height: "24", paddingX: "4" }, "Wrong network") : /* @__PURE__ */ React258.createElement(Box, { alignItems: "center", display: "flex", gap: "6" }, chain.hasIcon ? /* @__PURE__ */ React258.createElement(
|
|
29175
29262
|
Box,
|
|
29176
29263
|
{
|
|
29177
29264
|
display: mapResponsiveValue(
|
|
@@ -29181,7 +29268,7 @@ function ChainSelectorButton({
|
|
|
29181
29268
|
height: "12",
|
|
29182
29269
|
width: "12"
|
|
29183
29270
|
},
|
|
29184
|
-
/* @__PURE__ */
|
|
29271
|
+
/* @__PURE__ */ React258.createElement(
|
|
29185
29272
|
AsyncImage,
|
|
29186
29273
|
{
|
|
29187
29274
|
alt: chain.name ?? "Chain icon",
|
|
@@ -29192,7 +29279,7 @@ function ChainSelectorButton({
|
|
|
29192
29279
|
src: chain.iconUrl
|
|
29193
29280
|
}
|
|
29194
29281
|
)
|
|
29195
|
-
) : null, /* @__PURE__ */
|
|
29282
|
+
) : null, /* @__PURE__ */ React258.createElement(
|
|
29196
29283
|
Box,
|
|
29197
29284
|
{
|
|
29198
29285
|
display: mapResponsiveValue(chainStatus, (value) => {
|
|
@@ -29212,7 +29299,7 @@ function AccountButton({
|
|
|
29212
29299
|
showBalance,
|
|
29213
29300
|
accountStatus
|
|
29214
29301
|
}) {
|
|
29215
|
-
return /* @__PURE__ */
|
|
29302
|
+
return /* @__PURE__ */ React258.createElement(
|
|
29216
29303
|
Box,
|
|
29217
29304
|
{
|
|
29218
29305
|
alignItems: "center",
|
|
@@ -29232,7 +29319,7 @@ function AccountButton({
|
|
|
29232
29319
|
gap: "16",
|
|
29233
29320
|
...connectButtonStyles
|
|
29234
29321
|
},
|
|
29235
|
-
account.displayBalance && /* @__PURE__ */
|
|
29322
|
+
account.displayBalance && /* @__PURE__ */ React258.createElement(
|
|
29236
29323
|
Box,
|
|
29237
29324
|
{
|
|
29238
29325
|
display: mapResponsiveValue(
|
|
@@ -29242,7 +29329,7 @@ function AccountButton({
|
|
|
29242
29329
|
},
|
|
29243
29330
|
account.displayBalance
|
|
29244
29331
|
),
|
|
29245
|
-
/* @__PURE__ */
|
|
29332
|
+
/* @__PURE__ */ React258.createElement(Box, { alignItems: "center", display: "flex", gap: "6" }, /* @__PURE__ */ React258.createElement(
|
|
29246
29333
|
Box,
|
|
29247
29334
|
{
|
|
29248
29335
|
display: mapResponsiveValue(
|
|
@@ -29250,7 +29337,7 @@ function AccountButton({
|
|
|
29250
29337
|
(value) => value === "full" || value === "avatar" ? "block" : "none"
|
|
29251
29338
|
)
|
|
29252
29339
|
},
|
|
29253
|
-
/* @__PURE__ */
|
|
29340
|
+
/* @__PURE__ */ React258.createElement(
|
|
29254
29341
|
Avatar,
|
|
29255
29342
|
{
|
|
29256
29343
|
address: account.address,
|
|
@@ -29259,7 +29346,7 @@ function AccountButton({
|
|
|
29259
29346
|
size: 12
|
|
29260
29347
|
}
|
|
29261
29348
|
)
|
|
29262
|
-
), /* @__PURE__ */
|
|
29349
|
+
), /* @__PURE__ */ React258.createElement(
|
|
29263
29350
|
Box,
|
|
29264
29351
|
{
|
|
29265
29352
|
display: mapResponsiveValue(
|
|
@@ -29290,7 +29377,7 @@ function ConnectButton({
|
|
|
29290
29377
|
setShowBalance(showBalance);
|
|
29291
29378
|
if (!ready) setReady(true);
|
|
29292
29379
|
}, [showBalance, setShowBalance, ready]);
|
|
29293
|
-
return ready ? /* @__PURE__ */
|
|
29380
|
+
return ready ? /* @__PURE__ */ React258.createElement(ConnectButtonRenderer, null, ({
|
|
29294
29381
|
account,
|
|
29295
29382
|
chain,
|
|
29296
29383
|
mounted,
|
|
@@ -29300,7 +29387,7 @@ function ConnectButton({
|
|
|
29300
29387
|
}) => {
|
|
29301
29388
|
const ready2 = mounted && connectionStatus !== "loading";
|
|
29302
29389
|
const unsupportedChain = chain?.unsupported ?? false;
|
|
29303
|
-
return /* @__PURE__ */
|
|
29390
|
+
return /* @__PURE__ */ React258.createElement(
|
|
29304
29391
|
Box,
|
|
29305
29392
|
{
|
|
29306
29393
|
display: "flex",
|
|
@@ -29316,7 +29403,7 @@ function ConnectButton({
|
|
|
29316
29403
|
},
|
|
29317
29404
|
ready2 && account && connectionStatus === "connected" ? (
|
|
29318
29405
|
// Logged in: Chain Button & Account Button
|
|
29319
|
-
/* @__PURE__ */
|
|
29406
|
+
/* @__PURE__ */ React258.createElement(React258.Fragment, null, showChainSelector && chain && (chains.length > 1 || unsupportedChain) && /* @__PURE__ */ React258.createElement(
|
|
29320
29407
|
ChainSelectorButton,
|
|
29321
29408
|
{
|
|
29322
29409
|
unsupportedChain,
|
|
@@ -29324,7 +29411,7 @@ function ConnectButton({
|
|
|
29324
29411
|
openChainModal,
|
|
29325
29412
|
chain
|
|
29326
29413
|
}
|
|
29327
|
-
), !unsupportedChain && /* @__PURE__ */
|
|
29414
|
+
), !unsupportedChain && /* @__PURE__ */ React258.createElement(
|
|
29328
29415
|
AccountButton,
|
|
29329
29416
|
{
|
|
29330
29417
|
openAccountModal,
|
|
@@ -29335,7 +29422,7 @@ function ConnectButton({
|
|
|
29335
29422
|
))
|
|
29336
29423
|
) : (
|
|
29337
29424
|
// Not logged in: Connect Button
|
|
29338
|
-
/* @__PURE__ */
|
|
29425
|
+
/* @__PURE__ */ React258.createElement(
|
|
29339
29426
|
Box,
|
|
29340
29427
|
{
|
|
29341
29428
|
as: "button",
|
|
@@ -29353,19 +29440,19 @@ function ConnectButton({
|
|
|
29353
29440
|
type: "button",
|
|
29354
29441
|
...connectButtonStyles
|
|
29355
29442
|
},
|
|
29356
|
-
/* @__PURE__ */
|
|
29443
|
+
/* @__PURE__ */ React258.createElement(Box, { display: "flex", gap: "8", alignItems: "center" }, mounted && label, suffixIcon)
|
|
29357
29444
|
)
|
|
29358
29445
|
)
|
|
29359
29446
|
);
|
|
29360
|
-
}) : /* @__PURE__ */
|
|
29447
|
+
}) : /* @__PURE__ */ React258.createElement(React258.Fragment, null);
|
|
29361
29448
|
}
|
|
29362
29449
|
ConnectButton.__defaultProps = defaultProps;
|
|
29363
29450
|
ConnectButton.Custom = ConnectButtonRenderer;
|
|
29364
29451
|
|
|
29365
29452
|
// src/components/Icons/FunkitPaymentsIconLine.tsx
|
|
29366
|
-
import
|
|
29453
|
+
import React259 from "react";
|
|
29367
29454
|
function MetaMaskPaymentIcon({ size = 16 }) {
|
|
29368
|
-
return /* @__PURE__ */
|
|
29455
|
+
return /* @__PURE__ */ React259.createElement(
|
|
29369
29456
|
"svg",
|
|
29370
29457
|
{
|
|
29371
29458
|
width: size,
|
|
@@ -29374,7 +29461,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29374
29461
|
fill: "none",
|
|
29375
29462
|
xmlns: "http://www.w3.org/2000/svg"
|
|
29376
29463
|
},
|
|
29377
|
-
/* @__PURE__ */
|
|
29464
|
+
/* @__PURE__ */ React259.createElement(
|
|
29378
29465
|
"path",
|
|
29379
29466
|
{
|
|
29380
29467
|
d: "M24.0891 3.1199L15.3446 9.61456L16.9617 5.7828L24.0891 3.1199Z",
|
|
@@ -29385,7 +29472,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29385
29472
|
strokeLinejoin: "round"
|
|
29386
29473
|
}
|
|
29387
29474
|
),
|
|
29388
|
-
/* @__PURE__ */
|
|
29475
|
+
/* @__PURE__ */ React259.createElement(
|
|
29389
29476
|
"path",
|
|
29390
29477
|
{
|
|
29391
29478
|
d: "M3.90207 3.1199L12.5763 9.67608L11.0383 5.7828L3.90207 3.1199Z",
|
|
@@ -29396,7 +29483,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29396
29483
|
strokeLinejoin: "round"
|
|
29397
29484
|
}
|
|
29398
29485
|
),
|
|
29399
|
-
/* @__PURE__ */
|
|
29486
|
+
/* @__PURE__ */ React259.createElement(
|
|
29400
29487
|
"path",
|
|
29401
29488
|
{
|
|
29402
29489
|
d: "M20.9429 18.1745L18.6139 21.7426L23.597 23.1136L25.0295 18.2536L20.9429 18.1745Z",
|
|
@@ -29407,7 +29494,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29407
29494
|
strokeLinejoin: "round"
|
|
29408
29495
|
}
|
|
29409
29496
|
),
|
|
29410
|
-
/* @__PURE__ */
|
|
29497
|
+
/* @__PURE__ */ React259.createElement(
|
|
29411
29498
|
"path",
|
|
29412
29499
|
{
|
|
29413
29500
|
d: "M2.97929 18.2536L4.40301 23.1136L9.38607 21.7426L7.05713 18.1745L2.97929 18.2536Z",
|
|
@@ -29418,7 +29505,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29418
29505
|
strokeLinejoin: "round"
|
|
29419
29506
|
}
|
|
29420
29507
|
),
|
|
29421
|
-
/* @__PURE__ */
|
|
29508
|
+
/* @__PURE__ */ React259.createElement(
|
|
29422
29509
|
"path",
|
|
29423
29510
|
{
|
|
29424
29511
|
d: "M9.10483 12.1456L7.71626 14.2461L12.6642 14.4658L12.4884 9.14877L9.10483 12.1456Z",
|
|
@@ -29429,7 +29516,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29429
29516
|
strokeLinejoin: "round"
|
|
29430
29517
|
}
|
|
29431
29518
|
),
|
|
29432
|
-
/* @__PURE__ */
|
|
29519
|
+
/* @__PURE__ */ React259.createElement(
|
|
29433
29520
|
"path",
|
|
29434
29521
|
{
|
|
29435
29522
|
d: "M18.8864 12.1456L15.4589 9.08725L15.3446 14.4658L20.2837 14.2461L18.8864 12.1456Z",
|
|
@@ -29440,7 +29527,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29440
29527
|
strokeLinejoin: "round"
|
|
29441
29528
|
}
|
|
29442
29529
|
),
|
|
29443
|
-
/* @__PURE__ */
|
|
29530
|
+
/* @__PURE__ */ React259.createElement(
|
|
29444
29531
|
"path",
|
|
29445
29532
|
{
|
|
29446
29533
|
d: "M9.38606 21.7426L12.3566 20.2925L9.79033 18.2888L9.38606 21.7426Z",
|
|
@@ -29451,7 +29538,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29451
29538
|
strokeLinejoin: "round"
|
|
29452
29539
|
}
|
|
29453
29540
|
),
|
|
29454
|
-
/* @__PURE__ */
|
|
29541
|
+
/* @__PURE__ */ React259.createElement(
|
|
29455
29542
|
"path",
|
|
29456
29543
|
{
|
|
29457
29544
|
d: "M15.6347 20.2925L18.6139 21.7426L18.2009 18.2888L15.6347 20.2925Z",
|
|
@@ -29462,7 +29549,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29462
29549
|
strokeLinejoin: "round"
|
|
29463
29550
|
}
|
|
29464
29551
|
),
|
|
29465
|
-
/* @__PURE__ */
|
|
29552
|
+
/* @__PURE__ */ React259.createElement(
|
|
29466
29553
|
"path",
|
|
29467
29554
|
{
|
|
29468
29555
|
d: "M18.6139 21.7426L15.6347 20.2925L15.8719 22.2348L15.8456 23.0521L18.6139 21.7426Z",
|
|
@@ -29473,7 +29560,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29473
29560
|
strokeLinejoin: "round"
|
|
29474
29561
|
}
|
|
29475
29562
|
),
|
|
29476
|
-
/* @__PURE__ */
|
|
29563
|
+
/* @__PURE__ */ React259.createElement(
|
|
29477
29564
|
"path",
|
|
29478
29565
|
{
|
|
29479
29566
|
d: "M9.38606 21.7426L12.1544 23.0521L12.1368 22.2348L12.3566 20.2925L9.38606 21.7426Z",
|
|
@@ -29484,7 +29571,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29484
29571
|
strokeLinejoin: "round"
|
|
29485
29572
|
}
|
|
29486
29573
|
),
|
|
29487
|
-
/* @__PURE__ */
|
|
29574
|
+
/* @__PURE__ */ React259.createElement(
|
|
29488
29575
|
"path",
|
|
29489
29576
|
{
|
|
29490
29577
|
d: "M12.1984 17.0056L9.72002 16.2762L11.4689 15.4765L12.1984 17.0056Z",
|
|
@@ -29495,7 +29582,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29495
29582
|
strokeLinejoin: "round"
|
|
29496
29583
|
}
|
|
29497
29584
|
),
|
|
29498
|
-
/* @__PURE__ */
|
|
29585
|
+
/* @__PURE__ */ React259.createElement(
|
|
29499
29586
|
"path",
|
|
29500
29587
|
{
|
|
29501
29588
|
d: "M15.7928 17.0056L16.5223 15.4765L18.28 16.2762L15.7928 17.0056Z",
|
|
@@ -29506,7 +29593,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29506
29593
|
strokeLinejoin: "round"
|
|
29507
29594
|
}
|
|
29508
29595
|
),
|
|
29509
|
-
/* @__PURE__ */
|
|
29596
|
+
/* @__PURE__ */ React259.createElement(
|
|
29510
29597
|
"path",
|
|
29511
29598
|
{
|
|
29512
29599
|
d: "M9.38606 21.7426L9.80791 18.1745L7.05712 18.2536L9.38606 21.7426Z",
|
|
@@ -29517,7 +29604,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29517
29604
|
strokeLinejoin: "round"
|
|
29518
29605
|
}
|
|
29519
29606
|
),
|
|
29520
|
-
/* @__PURE__ */
|
|
29607
|
+
/* @__PURE__ */ React259.createElement(
|
|
29521
29608
|
"path",
|
|
29522
29609
|
{
|
|
29523
29610
|
d: "M18.1921 18.1745L18.6139 21.7426L20.9429 18.2536L18.1921 18.1745Z",
|
|
@@ -29528,7 +29615,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29528
29615
|
strokeLinejoin: "round"
|
|
29529
29616
|
}
|
|
29530
29617
|
),
|
|
29531
|
-
/* @__PURE__ */
|
|
29618
|
+
/* @__PURE__ */ React259.createElement(
|
|
29532
29619
|
"path",
|
|
29533
29620
|
{
|
|
29534
29621
|
d: "M20.2837 14.2461L15.3446 14.4658L15.8016 17.0057L16.5311 15.4765L18.2888 16.2762L20.2837 14.2461Z",
|
|
@@ -29539,7 +29626,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29539
29626
|
strokeLinejoin: "round"
|
|
29540
29627
|
}
|
|
29541
29628
|
),
|
|
29542
|
-
/* @__PURE__ */
|
|
29629
|
+
/* @__PURE__ */ React259.createElement(
|
|
29543
29630
|
"path",
|
|
29544
29631
|
{
|
|
29545
29632
|
d: "M9.72002 16.2762L11.4777 15.4765L12.1984 17.0057L12.6642 14.4658L7.71626 14.2461L9.72002 16.2762Z",
|
|
@@ -29550,7 +29637,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29550
29637
|
strokeLinejoin: "round"
|
|
29551
29638
|
}
|
|
29552
29639
|
),
|
|
29553
|
-
/* @__PURE__ */
|
|
29640
|
+
/* @__PURE__ */ React259.createElement(
|
|
29554
29641
|
"path",
|
|
29555
29642
|
{
|
|
29556
29643
|
d: "M7.71626 14.2461L9.79033 18.2888L9.72002 16.2762L7.71626 14.2461Z",
|
|
@@ -29561,7 +29648,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29561
29648
|
strokeLinejoin: "round"
|
|
29562
29649
|
}
|
|
29563
29650
|
),
|
|
29564
|
-
/* @__PURE__ */
|
|
29651
|
+
/* @__PURE__ */ React259.createElement(
|
|
29565
29652
|
"path",
|
|
29566
29653
|
{
|
|
29567
29654
|
d: "M18.2888 16.2762L18.2009 18.2888L20.2837 14.2461L18.2888 16.2762Z",
|
|
@@ -29572,7 +29659,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29572
29659
|
strokeLinejoin: "round"
|
|
29573
29660
|
}
|
|
29574
29661
|
),
|
|
29575
|
-
/* @__PURE__ */
|
|
29662
|
+
/* @__PURE__ */ React259.createElement(
|
|
29576
29663
|
"path",
|
|
29577
29664
|
{
|
|
29578
29665
|
d: "M12.6642 14.4658L12.1984 17.0057L12.7784 20.0025L12.9102 16.0565L12.6642 14.4658Z",
|
|
@@ -29583,7 +29670,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29583
29670
|
strokeLinejoin: "round"
|
|
29584
29671
|
}
|
|
29585
29672
|
),
|
|
29586
|
-
/* @__PURE__ */
|
|
29673
|
+
/* @__PURE__ */ React259.createElement(
|
|
29587
29674
|
"path",
|
|
29588
29675
|
{
|
|
29589
29676
|
d: "M15.3446 14.4658L15.1073 16.0477L15.2128 20.0025L15.8016 17.0057L15.3446 14.4658Z",
|
|
@@ -29594,7 +29681,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29594
29681
|
strokeLinejoin: "round"
|
|
29595
29682
|
}
|
|
29596
29683
|
),
|
|
29597
|
-
/* @__PURE__ */
|
|
29684
|
+
/* @__PURE__ */ React259.createElement(
|
|
29598
29685
|
"path",
|
|
29599
29686
|
{
|
|
29600
29687
|
d: "M15.8016 17.0056L15.2128 20.0025L15.6347 20.2925L18.2009 18.2888L18.2888 16.2762L15.8016 17.0056Z",
|
|
@@ -29605,7 +29692,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29605
29692
|
strokeLinejoin: "round"
|
|
29606
29693
|
}
|
|
29607
29694
|
),
|
|
29608
|
-
/* @__PURE__ */
|
|
29695
|
+
/* @__PURE__ */ React259.createElement(
|
|
29609
29696
|
"path",
|
|
29610
29697
|
{
|
|
29611
29698
|
d: "M9.72002 16.2762L9.79033 18.2888L12.3566 20.2925L12.7784 20.0025L12.1984 17.0056L9.72002 16.2762Z",
|
|
@@ -29616,7 +29703,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29616
29703
|
strokeLinejoin: "round"
|
|
29617
29704
|
}
|
|
29618
29705
|
),
|
|
29619
|
-
/* @__PURE__ */
|
|
29706
|
+
/* @__PURE__ */ React259.createElement(
|
|
29620
29707
|
"path",
|
|
29621
29708
|
{
|
|
29622
29709
|
d: "M15.8456 23.0521L15.8719 22.2348L15.6522 22.0414H12.339L12.1368 22.2348L12.1544 23.0521L9.38606 21.7426L10.3528 22.5336L12.3126 23.8958H15.6786L17.6472 22.5336L18.6139 21.7426L15.8456 23.0521Z",
|
|
@@ -29627,7 +29714,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29627
29714
|
strokeLinejoin: "round"
|
|
29628
29715
|
}
|
|
29629
29716
|
),
|
|
29630
|
-
/* @__PURE__ */
|
|
29717
|
+
/* @__PURE__ */ React259.createElement(
|
|
29631
29718
|
"path",
|
|
29632
29719
|
{
|
|
29633
29720
|
d: "M15.6347 20.2925L15.2128 20.0025H12.7784L12.3566 20.2925L12.1368 22.2348L12.339 22.0414H15.6522L15.8719 22.2348L15.6347 20.2925Z",
|
|
@@ -29638,7 +29725,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29638
29725
|
strokeLinejoin: "round"
|
|
29639
29726
|
}
|
|
29640
29727
|
),
|
|
29641
|
-
/* @__PURE__ */
|
|
29728
|
+
/* @__PURE__ */ React259.createElement(
|
|
29642
29729
|
"path",
|
|
29643
29730
|
{
|
|
29644
29731
|
d: "M24.4583 10.0364L25.2053 6.45072L24.0891 3.1199L15.6347 9.39485L18.8864 12.1456L23.4827 13.4903L24.5022 12.3038L24.0628 11.9874L24.7658 11.3459L24.221 10.924L24.924 10.3879L24.4583 10.0364Z",
|
|
@@ -29649,7 +29736,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29649
29736
|
strokeLinejoin: "round"
|
|
29650
29737
|
}
|
|
29651
29738
|
),
|
|
29652
|
-
/* @__PURE__ */
|
|
29739
|
+
/* @__PURE__ */ React259.createElement(
|
|
29653
29740
|
"path",
|
|
29654
29741
|
{
|
|
29655
29742
|
d: "M2.79472 6.45072L3.54174 10.0364L3.06717 10.3879L3.77024 10.924L3.23415 11.3459L3.93722 11.9874L3.4978 12.3038L4.50847 13.4903L9.10483 12.1456L12.3566 9.39485L3.90207 3.1199L2.79472 6.45072Z",
|
|
@@ -29660,7 +29747,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29660
29747
|
strokeLinejoin: "round"
|
|
29661
29748
|
}
|
|
29662
29749
|
),
|
|
29663
|
-
/* @__PURE__ */
|
|
29750
|
+
/* @__PURE__ */ React259.createElement(
|
|
29664
29751
|
"path",
|
|
29665
29752
|
{
|
|
29666
29753
|
d: "M23.4827 13.4903L18.8864 12.1456L20.2837 14.2461L18.2009 18.2888L20.9429 18.2536H25.0295L23.4827 13.4903Z",
|
|
@@ -29671,7 +29758,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29671
29758
|
strokeLinejoin: "round"
|
|
29672
29759
|
}
|
|
29673
29760
|
),
|
|
29674
|
-
/* @__PURE__ */
|
|
29761
|
+
/* @__PURE__ */ React259.createElement(
|
|
29675
29762
|
"path",
|
|
29676
29763
|
{
|
|
29677
29764
|
d: "M9.10484 12.1456L4.50848 13.4903L2.97929 18.2536H7.05713L9.79033 18.2888L7.71626 14.2461L9.10484 12.1456Z",
|
|
@@ -29682,7 +29769,7 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29682
29769
|
strokeLinejoin: "round"
|
|
29683
29770
|
}
|
|
29684
29771
|
),
|
|
29685
|
-
/* @__PURE__ */
|
|
29772
|
+
/* @__PURE__ */ React259.createElement(
|
|
29686
29773
|
"path",
|
|
29687
29774
|
{
|
|
29688
29775
|
d: "M15.3446 14.4658L15.6347 9.39485L16.9705 5.7828H11.0383L12.3566 9.39485L12.6642 14.4658L12.7696 16.0653L12.7784 20.0025H15.2128L15.2304 16.0653L15.3446 14.4658Z",
|
|
@@ -29696,14 +29783,14 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
29696
29783
|
);
|
|
29697
29784
|
}
|
|
29698
29785
|
function MastercardPaymentIcon({ size = 16 }) {
|
|
29699
|
-
return /* @__PURE__ */
|
|
29786
|
+
return /* @__PURE__ */ React259.createElement(
|
|
29700
29787
|
"svg",
|
|
29701
29788
|
{
|
|
29702
29789
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29703
29790
|
height: size,
|
|
29704
29791
|
viewBox: "0 0 152.407 108"
|
|
29705
29792
|
},
|
|
29706
|
-
/* @__PURE__ */
|
|
29793
|
+
/* @__PURE__ */ React259.createElement("g", null, /* @__PURE__ */ React259.createElement("rect", { width: "152.407", height: "108", fill: "transparent" }), /* @__PURE__ */ React259.createElement("g", null, /* @__PURE__ */ React259.createElement(
|
|
29707
29794
|
"rect",
|
|
29708
29795
|
{
|
|
29709
29796
|
x: "60.4117",
|
|
@@ -29712,21 +29799,21 @@ function MastercardPaymentIcon({ size = 16 }) {
|
|
|
29712
29799
|
height: "56.6064",
|
|
29713
29800
|
fill: "#ff5f00"
|
|
29714
29801
|
}
|
|
29715
|
-
), /* @__PURE__ */
|
|
29802
|
+
), /* @__PURE__ */ React259.createElement(
|
|
29716
29803
|
"path",
|
|
29717
29804
|
{
|
|
29718
29805
|
d: "M382.20839,306a35.9375,35.9375,0,0,1,13.7499-28.3032,36,36,0,1,0,0,56.6064A35.938,35.938,0,0,1,382.20839,306Z",
|
|
29719
29806
|
transform: "translate(-319.79649 -252)",
|
|
29720
29807
|
fill: "#eb001b"
|
|
29721
29808
|
}
|
|
29722
|
-
), /* @__PURE__ */
|
|
29809
|
+
), /* @__PURE__ */ React259.createElement(
|
|
29723
29810
|
"path",
|
|
29724
29811
|
{
|
|
29725
29812
|
d: "M454.20349,306a35.99867,35.99867,0,0,1-58.2452,28.3032,36.00518,36.00518,0,0,0,0-56.6064A35.99867,35.99867,0,0,1,454.20349,306Z",
|
|
29726
29813
|
transform: "translate(-319.79649 -252)",
|
|
29727
29814
|
fill: "#f79e1b"
|
|
29728
29815
|
}
|
|
29729
|
-
), /* @__PURE__ */
|
|
29816
|
+
), /* @__PURE__ */ React259.createElement(
|
|
29730
29817
|
"path",
|
|
29731
29818
|
{
|
|
29732
29819
|
d: "M450.76889,328.3077v-1.1589h.4673v-.2361h-1.1901v.2361h.4675v1.1589Zm2.3105,0v-1.3973h-.3648l-.41959.9611-.41971-.9611h-.365v1.3973h.2576v-1.054l.3935.9087h.2671l.39351-.911v1.0563Z",
|
|
@@ -29740,7 +29827,7 @@ function FunkitPaymentsIconLine({
|
|
|
29740
29827
|
size = 16,
|
|
29741
29828
|
gap = "2"
|
|
29742
29829
|
}) {
|
|
29743
|
-
return /* @__PURE__ */
|
|
29830
|
+
return /* @__PURE__ */ React259.createElement(
|
|
29744
29831
|
Box,
|
|
29745
29832
|
{
|
|
29746
29833
|
display: "flex",
|
|
@@ -29749,9 +29836,9 @@ function FunkitPaymentsIconLine({
|
|
|
29749
29836
|
alignItems: "center",
|
|
29750
29837
|
justifyContent: "center"
|
|
29751
29838
|
},
|
|
29752
|
-
/* @__PURE__ */
|
|
29753
|
-
/* @__PURE__ */
|
|
29754
|
-
/* @__PURE__ */
|
|
29839
|
+
/* @__PURE__ */ React259.createElement(MetaMaskPaymentIcon, { size }),
|
|
29840
|
+
/* @__PURE__ */ React259.createElement(MastercardPaymentIcon, { size }),
|
|
29841
|
+
/* @__PURE__ */ React259.createElement(CoinbaseIcon, { size })
|
|
29755
29842
|
);
|
|
29756
29843
|
}
|
|
29757
29844
|
|
|
@@ -29810,7 +29897,7 @@ var useUpdateActiveFunkitCheckout = () => {
|
|
|
29810
29897
|
|
|
29811
29898
|
// src/providers/FunkitProvider.tsx
|
|
29812
29899
|
import { QueryClientProvider } from "@tanstack/react-query";
|
|
29813
|
-
import
|
|
29900
|
+
import React260, { createContext as createContext20, useContext as useContext20 } from "react";
|
|
29814
29901
|
import { WagmiProvider, useAccountEffect as useAccountEffect3 } from "wagmi";
|
|
29815
29902
|
|
|
29816
29903
|
// src/utils/funkitProvider.ts
|
|
@@ -29894,7 +29981,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
29894
29981
|
localStorage.setItem(storageKey5, version);
|
|
29895
29982
|
}
|
|
29896
29983
|
function getCurrentSdkVersion() {
|
|
29897
|
-
return "5.5.
|
|
29984
|
+
return "5.5.1";
|
|
29898
29985
|
}
|
|
29899
29986
|
function useFingerprint() {
|
|
29900
29987
|
const fingerprint = useCallback49(() => {
|
|
@@ -29945,7 +30032,7 @@ function FunkitProvider(props) {
|
|
|
29945
30032
|
!!props.debug,
|
|
29946
30033
|
getCurrentSdkVersion()
|
|
29947
30034
|
);
|
|
29948
|
-
const MainChild = /* @__PURE__ */
|
|
30035
|
+
const MainChild = /* @__PURE__ */ React260.createElement(FunkitThemeProvider, { theme: props.theme }, /* @__PURE__ */ React260.createElement(
|
|
29949
30036
|
FunkitProviderInner,
|
|
29950
30037
|
{
|
|
29951
30038
|
avatar: props.avatar,
|
|
@@ -29958,7 +30045,7 @@ function FunkitProvider(props) {
|
|
|
29958
30045
|
},
|
|
29959
30046
|
props.children
|
|
29960
30047
|
));
|
|
29961
|
-
return finalWagmiConfig && finalQueryClient ? /* @__PURE__ */
|
|
30048
|
+
return finalWagmiConfig && finalQueryClient ? /* @__PURE__ */ React260.createElement(WagmiProvider, { config: finalWagmiConfig }, /* @__PURE__ */ React260.createElement(QueryClientProvider, { client: finalQueryClient }, MainChild)) : MainChild;
|
|
29962
30049
|
}
|
|
29963
30050
|
function FunkitProviderInner({
|
|
29964
30051
|
avatar,
|
|
@@ -29978,7 +30065,7 @@ function FunkitProviderInner({
|
|
|
29978
30065
|
const avatarContext = avatar ?? defaultAvatar;
|
|
29979
30066
|
const isSandboxMode = !!sandbox;
|
|
29980
30067
|
const modalSizeFinal = modalSize || ModalSizeOptions.COMPACT;
|
|
29981
|
-
return /* @__PURE__ */
|
|
30068
|
+
return /* @__PURE__ */ React260.createElement(FunkitConfigContext.Provider, { value: funkitConfig }, /* @__PURE__ */ React260.createElement(FunkitConnectChainProvider, { initialChain }, /* @__PURE__ */ React260.createElement(ModalSizeProvider, { modalSize: modalSizeFinal }, /* @__PURE__ */ React260.createElement(FunkitWeb2Provider, null, /* @__PURE__ */ React260.createElement(GeneralWalletProvider, null, /* @__PURE__ */ React260.createElement(FunkitFlagsProvider, null, /* @__PURE__ */ React260.createElement(FunkitCheckoutHistoryProvider, null, /* @__PURE__ */ React260.createElement(FunkitCheckoutProvider, null, /* @__PURE__ */ React260.createElement(FunkitQuoteProvider, null, /* @__PURE__ */ React260.createElement(FunkitSandboxContext.Provider, { value: isSandboxMode }, /* @__PURE__ */ React260.createElement(FunkitMeshProvider, null, /* @__PURE__ */ React260.createElement(AvatarContext.Provider, { value: avatarContext }, /* @__PURE__ */ React260.createElement(ThemeIdContext2.Provider, { value: id }, /* @__PURE__ */ React260.createElement(ShowBalanceProvider, null, /* @__PURE__ */ React260.createElement(FunkitMoonpayProvider, { debug: !!debug }, /* @__PURE__ */ React260.createElement(UserPresenceProvider, null, /* @__PURE__ */ React260.createElement(ModalProvider, null, activeTheme ? /* @__PURE__ */ React260.createElement(
|
|
29982
30069
|
"div",
|
|
29983
30070
|
{
|
|
29984
30071
|
...createThemeRootProps2(id),
|
|
@@ -29987,7 +30074,7 @@ function FunkitProviderInner({
|
|
|
29987
30074
|
height: "100%"
|
|
29988
30075
|
}
|
|
29989
30076
|
},
|
|
29990
|
-
/* @__PURE__ */
|
|
30077
|
+
/* @__PURE__ */ React260.createElement(
|
|
29991
30078
|
"style",
|
|
29992
30079
|
{
|
|
29993
30080
|
dangerouslySetInnerHTML: {
|