@funkit/connect 5.5.9 → 5.5.11
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 +23 -0
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +3 -2
- package/dist/components/SourceMeldQuoteItem/SourceMeldQuoteItem.d.ts +3 -1
- package/dist/hooks/queries/useMeldLimits.d.ts +1 -1
- package/dist/index.js +309 -238
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/QuickOptions.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +4 -4
- package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +1 -1
- package/dist/modals/CheckoutModal/MeldQuotes/useMeldQuotes.d.ts +15 -4
- package/dist/utils/consts.d.ts +2 -0
- 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 +56 -56
- 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 +3 -3
package/dist/index.js
CHANGED
|
@@ -3608,8 +3608,12 @@ var flagConfig = {
|
|
|
3608
3608
|
// greg
|
|
3609
3609
|
"0x4a1457fa2845bAfE8D3909cA3C5ac6107be312Dd",
|
|
3610
3610
|
// william PM
|
|
3611
|
-
"0xfCB8B2d294eD7373B3B590dd7C0CBC430d41a9a0"
|
|
3611
|
+
"0xfCB8B2d294eD7373B3B590dd7C0CBC430d41a9a0",
|
|
3612
3612
|
// Arun from Meld
|
|
3613
|
+
"0x9CB7F86F360459cC96C74a0F81aF2C4cC7a54bd2",
|
|
3614
|
+
// felix
|
|
3615
|
+
"0xbC805309dde14dFC14f91f7D4Cb9972Ecc915D39"
|
|
3616
|
+
// Rana from Meld
|
|
3613
3617
|
]
|
|
3614
3618
|
}
|
|
3615
3619
|
],
|
|
@@ -3620,7 +3624,7 @@ var flagConfig = {
|
|
|
3620
3624
|
{
|
|
3621
3625
|
key: "userId",
|
|
3622
3626
|
type: "pctRollout",
|
|
3623
|
-
pct:
|
|
3627
|
+
pct: 15
|
|
3624
3628
|
},
|
|
3625
3629
|
{
|
|
3626
3630
|
key: "apiKey",
|
|
@@ -3672,9 +3676,9 @@ var flagConfig = {
|
|
|
3672
3676
|
[FlagKey.MinTokenTransferValue]: {
|
|
3673
3677
|
type: "string",
|
|
3674
3678
|
default_value: JSON.stringify({
|
|
3675
|
-
CA: { mainnet: 80, nonMainnet:
|
|
3676
|
-
AU: { mainnet: 90, nonMainnet:
|
|
3677
|
-
DEFAULT: { mainnet: 50, nonMainnet:
|
|
3679
|
+
CA: { mainnet: 80, nonMainnet: 3 },
|
|
3680
|
+
AU: { mainnet: 90, nonMainnet: 3.5 },
|
|
3681
|
+
DEFAULT: { mainnet: 50, nonMainnet: 2.5 }
|
|
3678
3682
|
})
|
|
3679
3683
|
}
|
|
3680
3684
|
};
|
|
@@ -4110,6 +4114,7 @@ function useCheckoutDirectExecution() {
|
|
|
4110
4114
|
const multiplier = 10 ** toTokenDecimals;
|
|
4111
4115
|
return await getRelayQuote({
|
|
4112
4116
|
actionParams,
|
|
4117
|
+
clientId: clientData?.id ?? "",
|
|
4113
4118
|
fromChainId,
|
|
4114
4119
|
fromTokenAddress,
|
|
4115
4120
|
logger,
|
|
@@ -4117,9 +4122,10 @@ function useCheckoutDirectExecution() {
|
|
|
4117
4122
|
toChainId,
|
|
4118
4123
|
toTokenAddress,
|
|
4119
4124
|
toTokenAmountBaseUnit: BigInt(Math.floor(toTokenAmount * multiplier)),
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4125
|
+
// When no contract action is required: expected_output
|
|
4126
|
+
// When a contract action is required: exact_output
|
|
4127
|
+
tradeType: actionParams?.length ? "EXACT_OUTPUT" : "EXPECTED_OUTPUT",
|
|
4128
|
+
userAddress: address
|
|
4123
4129
|
});
|
|
4124
4130
|
},
|
|
4125
4131
|
[address, clientData]
|
|
@@ -4238,6 +4244,8 @@ import { formatCurrencyAndStringify } from "@funkit/utils";
|
|
|
4238
4244
|
|
|
4239
4245
|
// src/utils/consts.ts
|
|
4240
4246
|
var MIN_CHECKOUT_AMOUNT_USD = 1;
|
|
4247
|
+
var MIN_MOONPAY_AMOUNT_USD = 35;
|
|
4248
|
+
var MAX_MOONPAY_AMOUNT_USD = 1e4;
|
|
4241
4249
|
var LOW_BALANCE = "Low Balance";
|
|
4242
4250
|
var CONTACT_US_LINK = "https://intercom.help/funxyz/en/articles/10732578-contact-us";
|
|
4243
4251
|
var DEFAULT_CHECKOUT_HISTORY_DETAIL_TITLE = "Your Purchase";
|
|
@@ -8380,7 +8388,7 @@ import {
|
|
|
8380
8388
|
formatSecondsToReadableForm,
|
|
8381
8389
|
safeParseJson as safeParseJson2
|
|
8382
8390
|
} from "@funkit/utils";
|
|
8383
|
-
import
|
|
8391
|
+
import React81, { Fragment, useEffect as useEffect17 } from "react";
|
|
8384
8392
|
|
|
8385
8393
|
// src/domains/bridge.ts
|
|
8386
8394
|
import {
|
|
@@ -10204,33 +10212,10 @@ var FunPaymentMethodItem = ({
|
|
|
10204
10212
|
);
|
|
10205
10213
|
};
|
|
10206
10214
|
|
|
10207
|
-
// src/components/Icons/CheckIcon.tsx
|
|
10208
|
-
import React80 from "react";
|
|
10209
|
-
var CheckIcon = ({ size = 16 }) => /* @__PURE__ */ React80.createElement(
|
|
10210
|
-
"svg",
|
|
10211
|
-
{
|
|
10212
|
-
width: size,
|
|
10213
|
-
height: size,
|
|
10214
|
-
viewBox: "0 0 16 16",
|
|
10215
|
-
fill: "none",
|
|
10216
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
10217
|
-
},
|
|
10218
|
-
/* @__PURE__ */ React80.createElement(
|
|
10219
|
-
"path",
|
|
10220
|
-
{
|
|
10221
|
-
d: "M12.4919 4.88281L6.25757 11.1172L3.50781 8",
|
|
10222
|
-
stroke: "currentColor",
|
|
10223
|
-
strokeWidth: "1.5",
|
|
10224
|
-
strokeLinecap: "round",
|
|
10225
|
-
strokeLinejoin: "round"
|
|
10226
|
-
}
|
|
10227
|
-
)
|
|
10228
|
-
);
|
|
10229
|
-
|
|
10230
10215
|
// src/components/Icons/CreditCardIcons.tsx
|
|
10231
|
-
import
|
|
10216
|
+
import React80 from "react";
|
|
10232
10217
|
var MasterCardIcon = () => {
|
|
10233
|
-
return /* @__PURE__ */
|
|
10218
|
+
return /* @__PURE__ */ React80.createElement(
|
|
10234
10219
|
"svg",
|
|
10235
10220
|
{
|
|
10236
10221
|
width: "20",
|
|
@@ -10239,21 +10224,21 @@ var MasterCardIcon = () => {
|
|
|
10239
10224
|
fill: "none",
|
|
10240
10225
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10241
10226
|
},
|
|
10242
|
-
/* @__PURE__ */
|
|
10227
|
+
/* @__PURE__ */ React80.createElement(
|
|
10243
10228
|
"path",
|
|
10244
10229
|
{
|
|
10245
10230
|
d: "M12.7041 11.0401H7.29614V1.32129H12.7042L12.7041 11.0401Z",
|
|
10246
10231
|
fill: "#FF5F00"
|
|
10247
10232
|
}
|
|
10248
10233
|
),
|
|
10249
|
-
/* @__PURE__ */
|
|
10234
|
+
/* @__PURE__ */ React80.createElement(
|
|
10250
10235
|
"path",
|
|
10251
10236
|
{
|
|
10252
10237
|
d: "M7.63905 6.18093C7.63905 4.20948 8.56213 2.4533 9.99955 1.32154C8.9115 0.463596 7.56574 -0.00204062 6.18013 6.72263e-06C2.76685 6.72263e-06 0 2.76726 0 6.18093C0 9.59461 2.76685 12.3619 6.18013 12.3619C7.56578 12.3639 8.91157 11.8983 9.99965 11.0403C8.56233 9.90877 7.63905 8.15249 7.63905 6.18093Z",
|
|
10253
10238
|
fill: "#EB001B"
|
|
10254
10239
|
}
|
|
10255
10240
|
),
|
|
10256
|
-
/* @__PURE__ */
|
|
10241
|
+
/* @__PURE__ */ React80.createElement(
|
|
10257
10242
|
"path",
|
|
10258
10243
|
{
|
|
10259
10244
|
d: "M19.9999 6.18093C19.9999 9.59461 17.2331 12.3619 13.8198 12.3619C12.434 12.3639 11.088 11.8983 9.99976 11.0403C11.4376 9.90857 12.3607 8.15249 12.3607 6.18093C12.3607 4.20938 11.4376 2.4533 9.99976 1.32154C11.088 0.463622 12.4339 -0.00200473 13.8197 6.48814e-06C17.233 6.48814e-06 19.9998 2.76726 19.9998 6.18093",
|
|
@@ -10263,7 +10248,7 @@ var MasterCardIcon = () => {
|
|
|
10263
10248
|
);
|
|
10264
10249
|
};
|
|
10265
10250
|
var VisaCardIcon = () => {
|
|
10266
|
-
return /* @__PURE__ */
|
|
10251
|
+
return /* @__PURE__ */ React80.createElement(
|
|
10267
10252
|
"svg",
|
|
10268
10253
|
{
|
|
10269
10254
|
width: "30",
|
|
@@ -10272,35 +10257,35 @@ var VisaCardIcon = () => {
|
|
|
10272
10257
|
fill: "none",
|
|
10273
10258
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10274
10259
|
},
|
|
10275
|
-
/* @__PURE__ */
|
|
10260
|
+
/* @__PURE__ */ React80.createElement(
|
|
10276
10261
|
"path",
|
|
10277
10262
|
{
|
|
10278
10263
|
d: "M 26.835 10.17 C 26.76 10.14 26.764 10.12 26.821 10.107 C 26.83 10.147 26.835 10.17 26.835 10.17 Z M 26.821 10.107 C 26.774 9.89 26.618 9.174 26.561 8.93 C 26.233 8.93 23.932 8.927 23.674 8.927 C 23.586 9.15 23.2 10.17 23.2 10.17 L 20.833 10.17 L 24.18 2.59 C 24.418 2.051 24.82 1.903 25.361 1.903 L 27.102 1.903 L 28.927 10.169 C 28.927 10.169 27.124 10.039 26.821 10.107 Z M 25.52 4.134 C 25.405 4.445 25.207 4.945 25.22 4.923 C 25.22 4.923 24.507 6.759 24.322 7.235 L 26.194 7.235 C 26.103 6.821 25.671 4.847 25.671 4.847 Z",
|
|
10279
10264
|
fill: "currentColor"
|
|
10280
10265
|
}
|
|
10281
10266
|
),
|
|
10282
|
-
/* @__PURE__ */
|
|
10267
|
+
/* @__PURE__ */ React80.createElement(
|
|
10283
10268
|
"path",
|
|
10284
10269
|
{
|
|
10285
10270
|
d: "M 1.22551 1.82339 L 1.19653 1.98919 C 3.91596 2.64774 5.71538 4.23847 6.46205 6.15037 L 5.70205 2.49528 C 5.57104 1.99151 5.19132 1.8413599999999999 4.72002 1.82339 L 1.22551 1.82339",
|
|
10286
10271
|
fill: "currentColor"
|
|
10287
10272
|
}
|
|
10288
10273
|
),
|
|
10289
|
-
/* @__PURE__ */
|
|
10274
|
+
/* @__PURE__ */ React80.createElement(
|
|
10290
10275
|
"path",
|
|
10291
10276
|
{
|
|
10292
10277
|
d: "M 5.45393 10.1597 L 7.83945 10.1579 L 11.389 1.9028100000000001 L 9.00062 1.9028100000000001 L 6.79307 7.54283 L 6.55771 6.69124 C 6.12234 5.66573 4.8864 4.1921 3.4353800000000003 3.2634 L 5.45393 10.1597",
|
|
10293
10278
|
fill: "currentColor"
|
|
10294
10279
|
}
|
|
10295
10280
|
),
|
|
10296
|
-
/* @__PURE__ */
|
|
10281
|
+
/* @__PURE__ */ React80.createElement(
|
|
10297
10282
|
"path",
|
|
10298
10283
|
{
|
|
10299
10284
|
d: "M 13.1444 10.1666 L 14.5548 1.89528 L 12.2998 1.89528 L 10.8905 10.1666 L 13.1444 10.1666",
|
|
10300
10285
|
fill: "currentColor"
|
|
10301
10286
|
}
|
|
10302
10287
|
),
|
|
10303
|
-
/* @__PURE__ */
|
|
10288
|
+
/* @__PURE__ */ React80.createElement(
|
|
10304
10289
|
"path",
|
|
10305
10290
|
{
|
|
10306
10291
|
d: "M 17.0667 10.2901 C 19.4372 10.2901 20.9752 9.1811 20.9925 7.46515 C 21.0007 6.52428 20.3995 5.80834 19.0992 5.21819 C 18.3108 4.83442 17.8285 4.57935 17.8331 4.1921 C 17.8331 3.84833 18.2424 3.48079 19.1247 3.48079 C 19.8627 3.4692 20.3966 3.63036 20.811700000000002 3.79731 L 21.0152 3.89297 L 21.3195 2.1005 C 20.8731 1.93296 20.1734 1.75325 19.3004 1.75325 C 17.0725 1.75325 15.5027 2.8749900000000004 15.4905 4.48253 C 15.4766 5.67036 16.6093 6.33356 17.465 6.7289200000000005 C 18.3427 7.13472 18.6372 7.39327 18.6331 7.75559 C 18.6267 8.30979 17.9328 8.56313 17.2853 8.56313 C 16.3827 8.56313 15.9033 8.43791 15.163 8.12892 L 14.8725 7.99733 L 14.5554 9.84835 C 15.083 10.0797 16.0563 10.2797 17.0667 10.2901",
|
|
@@ -10310,7 +10295,7 @@ var VisaCardIcon = () => {
|
|
|
10310
10295
|
);
|
|
10311
10296
|
};
|
|
10312
10297
|
var CombinedCreditCardOptionsIcon = () => {
|
|
10313
|
-
return /* @__PURE__ */
|
|
10298
|
+
return /* @__PURE__ */ React80.createElement(Box, { display: "flex", gap: "2", alignItems: "center", color: "primaryText" }, /* @__PURE__ */ React80.createElement(MasterCardIcon, null), /* @__PURE__ */ React80.createElement(VisaCardIcon, null));
|
|
10314
10299
|
};
|
|
10315
10300
|
|
|
10316
10301
|
// src/components/FunPayments/FunPaymentMethods.tsx
|
|
@@ -10319,21 +10304,21 @@ var BrokerageConditionalIcons = () => {
|
|
|
10319
10304
|
const { getActiveConnection } = useFunkitMesh();
|
|
10320
10305
|
return supportedExchanges.filter((brokerType) => !getActiveConnection(brokerType)).map((brokerType) => {
|
|
10321
10306
|
const icon = getExchangeIcon(brokerType, 12);
|
|
10322
|
-
return icon ? /* @__PURE__ */
|
|
10307
|
+
return icon ? /* @__PURE__ */ React81.createElement(Fragment, { key: brokerType }, icon) : null;
|
|
10323
10308
|
}).filter((icon) => icon !== null).slice(0, 5);
|
|
10324
10309
|
};
|
|
10325
10310
|
var getDynamicValueIconComponent = () => {
|
|
10326
10311
|
const defaultChains = getDefaultChains();
|
|
10327
|
-
return /* @__PURE__ */
|
|
10312
|
+
return /* @__PURE__ */ React81.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "flex-end" }, defaultChains.map(({ id: chainId }, index) => {
|
|
10328
10313
|
const metadata = chainMetadataById[chainId];
|
|
10329
|
-
return /* @__PURE__ */
|
|
10314
|
+
return /* @__PURE__ */ React81.createElement(
|
|
10330
10315
|
Box,
|
|
10331
10316
|
{
|
|
10332
10317
|
key: chainId,
|
|
10333
10318
|
position: "relative",
|
|
10334
10319
|
style: { right: `${(defaultChains.length - index - 1) * -2}px` }
|
|
10335
10320
|
},
|
|
10336
|
-
/* @__PURE__ */
|
|
10321
|
+
/* @__PURE__ */ React81.createElement(
|
|
10337
10322
|
AsyncImage,
|
|
10338
10323
|
{
|
|
10339
10324
|
alt: metadata.name,
|
|
@@ -10354,7 +10339,7 @@ function ConnectWalletItem({
|
|
|
10354
10339
|
onClick
|
|
10355
10340
|
}) {
|
|
10356
10341
|
const walletLabel = useWalletLabel();
|
|
10357
|
-
return /* @__PURE__ */
|
|
10342
|
+
return /* @__PURE__ */ React81.createElement(
|
|
10358
10343
|
FunPaymentMethodItem,
|
|
10359
10344
|
{
|
|
10360
10345
|
keyIcon: paymentIcon,
|
|
@@ -10368,16 +10353,16 @@ function ConnectWalletItem({
|
|
|
10368
10353
|
);
|
|
10369
10354
|
}
|
|
10370
10355
|
function SupportedChainList({ chainIdList }) {
|
|
10371
|
-
return /* @__PURE__ */
|
|
10356
|
+
return /* @__PURE__ */ React81.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "flex-end" }, chainIdList.map((chainId, index) => {
|
|
10372
10357
|
const metadata = chainMetadataById[chainId];
|
|
10373
|
-
return /* @__PURE__ */
|
|
10358
|
+
return /* @__PURE__ */ React81.createElement(
|
|
10374
10359
|
Box,
|
|
10375
10360
|
{
|
|
10376
10361
|
key: chainId,
|
|
10377
10362
|
position: "relative",
|
|
10378
10363
|
style: { right: `${(chainIdList.length - index - 1) * -2}px` }
|
|
10379
10364
|
},
|
|
10380
|
-
/* @__PURE__ */
|
|
10365
|
+
/* @__PURE__ */ React81.createElement(
|
|
10381
10366
|
AsyncImage,
|
|
10382
10367
|
{
|
|
10383
10368
|
alt: metadata.name,
|
|
@@ -10394,7 +10379,7 @@ function PaymentMethodIcon({
|
|
|
10394
10379
|
paymentIcon,
|
|
10395
10380
|
keyIconSize
|
|
10396
10381
|
}) {
|
|
10397
|
-
return /* @__PURE__ */
|
|
10382
|
+
return /* @__PURE__ */ React81.createElement(
|
|
10398
10383
|
Box,
|
|
10399
10384
|
{
|
|
10400
10385
|
display: "flex",
|
|
@@ -10407,10 +10392,11 @@ function PaymentMethodIcon({
|
|
|
10407
10392
|
}
|
|
10408
10393
|
var ConnectedMeshPaymentMethodItem = ({
|
|
10409
10394
|
paymentMethodInfo,
|
|
10410
|
-
|
|
10395
|
+
isActive,
|
|
10411
10396
|
onSelect,
|
|
10412
10397
|
onBrokerageError,
|
|
10413
|
-
targetChainId
|
|
10398
|
+
targetChainId,
|
|
10399
|
+
customValueIcon
|
|
10414
10400
|
}) => {
|
|
10415
10401
|
const {
|
|
10416
10402
|
data: meshAssets,
|
|
@@ -10432,16 +10418,16 @@ var ConnectedMeshPaymentMethodItem = ({
|
|
|
10432
10418
|
onBrokerageError?.();
|
|
10433
10419
|
}
|
|
10434
10420
|
}, [balanceError, isPending, isFetching, paymentMethodInfo.meta.brokerType]);
|
|
10435
|
-
return /* @__PURE__ */
|
|
10421
|
+
return /* @__PURE__ */ React81.createElement(
|
|
10436
10422
|
FunPaymentMethodItem,
|
|
10437
10423
|
{
|
|
10438
10424
|
isDisabled,
|
|
10439
|
-
badge: hasLowBalance && /* @__PURE__ */
|
|
10425
|
+
badge: hasLowBalance && /* @__PURE__ */ React81.createElement(FunBadge, { borderColor: "generalBorder" }, LOW_BALANCE),
|
|
10440
10426
|
isError: !!balanceError,
|
|
10441
|
-
isActive
|
|
10427
|
+
isActive,
|
|
10442
10428
|
keyIcon: label.icon,
|
|
10443
10429
|
keyText: label.text,
|
|
10444
|
-
valueIcon:
|
|
10430
|
+
valueIcon: customValueIcon,
|
|
10445
10431
|
onClick: onSelect,
|
|
10446
10432
|
disclaimerText
|
|
10447
10433
|
}
|
|
@@ -10462,16 +10448,16 @@ var AccountBalancePaymentMethodItem = ({
|
|
|
10462
10448
|
const uniqueChainIds = Array.from(
|
|
10463
10449
|
new Set(Object.values(usableWalletAssets).map((asset) => asset.chainId))
|
|
10464
10450
|
);
|
|
10465
|
-
return /* @__PURE__ */
|
|
10451
|
+
return /* @__PURE__ */ React81.createElement(SupportedChainList, { chainIdList: uniqueChainIds });
|
|
10466
10452
|
};
|
|
10467
10453
|
const dynamicLimit = formatCurrencyAndStringify2(totalBalance);
|
|
10468
10454
|
const disclaimerText = `${dynamicLimit ?? "No limit"} \u2022 Instant`;
|
|
10469
10455
|
const keyIconSize = 20;
|
|
10470
|
-
return /* @__PURE__ */
|
|
10456
|
+
return /* @__PURE__ */ React81.createElement(
|
|
10471
10457
|
FunPaymentMethodItem,
|
|
10472
10458
|
{
|
|
10473
10459
|
isActive,
|
|
10474
|
-
keyIcon: isLoadingAssets ? /* @__PURE__ */
|
|
10460
|
+
keyIcon: isLoadingAssets ? /* @__PURE__ */ React81.createElement(SpinnerIcon, { size: keyIconSize }) : /* @__PURE__ */ React81.createElement(
|
|
10475
10461
|
PaymentMethodIcon,
|
|
10476
10462
|
{
|
|
10477
10463
|
keyIconSize,
|
|
@@ -10495,16 +10481,16 @@ var CardPaymentMethodItem = ({
|
|
|
10495
10481
|
}) => {
|
|
10496
10482
|
const { textCustomizations } = useFunkitConfig();
|
|
10497
10483
|
const timeEstimate = useCheckoutTimeEstimate(2 * 60, "card" /* CARD */);
|
|
10498
|
-
return /* @__PURE__ */
|
|
10484
|
+
return /* @__PURE__ */ React81.createElement(
|
|
10499
10485
|
FunPaymentMethodItem,
|
|
10500
10486
|
{
|
|
10501
10487
|
isActive,
|
|
10502
10488
|
keyIcon: paymentIcon,
|
|
10503
10489
|
keyText: textCustomizations.debitOrCredit,
|
|
10504
|
-
valueIcon: customValueIcon ?? /* @__PURE__ */
|
|
10490
|
+
valueIcon: customValueIcon ?? /* @__PURE__ */ React81.createElement(CombinedCreditCardOptionsIcon, null),
|
|
10505
10491
|
onClick,
|
|
10506
10492
|
isDisabled: !isClickable,
|
|
10507
|
-
badge: /* @__PURE__ */
|
|
10493
|
+
badge: /* @__PURE__ */ React81.createElement(
|
|
10508
10494
|
FunBadge,
|
|
10509
10495
|
{
|
|
10510
10496
|
background: "approvedBadgeBackground",
|
|
@@ -10531,9 +10517,9 @@ var TransferPaymentMethodItem = ({
|
|
|
10531
10517
|
const getTokenTransferIcon = () => {
|
|
10532
10518
|
const uniqueChainIds = new Set(Object.keys(enabledChainTokens));
|
|
10533
10519
|
const hasNewChain = bannerData?.isChainNew && uniqueChainIds.delete(`${bannerData.chainId}`);
|
|
10534
|
-
return /* @__PURE__ */
|
|
10520
|
+
return /* @__PURE__ */ React81.createElement(Box, { display: "flex", gap: "8" }, /* @__PURE__ */ React81.createElement(SupportedChainList, { chainIdList: Array.from(uniqueChainIds) }), hasNewChain && /* @__PURE__ */ React81.createElement(NewTokenBadge, { iconSymbol: bannerData.symbol }));
|
|
10535
10521
|
};
|
|
10536
|
-
return /* @__PURE__ */
|
|
10522
|
+
return /* @__PURE__ */ React81.createElement(
|
|
10537
10523
|
FunPaymentMethodItem,
|
|
10538
10524
|
{
|
|
10539
10525
|
isActive,
|
|
@@ -10555,13 +10541,13 @@ var BrokeragePaymentMethodItem = ({
|
|
|
10555
10541
|
}) => {
|
|
10556
10542
|
const { textCustomizations } = useFunkitConfig();
|
|
10557
10543
|
const timeEstimate = useCheckoutTimeEstimate(3 * 60, "brokerage" /* BROKERAGE */);
|
|
10558
|
-
return /* @__PURE__ */
|
|
10544
|
+
return /* @__PURE__ */ React81.createElement(
|
|
10559
10545
|
FunPaymentMethodItem,
|
|
10560
10546
|
{
|
|
10561
10547
|
isActive,
|
|
10562
10548
|
keyIcon: paymentIcon,
|
|
10563
10549
|
keyText: textCustomizations.brokerageOrExchange,
|
|
10564
|
-
valueIcon: customValueIcon ?? /* @__PURE__ */
|
|
10550
|
+
valueIcon: customValueIcon ?? /* @__PURE__ */ React81.createElement(Box, { display: "flex", gap: "2", alignItems: "center" }, /* @__PURE__ */ React81.createElement(BrokerageConditionalIcons, null)),
|
|
10565
10551
|
onClick,
|
|
10566
10552
|
isDisabled: !isClickable,
|
|
10567
10553
|
disclaimerText: `No limit \u2022 ${formatSecondsToReadableForm(timeEstimate, true)}`
|
|
@@ -10576,12 +10562,12 @@ var ActiveFiatAccountPaymentMethodItem = ({
|
|
|
10576
10562
|
}) => {
|
|
10577
10563
|
const label = usePaymentMethodInfoLabel(paymentMethodInfo);
|
|
10578
10564
|
const customerStatus = paymentMethodInfo.bridgeCustomer?.status;
|
|
10579
|
-
return /* @__PURE__ */
|
|
10565
|
+
return /* @__PURE__ */ React81.createElement(
|
|
10580
10566
|
FunPaymentMethodItem,
|
|
10581
10567
|
{
|
|
10582
10568
|
isActive,
|
|
10583
10569
|
keyIcon: label.icon,
|
|
10584
|
-
valueIcon: customValueIcon ?? (customerStatus === BridgeCustomerStatus3.OFFBOARDED && /* @__PURE__ */
|
|
10570
|
+
valueIcon: customValueIcon ?? (customerStatus === BridgeCustomerStatus3.OFFBOARDED && /* @__PURE__ */ React81.createElement(BridgeCustomerStatusBadge, { status: customerStatus })),
|
|
10585
10571
|
keyText: label.text,
|
|
10586
10572
|
onClick,
|
|
10587
10573
|
disclaimerText: `No limit \u2022 ${FIAT_PROCESSING_TIME}`
|
|
@@ -10597,13 +10583,13 @@ var CreateFiatAccountPaymentMethodItem = ({
|
|
|
10597
10583
|
}) => {
|
|
10598
10584
|
const { data: fiatAccounts } = useVirtualFiatAccounts();
|
|
10599
10585
|
const { textCustomizations } = useFunkitConfig();
|
|
10600
|
-
return /* @__PURE__ */
|
|
10586
|
+
return /* @__PURE__ */ React81.createElement(
|
|
10601
10587
|
FunPaymentMethodItem,
|
|
10602
10588
|
{
|
|
10603
10589
|
isActive,
|
|
10604
10590
|
keyIcon: paymentIcon,
|
|
10605
10591
|
keyText: textCustomizations.virtualFiat,
|
|
10606
|
-
valueIcon: customValueIcon ?? /* @__PURE__ */
|
|
10592
|
+
valueIcon: customValueIcon ?? /* @__PURE__ */ React81.createElement(
|
|
10607
10593
|
BridgeCustomerStatusBadge,
|
|
10608
10594
|
{
|
|
10609
10595
|
status: fiatAccounts?.bridgeCustomer?.status,
|
|
@@ -10624,7 +10610,7 @@ function AddPaymentMethodItem({
|
|
|
10624
10610
|
customValueIcon
|
|
10625
10611
|
}) {
|
|
10626
10612
|
const icon = usePaymentMethodIcon(paymentMethod);
|
|
10627
|
-
const paymentIcon = /* @__PURE__ */
|
|
10613
|
+
const paymentIcon = /* @__PURE__ */ React81.createElement(PaymentMethodIcon, { keyIconSize: 20, paymentIcon: icon });
|
|
10628
10614
|
const commonProps = {
|
|
10629
10615
|
isActive,
|
|
10630
10616
|
isClickable,
|
|
@@ -10633,26 +10619,26 @@ function AddPaymentMethodItem({
|
|
|
10633
10619
|
paymentIcon
|
|
10634
10620
|
};
|
|
10635
10621
|
if (paymentMethod === "balance" /* ACCOUNT_BALANCE */) {
|
|
10636
|
-
return /* @__PURE__ */
|
|
10622
|
+
return /* @__PURE__ */ React81.createElement(ConnectWalletItem, { ...commonProps });
|
|
10637
10623
|
}
|
|
10638
10624
|
if (paymentMethod === "card" /* CARD */) {
|
|
10639
|
-
return /* @__PURE__ */
|
|
10625
|
+
return /* @__PURE__ */ React81.createElement(CardPaymentMethodItem, { ...commonProps });
|
|
10640
10626
|
}
|
|
10641
10627
|
if (paymentMethod === "token_transfer" /* TOKEN_TRANSFER */) {
|
|
10642
|
-
return /* @__PURE__ */
|
|
10628
|
+
return /* @__PURE__ */ React81.createElement(TransferPaymentMethodItem, { ...commonProps });
|
|
10643
10629
|
}
|
|
10644
10630
|
if (paymentMethod === "brokerage" /* BROKERAGE */) {
|
|
10645
|
-
return /* @__PURE__ */
|
|
10631
|
+
return /* @__PURE__ */ React81.createElement(BrokeragePaymentMethodItem, { ...commonProps });
|
|
10646
10632
|
}
|
|
10647
10633
|
if (paymentMethod === "virtual_bank" /* VIRTUAL_BANK */) {
|
|
10648
|
-
return /* @__PURE__ */
|
|
10634
|
+
return /* @__PURE__ */ React81.createElement(CreateFiatAccountPaymentMethodItem, { ...commonProps });
|
|
10649
10635
|
}
|
|
10650
10636
|
}
|
|
10651
10637
|
|
|
10652
10638
|
// src/components/Icons/New/BankIcon.tsx
|
|
10653
|
-
import
|
|
10639
|
+
import React82 from "react";
|
|
10654
10640
|
var BankIcon = ({ size = 20 }) => {
|
|
10655
|
-
return /* @__PURE__ */
|
|
10641
|
+
return /* @__PURE__ */ React82.createElement(
|
|
10656
10642
|
"svg",
|
|
10657
10643
|
{
|
|
10658
10644
|
width: size,
|
|
@@ -10661,14 +10647,14 @@ var BankIcon = ({ size = 20 }) => {
|
|
|
10661
10647
|
fill: "none",
|
|
10662
10648
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10663
10649
|
},
|
|
10664
|
-
/* @__PURE__ */
|
|
10650
|
+
/* @__PURE__ */ React82.createElement(
|
|
10665
10651
|
"path",
|
|
10666
10652
|
{
|
|
10667
10653
|
d: "M10 9.41667C9.3975 9.41667 8.90909 9.90169 8.90909 10.5C8.90909 11.0983 9.3975 11.5833 10 11.5833C10.6025 11.5833 11.0909 11.0983 11.0909 10.5C11.0909 9.90169 10.6025 9.41667 10 9.41667Z",
|
|
10668
10654
|
fill: "currentColor"
|
|
10669
10655
|
}
|
|
10670
10656
|
),
|
|
10671
|
-
/* @__PURE__ */
|
|
10657
|
+
/* @__PURE__ */ React82.createElement(
|
|
10672
10658
|
"path",
|
|
10673
10659
|
{
|
|
10674
10660
|
fillRule: "evenodd",
|
|
@@ -10680,7 +10666,7 @@ var BankIcon = ({ size = 20 }) => {
|
|
|
10680
10666
|
);
|
|
10681
10667
|
};
|
|
10682
10668
|
var BankIconActive = ({ size = 20 }) => {
|
|
10683
|
-
return /* @__PURE__ */
|
|
10669
|
+
return /* @__PURE__ */ React82.createElement(
|
|
10684
10670
|
"svg",
|
|
10685
10671
|
{
|
|
10686
10672
|
width: size,
|
|
@@ -10689,14 +10675,14 @@ var BankIconActive = ({ size = 20 }) => {
|
|
|
10689
10675
|
fill: "none",
|
|
10690
10676
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10691
10677
|
},
|
|
10692
|
-
/* @__PURE__ */
|
|
10678
|
+
/* @__PURE__ */ React82.createElement(
|
|
10693
10679
|
"path",
|
|
10694
10680
|
{
|
|
10695
10681
|
d: "M10 8.41667C9.3975 8.41667 8.90909 8.90169 8.90909 9.5C8.90909 10.0983 9.3975 10.5833 10 10.5833C10.6025 10.5833 11.0909 10.0983 11.0909 9.5C11.0909 8.90169 10.6025 8.41667 10 8.41667Z",
|
|
10696
10682
|
fill: "url(#paint0_linear_28198_245196)"
|
|
10697
10683
|
}
|
|
10698
10684
|
),
|
|
10699
|
-
/* @__PURE__ */
|
|
10685
|
+
/* @__PURE__ */ React82.createElement(
|
|
10700
10686
|
"path",
|
|
10701
10687
|
{
|
|
10702
10688
|
fillRule: "evenodd",
|
|
@@ -10705,7 +10691,7 @@ var BankIconActive = ({ size = 20 }) => {
|
|
|
10705
10691
|
fill: "url(#paint1_linear_28198_245196)"
|
|
10706
10692
|
}
|
|
10707
10693
|
),
|
|
10708
|
-
/* @__PURE__ */
|
|
10694
|
+
/* @__PURE__ */ React82.createElement("defs", null, /* @__PURE__ */ React82.createElement(
|
|
10709
10695
|
"linearGradient",
|
|
10710
10696
|
{
|
|
10711
10697
|
id: "paint0_linear_28198_245196",
|
|
@@ -10715,9 +10701,9 @@ var BankIconActive = ({ size = 20 }) => {
|
|
|
10715
10701
|
y2: "16.9215",
|
|
10716
10702
|
gradientUnits: "userSpaceOnUse"
|
|
10717
10703
|
},
|
|
10718
|
-
/* @__PURE__ */
|
|
10719
|
-
/* @__PURE__ */
|
|
10720
|
-
), /* @__PURE__ */
|
|
10704
|
+
/* @__PURE__ */ React82.createElement("stop", { stopColor: "#055DF5" }),
|
|
10705
|
+
/* @__PURE__ */ React82.createElement("stop", { offset: "1", stopColor: "#508FFB" })
|
|
10706
|
+
), /* @__PURE__ */ React82.createElement(
|
|
10721
10707
|
"linearGradient",
|
|
10722
10708
|
{
|
|
10723
10709
|
id: "paint1_linear_28198_245196",
|
|
@@ -10727,8 +10713,8 @@ var BankIconActive = ({ size = 20 }) => {
|
|
|
10727
10713
|
y2: "16.9215",
|
|
10728
10714
|
gradientUnits: "userSpaceOnUse"
|
|
10729
10715
|
},
|
|
10730
|
-
/* @__PURE__ */
|
|
10731
|
-
/* @__PURE__ */
|
|
10716
|
+
/* @__PURE__ */ React82.createElement("stop", { stopColor: "#055DF5" }),
|
|
10717
|
+
/* @__PURE__ */ React82.createElement("stop", { offset: "1", stopColor: "#508FFB" })
|
|
10732
10718
|
))
|
|
10733
10719
|
);
|
|
10734
10720
|
};
|
|
@@ -10762,13 +10748,13 @@ function addLatestWalletId(walletId) {
|
|
|
10762
10748
|
}
|
|
10763
10749
|
|
|
10764
10750
|
// src/components/FunButton/FunSignInButton.tsx
|
|
10765
|
-
import
|
|
10751
|
+
import React83 from "react";
|
|
10766
10752
|
function FunSignInButton({
|
|
10767
10753
|
title,
|
|
10768
10754
|
titlePrefix,
|
|
10769
10755
|
onClick
|
|
10770
10756
|
}) {
|
|
10771
|
-
return /* @__PURE__ */
|
|
10757
|
+
return /* @__PURE__ */ React83.createElement(
|
|
10772
10758
|
Box,
|
|
10773
10759
|
{
|
|
10774
10760
|
as: "button",
|
|
@@ -10786,7 +10772,7 @@ function FunSignInButton({
|
|
|
10786
10772
|
cursor: "pointer",
|
|
10787
10773
|
style: { outline: "none" }
|
|
10788
10774
|
},
|
|
10789
|
-
/* @__PURE__ */
|
|
10775
|
+
/* @__PURE__ */ React83.createElement(Box, { display: "flex", gap: "12", alignItems: "center", color: "primaryText" }, titlePrefix, /* @__PURE__ */ React83.createElement(Text, { as: "h2", weight: "medium", size: "13" }, title), /* @__PURE__ */ React83.createElement(
|
|
10790
10776
|
Box,
|
|
10791
10777
|
{
|
|
10792
10778
|
color: "secondaryText",
|
|
@@ -10797,22 +10783,22 @@ function FunSignInButton({
|
|
|
10797
10783
|
alignItems: "center",
|
|
10798
10784
|
justifyContent: "center"
|
|
10799
10785
|
},
|
|
10800
|
-
/* @__PURE__ */
|
|
10786
|
+
/* @__PURE__ */ React83.createElement(ArrowIcon, { direction: "right", size: 11 })
|
|
10801
10787
|
))
|
|
10802
10788
|
);
|
|
10803
10789
|
}
|
|
10804
10790
|
|
|
10805
10791
|
// src/components/FunInput/FunInput.tsx
|
|
10806
|
-
import
|
|
10792
|
+
import React85, {
|
|
10807
10793
|
forwardRef as forwardRef2,
|
|
10808
10794
|
useState as useState15
|
|
10809
10795
|
} from "react";
|
|
10810
10796
|
import clsx10 from "clsx";
|
|
10811
10797
|
|
|
10812
10798
|
// src/components/Icons/SearchIcon.tsx
|
|
10813
|
-
import
|
|
10799
|
+
import React84 from "react";
|
|
10814
10800
|
var SearchIcon = () => {
|
|
10815
|
-
return /* @__PURE__ */
|
|
10801
|
+
return /* @__PURE__ */ React84.createElement(
|
|
10816
10802
|
"svg",
|
|
10817
10803
|
{
|
|
10818
10804
|
width: "15",
|
|
@@ -10821,14 +10807,14 @@ var SearchIcon = () => {
|
|
|
10821
10807
|
fill: "none",
|
|
10822
10808
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10823
10809
|
},
|
|
10824
|
-
/* @__PURE__ */
|
|
10810
|
+
/* @__PURE__ */ React84.createElement(
|
|
10825
10811
|
"path",
|
|
10826
10812
|
{
|
|
10827
10813
|
d: "M6.45041 12.9008C5.17464 12.9008 3.92752 12.5225 2.86676 11.8138C1.80599 11.105 0.979229 10.0975 0.491012 8.91887C0.00279446 7.74023 -0.124946 6.44321 0.123947 5.19199C0.37284 3.94074 0.987179 2.79139 1.88928 1.88928C2.79139 0.987179 3.94074 0.37284 5.19199 0.123947C6.44321 -0.124946 7.74023 0.00279446 8.91887 0.491012C10.0975 0.979229 11.105 1.80599 11.8138 2.86676C12.5225 3.92752 12.9008 5.17464 12.9008 6.45041C12.9008 7.29744 12.7339 8.13625 12.4098 8.91887C12.0856 9.70148 11.6105 10.4126 11.0115 11.0115C10.4126 11.6105 9.70148 12.0856 8.91887 12.4098C8.13625 12.7339 7.29744 12.9008 6.45041 12.9008ZM6.45041 1.29351C5.43386 1.29351 4.44014 1.59496 3.59491 2.15972C2.74968 2.72448 2.0909 3.52721 1.70189 4.46637C1.31287 5.40554 1.21108 6.43893 1.4094 7.43596C1.60772 8.43299 2.09724 9.34881 2.81604 10.0676C3.53486 10.7864 4.45067 11.276 5.44769 11.4743C6.44467 11.6726 7.47811 11.5708 8.41731 11.1818C9.35643 10.7927 10.1592 10.134 10.724 9.28876C11.2887 8.44352 11.5902 7.44984 11.5902 6.43328C11.5902 5.07012 11.0487 3.7628 10.0847 2.79891C9.12086 1.83502 7.81356 1.29351 6.45041 1.29351Z",
|
|
10828
10814
|
fill: "currentColor"
|
|
10829
10815
|
}
|
|
10830
10816
|
),
|
|
10831
|
-
/* @__PURE__ */
|
|
10817
|
+
/* @__PURE__ */ React84.createElement(
|
|
10832
10818
|
"path",
|
|
10833
10819
|
{
|
|
10834
10820
|
d: "M14.3567 15C14.2723 15.0003 14.1886 14.9839 14.1107 14.9515C14.0327 14.9192 13.962 14.8716 13.9027 14.8115L10.3648 11.2737C10.2513 11.1519 10.1896 10.9907 10.1925 10.8243C10.1954 10.6578 10.2629 10.4991 10.3806 10.3813C10.4983 10.2636 10.6571 10.1962 10.8236 10.1933C10.99 10.1904 11.151 10.2521 11.2729 10.3656L14.8107 13.9035C14.931 14.024 14.9986 14.1872 14.9986 14.3575C14.9986 14.5277 14.931 14.691 14.8107 14.8115C14.7515 14.8716 14.6807 14.9192 14.6027 14.9515C14.5248 14.9839 14.4411 15.0003 14.3567 15Z",
|
|
@@ -10886,7 +10872,7 @@ var FunInput = forwardRef2(
|
|
|
10886
10872
|
hover: "inputBorderHover"
|
|
10887
10873
|
};
|
|
10888
10874
|
};
|
|
10889
|
-
return /* @__PURE__ */
|
|
10875
|
+
return /* @__PURE__ */ React85.createElement(
|
|
10890
10876
|
Box,
|
|
10891
10877
|
{
|
|
10892
10878
|
color: "primaryText",
|
|
@@ -10895,8 +10881,8 @@ var FunInput = forwardRef2(
|
|
|
10895
10881
|
gap: "8",
|
|
10896
10882
|
width: "full"
|
|
10897
10883
|
},
|
|
10898
|
-
label && /* @__PURE__ */
|
|
10899
|
-
isLoading ? /* @__PURE__ */
|
|
10884
|
+
label && /* @__PURE__ */ React85.createElement(Text, { size: "12", weight: textWeight }, label),
|
|
10885
|
+
isLoading ? /* @__PURE__ */ React85.createElement(FunSkeletonBlock, { height: "44" }) : /* @__PURE__ */ React85.createElement(
|
|
10900
10886
|
Box,
|
|
10901
10887
|
{
|
|
10902
10888
|
borderRadius,
|
|
@@ -10916,8 +10902,8 @@ var FunInput = forwardRef2(
|
|
|
10916
10902
|
hover: "offBackground"
|
|
10917
10903
|
}
|
|
10918
10904
|
},
|
|
10919
|
-
prefix && /* @__PURE__ */
|
|
10920
|
-
prefixIcon === "SearchIcon" && /* @__PURE__ */
|
|
10905
|
+
prefix && /* @__PURE__ */ React85.createElement(Box, { paddingLeft: "12", height: "max" }, prefix),
|
|
10906
|
+
prefixIcon === "SearchIcon" && /* @__PURE__ */ React85.createElement(
|
|
10921
10907
|
Box,
|
|
10922
10908
|
{
|
|
10923
10909
|
display: "flex",
|
|
@@ -10926,15 +10912,15 @@ var FunInput = forwardRef2(
|
|
|
10926
10912
|
alignItems: "center",
|
|
10927
10913
|
color: isFocused ? "primaryText" : "secondaryText"
|
|
10928
10914
|
},
|
|
10929
|
-
/* @__PURE__ */
|
|
10915
|
+
/* @__PURE__ */ React85.createElement(SearchIcon, null)
|
|
10930
10916
|
),
|
|
10931
|
-
prefixIcon === "$" && /* @__PURE__ */
|
|
10917
|
+
prefixIcon === "$" && /* @__PURE__ */ React85.createElement(Box, { display: "flex", alignItems: "center", paddingLeft: "32" }, /* @__PURE__ */ React85.createElement(
|
|
10932
10918
|
DollarTextIcon,
|
|
10933
10919
|
{
|
|
10934
10920
|
fontSize: inputStyle.fontSize || DEFAULT_ICON_FONT_SIZE
|
|
10935
10921
|
}
|
|
10936
10922
|
)),
|
|
10937
|
-
/* @__PURE__ */
|
|
10923
|
+
/* @__PURE__ */ React85.createElement(
|
|
10938
10924
|
"input",
|
|
10939
10925
|
{
|
|
10940
10926
|
ref,
|
|
@@ -10963,13 +10949,13 @@ var FunInput = forwardRef2(
|
|
|
10963
10949
|
"data-auto-focus": inputProps.autoFocus
|
|
10964
10950
|
}
|
|
10965
10951
|
),
|
|
10966
|
-
suffix && /* @__PURE__ */
|
|
10952
|
+
suffix && /* @__PURE__ */ React85.createElement(Box, { padding: "4" }, suffix)
|
|
10967
10953
|
),
|
|
10968
|
-
error && typeof error === "string" && /* @__PURE__ */
|
|
10954
|
+
error && typeof error === "string" && /* @__PURE__ */ React85.createElement(Text, { color: "error", size: "10" }, error)
|
|
10969
10955
|
);
|
|
10970
10956
|
}
|
|
10971
10957
|
);
|
|
10972
|
-
var DollarTextIcon = ({ fontSize }) => /* @__PURE__ */
|
|
10958
|
+
var DollarTextIcon = ({ fontSize }) => /* @__PURE__ */ React85.createElement(
|
|
10973
10959
|
Text,
|
|
10974
10960
|
{
|
|
10975
10961
|
style: {
|
|
@@ -10982,10 +10968,10 @@ var DollarTextIcon = ({ fontSize }) => /* @__PURE__ */ React86.createElement(
|
|
|
10982
10968
|
);
|
|
10983
10969
|
|
|
10984
10970
|
// src/components/FunSocials/FunSocials.tsx
|
|
10985
|
-
import
|
|
10971
|
+
import React87 from "react";
|
|
10986
10972
|
|
|
10987
10973
|
// src/components/ModalSelection/ModalSelection.tsx
|
|
10988
|
-
import
|
|
10974
|
+
import React86, { useState as useState16 } from "react";
|
|
10989
10975
|
var ModalSelection = ({
|
|
10990
10976
|
as = "button",
|
|
10991
10977
|
currentlySelected = false,
|
|
@@ -11001,7 +10987,7 @@ var ModalSelection = ({
|
|
|
11001
10987
|
...urlProps
|
|
11002
10988
|
}) => {
|
|
11003
10989
|
const [isMouseOver, setIsMouseOver] = useState16(false);
|
|
11004
|
-
return /* @__PURE__ */
|
|
10990
|
+
return /* @__PURE__ */ React86.createElement(
|
|
11005
10991
|
Box,
|
|
11006
10992
|
{
|
|
11007
10993
|
display: "flex",
|
|
@@ -11009,7 +10995,7 @@ var ModalSelection = ({
|
|
|
11009
10995
|
onMouseEnter: () => setIsMouseOver(true),
|
|
11010
10996
|
onMouseLeave: () => setIsMouseOver(false)
|
|
11011
10997
|
},
|
|
11012
|
-
/* @__PURE__ */
|
|
10998
|
+
/* @__PURE__ */ React86.createElement(
|
|
11013
10999
|
Box,
|
|
11014
11000
|
{
|
|
11015
11001
|
as,
|
|
@@ -11033,7 +11019,7 @@ var ModalSelection = ({
|
|
|
11033
11019
|
width: "full",
|
|
11034
11020
|
...urlProps
|
|
11035
11021
|
},
|
|
11036
|
-
/* @__PURE__ */
|
|
11022
|
+
/* @__PURE__ */ React86.createElement(
|
|
11037
11023
|
Box,
|
|
11038
11024
|
{
|
|
11039
11025
|
color: currentlySelected ? "accentColorForeground" : "primaryText",
|
|
@@ -11043,7 +11029,7 @@ var ModalSelection = ({
|
|
|
11043
11029
|
fontWeight: "medium",
|
|
11044
11030
|
transition: "default"
|
|
11045
11031
|
},
|
|
11046
|
-
/* @__PURE__ */
|
|
11032
|
+
/* @__PURE__ */ React86.createElement(Box, { alignItems: "center", display: "flex", flexDirection: "row", gap: "12" }, icon ? icon : /* @__PURE__ */ React86.createElement(
|
|
11047
11033
|
AsyncImage,
|
|
11048
11034
|
{
|
|
11049
11035
|
background: iconBackground,
|
|
@@ -11054,7 +11040,7 @@ var ModalSelection = ({
|
|
|
11054
11040
|
src: iconUrl,
|
|
11055
11041
|
width: "18"
|
|
11056
11042
|
}
|
|
11057
|
-
), /* @__PURE__ */
|
|
11043
|
+
), /* @__PURE__ */ React86.createElement(
|
|
11058
11044
|
Box,
|
|
11059
11045
|
{
|
|
11060
11046
|
display: "flex",
|
|
@@ -11062,8 +11048,8 @@ var ModalSelection = ({
|
|
|
11062
11048
|
style: { flex: 1 },
|
|
11063
11049
|
alignItems: "center"
|
|
11064
11050
|
},
|
|
11065
|
-
/* @__PURE__ */
|
|
11066
|
-
recent && /* @__PURE__ */
|
|
11051
|
+
/* @__PURE__ */ React86.createElement(Box, { maxWidth: "200" }, name),
|
|
11052
|
+
recent && /* @__PURE__ */ React86.createElement(
|
|
11067
11053
|
FunBadge,
|
|
11068
11054
|
{
|
|
11069
11055
|
borderRadius: "smallBadge",
|
|
@@ -11081,11 +11067,11 @@ ModalSelection.displayName = "ModalSelection";
|
|
|
11081
11067
|
// src/components/FunSocials/FunSocials.tsx
|
|
11082
11068
|
var FunSocials = ({ options, onSelect, flexDirection }) => {
|
|
11083
11069
|
const isRow = flexDirection === "row";
|
|
11084
|
-
return /* @__PURE__ */
|
|
11070
|
+
return /* @__PURE__ */ React87.createElement(Box, { display: "flex", flexDirection, gap: "12" }, options.map((socialItem) => {
|
|
11085
11071
|
if (isRow) {
|
|
11086
11072
|
return (
|
|
11087
11073
|
// Applying flex-grow directly on the button leads to visual defects on focus as border width changes
|
|
11088
|
-
/* @__PURE__ */
|
|
11074
|
+
/* @__PURE__ */ React87.createElement(Box, { key: socialItem.provider, style: { flex: 1 } }, /* @__PURE__ */ React87.createElement(
|
|
11089
11075
|
FunIconButton,
|
|
11090
11076
|
{
|
|
11091
11077
|
onClick: () => onSelect(socialItem.provider),
|
|
@@ -11099,7 +11085,7 @@ var FunSocials = ({ options, onSelect, flexDirection }) => {
|
|
|
11099
11085
|
))
|
|
11100
11086
|
);
|
|
11101
11087
|
}
|
|
11102
|
-
return /* @__PURE__ */
|
|
11088
|
+
return /* @__PURE__ */ React87.createElement(
|
|
11103
11089
|
ModalSelection,
|
|
11104
11090
|
{
|
|
11105
11091
|
icon: socialItem.getIcon(),
|
|
@@ -11113,9 +11099,9 @@ var FunSocials = ({ options, onSelect, flexDirection }) => {
|
|
|
11113
11099
|
};
|
|
11114
11100
|
|
|
11115
11101
|
// src/components/Icons/CryptoIcon.tsx
|
|
11116
|
-
import
|
|
11102
|
+
import React88 from "react";
|
|
11117
11103
|
var CryptoIcon = () => {
|
|
11118
|
-
return /* @__PURE__ */
|
|
11104
|
+
return /* @__PURE__ */ React88.createElement(
|
|
11119
11105
|
"svg",
|
|
11120
11106
|
{
|
|
11121
11107
|
width: "20",
|
|
@@ -11124,7 +11110,7 @@ var CryptoIcon = () => {
|
|
|
11124
11110
|
fill: "none",
|
|
11125
11111
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11126
11112
|
},
|
|
11127
|
-
/* @__PURE__ */
|
|
11113
|
+
/* @__PURE__ */ React88.createElement(
|
|
11128
11114
|
"path",
|
|
11129
11115
|
{
|
|
11130
11116
|
d: "M9.76471 17.0376C8.81223 17.0376 7.91445 16.8553 7.07135 16.4907C6.2328 16.1261 5.49224 15.6226 4.84967 14.98C4.20709 14.3374 3.70351 13.5968 3.33892 12.7583C2.97434 11.9152 2.79205 11.0174 2.79205 10.0649C2.79205 9.11247 2.97434 8.21696 3.33892 7.37842C3.70351 6.53532 4.20481 5.79248 4.84283 5.1499C5.48541 4.50732 6.22597 4.00374 7.06451 3.63916C7.90761 3.27458 8.8054 3.09229 9.75787 3.09229C10.7103 3.09229 11.6081 3.27458 12.4512 3.63916C13.2943 4.00374 14.0372 4.50732 14.6797 5.1499C15.3223 5.79248 15.8259 6.53532 16.1905 7.37842C16.5551 8.21696 16.7374 9.11247 16.7374 10.0649C16.7374 11.0174 16.5551 11.9152 16.1905 12.7583C15.8259 13.5968 15.3223 14.3374 14.6797 14.98C14.0372 15.6226 13.2943 16.1261 12.4512 16.4907C11.6127 16.8553 10.7172 17.0376 9.76471 17.0376ZM9.76471 15.8755C10.5713 15.8755 11.3256 15.7251 12.0274 15.4243C12.7292 15.1235 13.3467 14.7088 13.8799 14.1802C14.4131 13.647 14.8279 13.0295 15.1241 12.3276C15.4249 11.6258 15.5753 10.8716 15.5753 10.0649C15.5753 9.2583 15.4249 8.50407 15.1241 7.80225C14.8233 7.10042 14.4063 6.48291 13.8731 5.94971C13.3445 5.4165 12.7269 5.00179 12.0206 4.70557C11.3187 4.40479 10.5645 4.25439 9.75787 4.25439C8.95123 4.25439 8.197 4.40479 7.49517 4.70557C6.79335 5.00179 6.17812 5.4165 5.64947 5.94971C5.12083 6.48291 4.70611 7.10042 4.40533 7.80225C4.10911 8.50407 3.96099 9.2583 3.96099 10.0649C3.96099 10.8716 4.10911 11.6258 4.40533 12.3276C4.70611 13.0295 5.12083 13.647 5.64947 14.1802C6.18267 14.7088 6.80019 15.1235 7.50201 15.4243C8.20383 15.7251 8.95807 15.8755 9.76471 15.8755ZM5.34185 11.3569L7.64557 8.3833C7.78228 8.21468 7.92812 8.13037 8.08307 8.13037C8.19244 8.13037 8.31777 8.16911 8.45904 8.24658L11.4258 9.83936L13.709 8.61572C13.8458 8.54281 13.9665 8.52913 14.0713 8.57471C14.1807 8.62028 14.2514 8.70003 14.2833 8.81396C14.3152 8.92334 14.2833 9.04183 14.1876 9.16943L11.877 12.1499C11.7403 12.3231 11.5922 12.4097 11.4327 12.4097C11.3279 12.4097 11.2048 12.3709 11.0635 12.2935L8.0899 10.6938L5.82721 11.9243C5.6996 11.9927 5.57883 12.0063 5.4649 11.9653C5.35097 11.9198 5.27577 11.8423 5.23932 11.7329C5.20286 11.619 5.23704 11.4937 5.34185 11.3569Z",
|
|
@@ -11135,9 +11121,9 @@ var CryptoIcon = () => {
|
|
|
11135
11121
|
};
|
|
11136
11122
|
|
|
11137
11123
|
// src/components/Icons/SocialMediaIcons.tsx
|
|
11138
|
-
import
|
|
11124
|
+
import React89 from "react";
|
|
11139
11125
|
var GoogleIcon = ({ size = 18 }) => {
|
|
11140
|
-
return /* @__PURE__ */
|
|
11126
|
+
return /* @__PURE__ */ React89.createElement(
|
|
11141
11127
|
"svg",
|
|
11142
11128
|
{
|
|
11143
11129
|
width: size,
|
|
@@ -11146,68 +11132,68 @@ var GoogleIcon = ({ size = 18 }) => {
|
|
|
11146
11132
|
fill: "none",
|
|
11147
11133
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11148
11134
|
},
|
|
11149
|
-
/* @__PURE__ */
|
|
11135
|
+
/* @__PURE__ */ React89.createElement("g", { clipPath: "url(#clip0_1033_2902)" }, /* @__PURE__ */ React89.createElement("g", { clipPath: "url(#clip1_1033_2902)" }, /* @__PURE__ */ React89.createElement(
|
|
11150
11136
|
"path",
|
|
11151
11137
|
{
|
|
11152
11138
|
d: "M17.3612 7.68341C17.4368 7.68341 17.498 7.74467 17.498 7.82024V9.25684C17.498 9.79453 17.4481 10.3203 17.3523 10.8303C16.6113 14.7917 13.1213 17.7855 8.9381 17.7566C4.24421 17.7243 0.487676 13.9316 0.498068 9.23768C0.508395 4.55215 4.31009 0.756836 8.99804 0.756836C11.2948 0.756836 13.3787 1.668 14.9087 3.14806C14.9639 3.20148 14.9653 3.28954 14.911 3.34386L12.8786 5.37625C12.8263 5.42858 12.7417 5.42994 12.6881 5.37891C11.7278 4.46486 10.4286 3.9037 8.99804 3.9037C6.04392 3.9037 3.66508 6.26563 3.64503 9.21968C3.62487 12.1931 6.02931 14.6099 8.99804 14.6099C11.4068 14.6099 13.444 13.0187 14.1158 10.8303H9.13486C9.05929 10.8303 8.99804 10.769 8.99804 10.6934V7.8202C8.99804 7.74463 9.05929 7.68337 9.13486 7.68337H17.3612V7.68341Z",
|
|
11153
11139
|
fill: "#2196F3"
|
|
11154
11140
|
}
|
|
11155
|
-
), /* @__PURE__ */
|
|
11141
|
+
), /* @__PURE__ */ React89.createElement(
|
|
11156
11142
|
"path",
|
|
11157
11143
|
{
|
|
11158
11144
|
d: "M17.3613 7.68359H16.3352C16.4107 7.68359 16.472 7.74485 16.472 7.82042V9.25702C16.472 9.79471 16.4221 10.3205 16.3263 10.8305C15.6193 14.6097 12.4104 17.5082 8.48453 17.7417C8.63474 17.7505 8.78595 17.7557 8.93822 17.7568C13.1215 17.7856 16.6114 14.7919 17.3524 10.8305C17.4482 10.3205 17.4981 9.79471 17.4981 9.25702V7.82039C17.4981 7.74485 17.4369 7.68359 17.3613 7.68359Z",
|
|
11159
11145
|
fill: "#1E88E5"
|
|
11160
11146
|
}
|
|
11161
|
-
), /* @__PURE__ */
|
|
11147
|
+
), /* @__PURE__ */ React89.createElement(
|
|
11162
11148
|
"path",
|
|
11163
11149
|
{
|
|
11164
11150
|
d: "M4.13616 7.01503L1.55469 5.14981C3.00294 2.53038 5.79373 0.756836 8.99843 0.756836C11.2952 0.756836 13.3791 1.668 14.9091 3.14806C14.9643 3.20148 14.9657 3.28954 14.9114 3.34386L12.879 5.37625C12.8267 5.42848 12.7422 5.43011 12.6887 5.37918C11.7285 4.46496 10.4291 3.90373 8.99843 3.90373C6.84248 3.90373 4.98411 5.1782 4.13616 7.01503Z",
|
|
11165
11151
|
fill: "#F44336"
|
|
11166
11152
|
}
|
|
11167
|
-
), /* @__PURE__ */
|
|
11153
|
+
), /* @__PURE__ */ React89.createElement(
|
|
11168
11154
|
"path",
|
|
11169
11155
|
{
|
|
11170
11156
|
d: "M3.39062 6.47666L4.13587 7.01511C4.90983 5.33855 6.52576 4.13108 8.44125 3.93303C8.45566 3.93147 8.46951 3.92957 8.48418 3.92818C8.31561 3.91218 8.14478 3.90381 7.97199 3.90381C6.0244 3.90381 4.32705 4.93055 3.39062 6.47666Z",
|
|
11171
11157
|
fill: "#E53935"
|
|
11172
11158
|
}
|
|
11173
|
-
), /* @__PURE__ */
|
|
11159
|
+
), /* @__PURE__ */ React89.createElement(
|
|
11174
11160
|
"path",
|
|
11175
11161
|
{
|
|
11176
11162
|
d: "M13.882 3.14806C13.9373 3.20148 13.9387 3.28954 13.8843 3.34389L12.2347 4.99352C12.3927 5.11372 12.544 5.24228 12.6876 5.37894C12.7412 5.42998 12.8257 5.42862 12.8781 5.37629L14.9105 3.34389C14.9648 3.28954 14.9634 3.20152 14.9082 3.14806C13.3782 1.668 11.2943 0.756836 8.99753 0.756836C8.82517 0.756836 8.65418 0.76258 8.48438 0.772707C10.5775 0.897385 12.4668 1.77903 13.882 3.14806Z",
|
|
11177
11163
|
fill: "#E53935"
|
|
11178
11164
|
}
|
|
11179
|
-
), /* @__PURE__ */
|
|
11165
|
+
), /* @__PURE__ */ React89.createElement(
|
|
11180
11166
|
"path",
|
|
11181
11167
|
{
|
|
11182
11168
|
d: "M15.232 15.0335C13.6798 16.7085 11.4606 17.7569 8.99676 17.7569C5.66894 17.7569 2.78784 15.8445 1.39258 13.0585L4.02808 11.2524C4.81894 13.2203 6.74572 14.61 8.99676 14.61C10.4094 14.61 11.6942 14.0628 12.6506 13.1686L15.232 15.0335Z",
|
|
11183
11169
|
fill: "#4CAF50"
|
|
11184
11170
|
}
|
|
11185
|
-
), /* @__PURE__ */
|
|
11171
|
+
), /* @__PURE__ */ React89.createElement(
|
|
11186
11172
|
"path",
|
|
11187
11173
|
{
|
|
11188
11174
|
d: "M4.02911 11.2524L3.25195 11.785C4.15458 13.4665 5.92959 14.61 7.97161 14.61C8.1443 14.61 8.315 14.6015 8.4835 14.5856C6.45649 14.3923 4.75898 13.0686 4.02911 11.2524Z",
|
|
11189
11175
|
fill: "#43A047"
|
|
11190
11176
|
}
|
|
11191
|
-
), /* @__PURE__ */
|
|
11177
|
+
), /* @__PURE__ */ React89.createElement(
|
|
11192
11178
|
"path",
|
|
11193
11179
|
{
|
|
11194
11180
|
d: "M8.99797 17.7569C11.4618 17.7569 13.681 16.7085 15.2332 15.0334L14.601 14.5767C13.1435 16.3905 10.9571 17.5939 8.48618 17.7414C8.65551 17.7515 8.82611 17.7569 8.99797 17.7569Z",
|
|
11195
11181
|
fill: "#43A047"
|
|
11196
11182
|
}
|
|
11197
|
-
), /* @__PURE__ */
|
|
11183
|
+
), /* @__PURE__ */ React89.createElement(
|
|
11198
11184
|
"path",
|
|
11199
11185
|
{
|
|
11200
11186
|
d: "M3.64494 9.25693C3.64494 9.96223 3.7814 10.6358 4.0294 11.2525L1.39387 13.0585C0.820615 11.9147 0.498047 10.6234 0.498047 9.25693C0.498047 7.7673 0.881145 6.36726 1.5543 5.1499L4.13578 7.01512C3.82075 7.69681 3.64494 8.45654 3.64494 9.25693Z",
|
|
11201
11187
|
fill: "#FFC107"
|
|
11202
11188
|
}
|
|
11203
|
-
), /* @__PURE__ */
|
|
11189
|
+
), /* @__PURE__ */ React89.createElement(
|
|
11204
11190
|
"path",
|
|
11205
11191
|
{
|
|
11206
11192
|
d: "M3.25262 11.7849L4.02977 11.2524C3.78177 10.6357 3.64531 9.96213 3.64531 9.25683C3.64531 8.45644 3.82112 7.69671 4.13615 7.01502L3.39091 6.47656C2.90697 7.2756 2.62611 8.21322 2.61927 9.21971C2.61296 10.1479 2.84296 11.0218 3.25262 11.7849Z",
|
|
11207
11193
|
fill: "#FFB300"
|
|
11208
11194
|
}
|
|
11209
11195
|
))),
|
|
11210
|
-
/* @__PURE__ */
|
|
11196
|
+
/* @__PURE__ */ React89.createElement("defs", null, /* @__PURE__ */ React89.createElement("clipPath", { id: "clip0_1033_2902" }, /* @__PURE__ */ React89.createElement(
|
|
11211
11197
|
"rect",
|
|
11212
11198
|
{
|
|
11213
11199
|
width: "17",
|
|
@@ -11215,7 +11201,7 @@ var GoogleIcon = ({ size = 18 }) => {
|
|
|
11215
11201
|
fill: "white",
|
|
11216
11202
|
transform: "translate(0.5 0.5)"
|
|
11217
11203
|
}
|
|
11218
|
-
)), /* @__PURE__ */
|
|
11204
|
+
)), /* @__PURE__ */ React89.createElement("clipPath", { id: "clip1_1033_2902" }, /* @__PURE__ */ React89.createElement(
|
|
11219
11205
|
"rect",
|
|
11220
11206
|
{
|
|
11221
11207
|
width: "17",
|
|
@@ -11227,7 +11213,7 @@ var GoogleIcon = ({ size = 18 }) => {
|
|
|
11227
11213
|
);
|
|
11228
11214
|
};
|
|
11229
11215
|
var TwitterIcon = ({ size = 18 }) => {
|
|
11230
|
-
return /* @__PURE__ */
|
|
11216
|
+
return /* @__PURE__ */ React89.createElement(
|
|
11231
11217
|
"svg",
|
|
11232
11218
|
{
|
|
11233
11219
|
width: size,
|
|
@@ -11236,7 +11222,7 @@ var TwitterIcon = ({ size = 18 }) => {
|
|
|
11236
11222
|
fill: "none",
|
|
11237
11223
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11238
11224
|
},
|
|
11239
|
-
/* @__PURE__ */
|
|
11225
|
+
/* @__PURE__ */ React89.createElement(
|
|
11240
11226
|
"path",
|
|
11241
11227
|
{
|
|
11242
11228
|
d: "M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z",
|
|
@@ -11246,7 +11232,7 @@ var TwitterIcon = ({ size = 18 }) => {
|
|
|
11246
11232
|
);
|
|
11247
11233
|
};
|
|
11248
11234
|
var AppleIcon = ({ size = 18 }) => {
|
|
11249
|
-
return /* @__PURE__ */
|
|
11235
|
+
return /* @__PURE__ */ React89.createElement(
|
|
11250
11236
|
"svg",
|
|
11251
11237
|
{
|
|
11252
11238
|
width: size,
|
|
@@ -11255,7 +11241,7 @@ var AppleIcon = ({ size = 18 }) => {
|
|
|
11255
11241
|
fill: "none",
|
|
11256
11242
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11257
11243
|
},
|
|
11258
|
-
/* @__PURE__ */
|
|
11244
|
+
/* @__PURE__ */ React89.createElement("g", { clipPath: "url(#clip0_1049_3254)" }, /* @__PURE__ */ React89.createElement(
|
|
11259
11245
|
"path",
|
|
11260
11246
|
{
|
|
11261
11247
|
fillRule: "evenodd",
|
|
@@ -11264,7 +11250,7 @@ var AppleIcon = ({ size = 18 }) => {
|
|
|
11264
11250
|
fill: "currentColor"
|
|
11265
11251
|
}
|
|
11266
11252
|
)),
|
|
11267
|
-
/* @__PURE__ */
|
|
11253
|
+
/* @__PURE__ */ React89.createElement("defs", null, /* @__PURE__ */ React89.createElement("clipPath", { id: "clip0_1049_3254" }, /* @__PURE__ */ React89.createElement(
|
|
11268
11254
|
"rect",
|
|
11269
11255
|
{
|
|
11270
11256
|
width: "17",
|
|
@@ -11276,7 +11262,7 @@ var AppleIcon = ({ size = 18 }) => {
|
|
|
11276
11262
|
);
|
|
11277
11263
|
};
|
|
11278
11264
|
var FarcasterIcon = ({ size = 20 }) => {
|
|
11279
|
-
return /* @__PURE__ */
|
|
11265
|
+
return /* @__PURE__ */ React89.createElement(
|
|
11280
11266
|
"svg",
|
|
11281
11267
|
{
|
|
11282
11268
|
width: size,
|
|
@@ -11285,21 +11271,21 @@ var FarcasterIcon = ({ size = 20 }) => {
|
|
|
11285
11271
|
fill: "none",
|
|
11286
11272
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11287
11273
|
},
|
|
11288
|
-
/* @__PURE__ */
|
|
11274
|
+
/* @__PURE__ */ React89.createElement(
|
|
11289
11275
|
"path",
|
|
11290
11276
|
{
|
|
11291
11277
|
d: "M257.778 155.556H742.222V844.445H671.111V528.889H670.414C662.554 441.677 589.258 373.333 500 373.333C410.742 373.333 337.446 441.677 329.586 528.889H328.889V844.445H257.778V155.556Z",
|
|
11292
11278
|
fill: "#855DCD"
|
|
11293
11279
|
}
|
|
11294
11280
|
),
|
|
11295
|
-
/* @__PURE__ */
|
|
11281
|
+
/* @__PURE__ */ React89.createElement(
|
|
11296
11282
|
"path",
|
|
11297
11283
|
{
|
|
11298
11284
|
d: "M128.889 253.333L157.778 351.111H182.222V746.667C169.949 746.667 160 756.616 160 768.889V795.556H155.556C143.283 795.556 133.333 805.505 133.333 817.778V844.445H382.222V817.778C382.222 805.505 372.273 795.556 360 795.556H355.556V768.889C355.556 756.616 345.606 746.667 333.333 746.667H306.667V253.333H128.889Z",
|
|
11299
11285
|
fill: "#855DCD"
|
|
11300
11286
|
}
|
|
11301
11287
|
),
|
|
11302
|
-
/* @__PURE__ */
|
|
11288
|
+
/* @__PURE__ */ React89.createElement(
|
|
11303
11289
|
"path",
|
|
11304
11290
|
{
|
|
11305
11291
|
d: "M675.556 746.667C663.283 746.667 653.333 756.616 653.333 768.889V795.556H648.889C636.616 795.556 626.667 805.505 626.667 817.778V844.445H875.556V817.778C875.556 805.505 865.606 795.556 853.333 795.556H848.889V768.889C848.889 756.616 838.94 746.667 826.667 746.667V351.111H851.111L880 253.333H702.222V746.667H675.556Z",
|
|
@@ -11310,9 +11296,9 @@ var FarcasterIcon = ({ size = 20 }) => {
|
|
|
11310
11296
|
};
|
|
11311
11297
|
|
|
11312
11298
|
// src/components/Icons/SocialsIcon.tsx
|
|
11313
|
-
import
|
|
11299
|
+
import React90 from "react";
|
|
11314
11300
|
var SocialsIcon = () => {
|
|
11315
|
-
return /* @__PURE__ */
|
|
11301
|
+
return /* @__PURE__ */ React90.createElement(
|
|
11316
11302
|
"svg",
|
|
11317
11303
|
{
|
|
11318
11304
|
width: "20",
|
|
@@ -11321,7 +11307,7 @@ var SocialsIcon = () => {
|
|
|
11321
11307
|
fill: "none",
|
|
11322
11308
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11323
11309
|
},
|
|
11324
|
-
/* @__PURE__ */
|
|
11310
|
+
/* @__PURE__ */ React90.createElement(
|
|
11325
11311
|
"path",
|
|
11326
11312
|
{
|
|
11327
11313
|
d: "M9.75836 16.9746C8.86122 16.9746 8.01698 16.8032 7.22564 16.4604C6.4343 16.1219 5.73606 15.6501 5.13092 15.0449C4.53001 14.4398 4.05816 13.7415 3.71539 12.9502C3.37262 12.1589 3.20123 11.3146 3.20123 10.4175C3.20123 9.52035 3.37262 8.67611 3.71539 7.88477C4.05816 7.09342 4.53001 6.3973 5.13092 5.79639C5.73606 5.19124 6.43219 4.71729 7.2193 4.37451C8.01064 4.03174 8.85487 3.86035 9.75201 3.86035C10.6534 3.86035 11.4997 4.03174 12.2911 4.37451C13.0824 4.71729 13.7807 5.19124 14.3858 5.79639C14.9909 6.3973 15.4649 7.09342 15.8077 7.88477C16.1504 8.67611 16.3218 9.52035 16.3218 10.4175C16.3218 11.3146 16.1504 12.1589 15.8077 12.9502C15.4649 13.7415 14.9909 14.4398 14.3858 15.0449C13.7807 15.6501 13.0824 16.1219 12.2911 16.4604C11.4997 16.8032 10.6555 16.9746 9.75836 16.9746ZM9.75836 15.6797C10.4905 15.6797 11.1739 15.5443 11.8087 15.2734C12.4434 15.0026 13.002 14.626 13.4844 14.1436C13.9669 13.6611 14.3435 13.1025 14.6143 12.4678C14.8851 11.833 15.0206 11.1496 15.0206 10.4175C15.0206 9.68962 14.8851 9.0083 14.6143 8.37354C14.3435 7.73454 13.9669 7.17383 13.4844 6.69141C13.002 6.20898 12.4413 5.83236 11.8023 5.56152C11.1675 5.29069 10.4841 5.15527 9.75201 5.15527C9.02415 5.15527 8.34071 5.29069 7.70172 5.56152C7.06695 5.83236 6.51047 6.20898 6.03228 6.69141C5.55409 7.17383 5.17958 7.73454 4.90875 8.37354C4.63792 9.0083 4.5025 9.68962 4.5025 10.4175C4.5025 11.1496 4.63792 11.833 4.90875 12.4678C5.17958 13.1025 5.55409 13.6611 6.03228 14.1436C6.51471 14.626 7.0733 15.0026 7.70807 15.2734C8.34706 15.5443 9.03049 15.6797 9.75836 15.6797ZM13.9922 14.6069C13.5902 14.9751 13.1374 15.284 12.6338 15.5337C12.1303 15.7876 11.6267 15.9801 11.1231 16.1113C10.6195 16.2425 10.1646 16.3081 9.75836 16.3081C9.35634 16.3081 8.90142 16.2425 8.39361 16.1113C7.89003 15.9801 7.38645 15.7876 6.88287 15.5337C6.37929 15.284 5.92861 14.9751 5.53082 14.6069L5.55621 14.4927C5.69163 14.1838 5.94976 13.8854 6.33062 13.5977C6.71571 13.3057 7.20025 13.0687 7.78424 12.8867C8.36822 12.7005 9.02626 12.6074 9.75836 12.6074C10.4989 12.6074 11.1591 12.7005 11.7388 12.8867C12.3228 13.0687 12.8052 13.3057 13.1861 13.5977C13.5712 13.8854 13.8314 14.1859 13.9669 14.499L13.9922 14.6069ZM9.75836 11.5601C9.35211 11.5558 8.98394 11.45 8.65387 11.2427C8.32379 11.0311 8.06142 10.7454 7.86676 10.3857C7.67633 10.0218 7.579 9.61344 7.57476 9.16064C7.57053 8.73747 7.66575 8.34814 7.86041 7.99268C8.05507 7.63298 8.31744 7.34521 8.64752 7.12939C8.98183 6.91357 9.35211 6.80566 9.75836 6.80566C10.1688 6.80566 10.537 6.91357 10.8629 7.12939C11.1929 7.34521 11.4553 7.63298 11.65 7.99268C11.8489 8.34814 11.9483 8.73747 11.9483 9.16064C11.9483 9.61344 11.851 10.0239 11.6563 10.3921C11.4616 10.756 11.1993 11.0438 10.8692 11.2554C10.5391 11.4627 10.1688 11.5643 9.75836 11.5601Z",
|
|
@@ -11408,7 +11394,7 @@ import { useMemo as useMemo14 } from "react";
|
|
|
11408
11394
|
|
|
11409
11395
|
// src/providers/FunkitQuoteContext.tsx
|
|
11410
11396
|
import { FlagKey as FlagKey13, isNotNullish as isNotNullish6 } from "@funkit/utils";
|
|
11411
|
-
import
|
|
11397
|
+
import React91, {
|
|
11412
11398
|
createContext as createContext15,
|
|
11413
11399
|
useCallback as useCallback17,
|
|
11414
11400
|
useContext as useContext15,
|
|
@@ -12158,7 +12144,7 @@ function FunkitQuoteProvider({ children }) {
|
|
|
12158
12144
|
setCheckoutQuote: setLatestQuote,
|
|
12159
12145
|
setQuoteProgress
|
|
12160
12146
|
};
|
|
12161
|
-
return /* @__PURE__ */
|
|
12147
|
+
return /* @__PURE__ */ React91.createElement(FunkitQuoteContext.Provider, { value: contextValue }, children);
|
|
12162
12148
|
}
|
|
12163
12149
|
function useQuoteContext() {
|
|
12164
12150
|
return useContext15(FunkitQuoteContext);
|
|
@@ -12206,6 +12192,31 @@ import { createPortal as createPortal2 } from "react-dom";
|
|
|
12206
12192
|
|
|
12207
12193
|
// src/components/FunCheckbox/FunCheckbox.tsx
|
|
12208
12194
|
import React93 from "react";
|
|
12195
|
+
|
|
12196
|
+
// src/components/Icons/CheckIcon.tsx
|
|
12197
|
+
import React92 from "react";
|
|
12198
|
+
var CheckIcon = ({ size = 16 }) => /* @__PURE__ */ React92.createElement(
|
|
12199
|
+
"svg",
|
|
12200
|
+
{
|
|
12201
|
+
width: size,
|
|
12202
|
+
height: size,
|
|
12203
|
+
viewBox: "0 0 16 16",
|
|
12204
|
+
fill: "none",
|
|
12205
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12206
|
+
},
|
|
12207
|
+
/* @__PURE__ */ React92.createElement(
|
|
12208
|
+
"path",
|
|
12209
|
+
{
|
|
12210
|
+
d: "M12.4919 4.88281L6.25757 11.1172L3.50781 8",
|
|
12211
|
+
stroke: "currentColor",
|
|
12212
|
+
strokeWidth: "1.5",
|
|
12213
|
+
strokeLinecap: "round",
|
|
12214
|
+
strokeLinejoin: "round"
|
|
12215
|
+
}
|
|
12216
|
+
)
|
|
12217
|
+
);
|
|
12218
|
+
|
|
12219
|
+
// src/components/FunCheckbox/FunCheckbox.tsx
|
|
12209
12220
|
var FunCheckbox = ({
|
|
12210
12221
|
label,
|
|
12211
12222
|
onChange,
|
|
@@ -14305,6 +14316,7 @@ function renderRelayFee(relayQuote) {
|
|
|
14305
14316
|
const maxSlippage = Number.parseFloat(
|
|
14306
14317
|
details?.slippageTolerance?.destination?.percent || "0"
|
|
14307
14318
|
);
|
|
14319
|
+
const minReceived = Number.parseFloat(details?.currencyOut?.amountUsd || "0") - Number.parseFloat(details?.slippageTolerance?.destination?.usd || "0");
|
|
14308
14320
|
return {
|
|
14309
14321
|
collapsed: {
|
|
14310
14322
|
value: formatCurrencyAndStringify4(gasUsd),
|
|
@@ -14362,12 +14374,12 @@ function renderRelayFee(relayQuote) {
|
|
|
14362
14374
|
},
|
|
14363
14375
|
/* @__PURE__ */ React124.createElement(Text, { size: "10" }, "Fun.xyz fee"),
|
|
14364
14376
|
/* @__PURE__ */ React124.createElement(Text, { size: "10", weight: "medium" }, formatPercent(appFeePercent))
|
|
14365
|
-
))
|
|
14377
|
+
)))
|
|
14366
14378
|
},
|
|
14367
14379
|
{
|
|
14368
14380
|
label: "Max slippage",
|
|
14369
14381
|
value: formatPercent(maxSlippage),
|
|
14370
|
-
tooltipText:
|
|
14382
|
+
tooltipText: `Slippage occurs due to price changes during trade execution. Minimum received: ${formatCurrencyAndStringify4(minReceived)}`
|
|
14371
14383
|
}
|
|
14372
14384
|
]
|
|
14373
14385
|
};
|
|
@@ -16559,7 +16571,7 @@ var useMeldLimit = (fiatCurrency) => {
|
|
|
16559
16571
|
};
|
|
16560
16572
|
var useMeldLimitError = (amount, fiatCurrency) => {
|
|
16561
16573
|
const { data: meldLimit } = useMeldLimit(fiatCurrency);
|
|
16562
|
-
if (!meldLimit) return void 0;
|
|
16574
|
+
if (!meldLimit || amount === void 0) return void 0;
|
|
16563
16575
|
if (amount < meldLimit.minimumAmount) {
|
|
16564
16576
|
const limit = formatCurrencyAndStringify5(
|
|
16565
16577
|
meldLimit.minimumAmount ?? 0,
|
|
@@ -16595,7 +16607,7 @@ var useMeldLimitError = (amount, fiatCurrency) => {
|
|
|
16595
16607
|
|
|
16596
16608
|
// src/modals/CheckoutModal/InputAmount/InputAmountLoaded.tsx
|
|
16597
16609
|
import {
|
|
16598
|
-
FlagKey as
|
|
16610
|
+
FlagKey as FlagKey22,
|
|
16599
16611
|
formatCryptoAndStringify as formatCryptoAndStringify4,
|
|
16600
16612
|
formatCurrencyAndStringify as formatCurrencyAndStringify9,
|
|
16601
16613
|
isTokenEquivalent as isTokenEquivalent6,
|
|
@@ -16753,6 +16765,8 @@ var MeldQuoteItem = ({
|
|
|
16753
16765
|
{},
|
|
16754
16766
|
{ currency: quote.sourceCurrencyCode }
|
|
16755
16767
|
);
|
|
16768
|
+
const customerScore = quote.customerScore;
|
|
16769
|
+
const lowKyc = quote.lowKyc;
|
|
16756
16770
|
return /* @__PURE__ */ React141.createElement(
|
|
16757
16771
|
FunOptionBox,
|
|
16758
16772
|
{
|
|
@@ -16778,7 +16792,9 @@ var MeldQuoteItem = ({
|
|
|
16778
16792
|
MeldProviderLabel,
|
|
16779
16793
|
{
|
|
16780
16794
|
serviceProvider: quote.serviceProvider,
|
|
16781
|
-
isBest: isBestQuote
|
|
16795
|
+
isBest: isBestQuote,
|
|
16796
|
+
shouldBuyMore: customerScore ? customerScore >= 30 : false,
|
|
16797
|
+
hasDocumentUpload: !lowKyc
|
|
16782
16798
|
}
|
|
16783
16799
|
)),
|
|
16784
16800
|
/* @__PURE__ */ React141.createElement(Box, { display: "flex", alignItems: "center", gap: "8" }, /* @__PURE__ */ React141.createElement(
|
|
@@ -16790,7 +16806,7 @@ var MeldQuoteItem = ({
|
|
|
16790
16806
|
gap: "2"
|
|
16791
16807
|
},
|
|
16792
16808
|
/* @__PURE__ */ React141.createElement(Text, { size: "12", weight: "medium" }, cryptoAmount),
|
|
16793
|
-
/* @__PURE__ */ React141.createElement(Text, { color: "secondaryText", size: "10" },
|
|
16809
|
+
/* @__PURE__ */ React141.createElement(Text, { color: "secondaryText", size: "10" }, fiatAmount)
|
|
16794
16810
|
))
|
|
16795
16811
|
);
|
|
16796
16812
|
};
|
|
@@ -16818,7 +16834,7 @@ var SourceMeldQuoteItem = ({
|
|
|
16818
16834
|
onClick,
|
|
16819
16835
|
disabled: disabled || isLoading || !quote
|
|
16820
16836
|
},
|
|
16821
|
-
/* @__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" }, "
|
|
16837
|
+
/* @__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" }, "Auto-picked for you")),
|
|
16822
16838
|
/* @__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(
|
|
16823
16839
|
AsyncImage,
|
|
16824
16840
|
{
|
|
@@ -16840,9 +16856,11 @@ var SourceMeldQuoteItem = ({
|
|
|
16840
16856
|
};
|
|
16841
16857
|
var MeldProviderLabel = ({
|
|
16842
16858
|
serviceProvider,
|
|
16843
|
-
isBest
|
|
16859
|
+
isBest,
|
|
16860
|
+
shouldBuyMore = false,
|
|
16861
|
+
hasDocumentUpload = true
|
|
16844
16862
|
}) => {
|
|
16845
|
-
return /* @__PURE__ */ React142.createElement(Box, { display: "flex", flexDirection: "column", gap: "2" }, /* @__PURE__ */ React142.createElement(Text, { size: "12", weight: "medium", style: { whiteSpace: "nowrap" } }, providerLabelMap[serviceProvider] ?? serviceProvider), isBest && /* @__PURE__ */ React142.createElement(
|
|
16863
|
+
return /* @__PURE__ */ React142.createElement(Box, { display: "flex", flexDirection: "column", gap: "2" }, /* @__PURE__ */ React142.createElement(Text, { size: "12", weight: "medium", style: { whiteSpace: "nowrap" } }, providerLabelMap[serviceProvider] ?? serviceProvider), shouldBuyMore && /* @__PURE__ */ React142.createElement(Text, { color: "secondaryText", size: "10", style: { whiteSpace: "nowrap" } }, "Buy more"), !hasDocumentUpload && /* @__PURE__ */ React142.createElement(Text, { color: "secondaryText", size: "10", style: { whiteSpace: "nowrap" } }, "No document upload"), isBest && /* @__PURE__ */ React142.createElement(
|
|
16846
16864
|
Text,
|
|
16847
16865
|
{
|
|
16848
16866
|
color: "approvedBadgeText",
|
|
@@ -17763,7 +17781,7 @@ var useMeldQuotes = (sourceAmount, fiatCurrency) => {
|
|
|
17763
17781
|
destinationCurrencyCode
|
|
17764
17782
|
],
|
|
17765
17783
|
queryFn: async () => {
|
|
17766
|
-
if (!userIpInfo || !apiKey || !destinationCurrencyCode) {
|
|
17784
|
+
if (!userIpInfo || !apiKey || !destinationCurrencyCode || debouncedSourceAmount === void 0) {
|
|
17767
17785
|
return [];
|
|
17768
17786
|
}
|
|
17769
17787
|
const response = await getMeldQuotes({
|
|
@@ -17780,7 +17798,7 @@ var useMeldQuotes = (sourceAmount, fiatCurrency) => {
|
|
|
17780
17798
|
(a, b) => b.destinationAmount - a.destinationAmount
|
|
17781
17799
|
);
|
|
17782
17800
|
},
|
|
17783
|
-
enabled: !!userIpInfo && !!apiKey && !!destinationCurrencyCode && !isAway && !!fiatCurrency,
|
|
17801
|
+
enabled: !!userIpInfo && !!apiKey && !!destinationCurrencyCode && !isAway && !!fiatCurrency && debouncedSourceAmount !== void 0,
|
|
17784
17802
|
refetchInterval: COUNTDOWN_INTERVAL_SEC * 1e3,
|
|
17785
17803
|
refetchOnWindowFocus: false,
|
|
17786
17804
|
retry: false
|
|
@@ -17791,7 +17809,16 @@ var useMeldQuotes = (sourceAmount, fiatCurrency) => {
|
|
|
17791
17809
|
isHidden: query.isPending,
|
|
17792
17810
|
autoRestart: true
|
|
17793
17811
|
});
|
|
17794
|
-
|
|
17812
|
+
const isOutdated = sourceAmount !== debouncedSourceAmount;
|
|
17813
|
+
return {
|
|
17814
|
+
countdown,
|
|
17815
|
+
query: {
|
|
17816
|
+
...query,
|
|
17817
|
+
error: isOutdated ? null : query.error,
|
|
17818
|
+
isError: query.isError && !isOutdated,
|
|
17819
|
+
isOutdated
|
|
17820
|
+
}
|
|
17821
|
+
};
|
|
17795
17822
|
};
|
|
17796
17823
|
|
|
17797
17824
|
// src/modals/CheckoutModal/InputAmount/InputAmountLayout.tsx
|
|
@@ -17907,18 +17934,26 @@ function deduplicateArray(arr) {
|
|
|
17907
17934
|
return Array.from(new Set(arr));
|
|
17908
17935
|
}
|
|
17909
17936
|
function useFiatAmountOptions(currency) {
|
|
17937
|
+
const isMeldEnabled = useFlag(FlagKey20.EnableMeldPayment);
|
|
17910
17938
|
const currencyQuickOptionStr = useFlag(FlagKey20.MeldQuickOptions);
|
|
17911
17939
|
const currencyQuickOption = safeJSONParse(
|
|
17912
17940
|
currencyQuickOptionStr
|
|
17913
17941
|
);
|
|
17914
17942
|
const { data: meldLimit, isPending } = useMeldLimit(currency);
|
|
17943
|
+
if (!isMeldEnabled) {
|
|
17944
|
+
return deduplicateArray(
|
|
17945
|
+
currencyQuickOption?.USD?.map(
|
|
17946
|
+
(val) => clamp(val, MIN_MOONPAY_AMOUNT_USD, MAX_MOONPAY_AMOUNT_USD)
|
|
17947
|
+
) || []
|
|
17948
|
+
);
|
|
17949
|
+
}
|
|
17915
17950
|
if (isPending || !meldLimit) {
|
|
17916
17951
|
return [];
|
|
17917
17952
|
}
|
|
17918
17953
|
const minimumAmount = meldLimit.minimumAmount;
|
|
17919
17954
|
const maximumAmount = meldLimit.maximumAmount;
|
|
17920
17955
|
return deduplicateArray(
|
|
17921
|
-
currencyQuickOption?.[currency]?.map(
|
|
17956
|
+
currencyQuickOption?.[currency ?? "USD"]?.map(
|
|
17922
17957
|
(val) => clamp(val, minimumAmount, maximumAmount)
|
|
17923
17958
|
) || []
|
|
17924
17959
|
);
|
|
@@ -17967,6 +18002,7 @@ var QuickOptions = ({
|
|
|
17967
18002
|
// src/modals/CheckoutModal/InputAmount/useAmountInput.ts
|
|
17968
18003
|
import { useCallback as useCallback28, useEffect as useEffect27, useReducer as useReducer3 } from "react";
|
|
17969
18004
|
import {
|
|
18005
|
+
FlagKey as FlagKey21,
|
|
17970
18006
|
formatCryptoAndStringify as formatCryptoAndStringify3,
|
|
17971
18007
|
formatCurrencyAndStringify as formatCurrencyAndStringify8
|
|
17972
18008
|
} from "@funkit/utils";
|
|
@@ -17975,7 +18011,7 @@ import {
|
|
|
17975
18011
|
import { round as round2 } from "@funkit/utils";
|
|
17976
18012
|
function getInputValueFromAmount(params) {
|
|
17977
18013
|
const amount = params.isInputInFiat ? params.fiatAmount : params.assetAmount;
|
|
17978
|
-
if (
|
|
18014
|
+
if (amount === void 0) return "";
|
|
17979
18015
|
const formattedAmount = amount.toFixed(
|
|
17980
18016
|
params.isInputInFiat ? USD_DECIMALS : ASSET_DECIMALS
|
|
17981
18017
|
);
|
|
@@ -18018,8 +18054,8 @@ function initializeState({
|
|
|
18018
18054
|
usdMaxAmount ?? Number.MAX_VALUE
|
|
18019
18055
|
);
|
|
18020
18056
|
const rounding = finalFiatAmount === initialFiatAmount ? "round" : finalFiatAmount === usdMinAmount ? "ceil" : "floor";
|
|
18021
|
-
const
|
|
18022
|
-
const
|
|
18057
|
+
const fiatAmount = finalFiatAmount ? round2(finalFiatAmount, USD_DECIMALS, rounding) : void 0;
|
|
18058
|
+
const assetAmount = finalFiatAmount ? targetAssetAmount && finalFiatAmount === targetAssetAmount * unitPrice ? targetAssetAmount : finalFiatAmount / unitPrice : void 0;
|
|
18023
18059
|
const inputValue = getInputValueFromAmount({
|
|
18024
18060
|
assetAmount,
|
|
18025
18061
|
currencySymbol: getCurrencySymbol(fiatCurrency),
|
|
@@ -18055,23 +18091,23 @@ function reduceState(state, action) {
|
|
|
18055
18091
|
const currencySymbol = getCurrencySymbol(state.fiatCurrency);
|
|
18056
18092
|
const regex = state.isInputInFiat ? /\d+(\.\d{0,2})?/ : /\d+(\.\d{0,5})?/;
|
|
18057
18093
|
const match = regex.exec(rawInputValue);
|
|
18058
|
-
const numericInputValue = match?.[0]
|
|
18059
|
-
const newInputValue = numericInputValue && state.isInputInFiat ? `${currencySymbol}${numericInputValue}` : numericInputValue;
|
|
18094
|
+
const numericInputValue = match?.[0];
|
|
18095
|
+
const newInputValue = numericInputValue !== void 0 && state.isInputInFiat ? `${currencySymbol}${numericInputValue}` : numericInputValue;
|
|
18060
18096
|
if (newInputValue === state.inputValue) return state;
|
|
18061
|
-
const newInputAmount = Number.parseFloat(numericInputValue)
|
|
18097
|
+
const newInputAmount = numericInputValue !== void 0 ? Number.parseFloat(numericInputValue) : void 0;
|
|
18062
18098
|
if (state.isInputInFiat) {
|
|
18063
18099
|
return {
|
|
18064
18100
|
...state,
|
|
18065
|
-
assetAmount: newInputAmount / unitPrice
|
|
18066
|
-
inputValue: newInputValue,
|
|
18101
|
+
assetAmount: newInputAmount !== void 0 ? newInputAmount / unitPrice : void 0,
|
|
18102
|
+
inputValue: newInputValue ?? "",
|
|
18067
18103
|
fiatAmount: newInputAmount
|
|
18068
18104
|
};
|
|
18069
18105
|
}
|
|
18070
18106
|
return {
|
|
18071
18107
|
...state,
|
|
18072
18108
|
assetAmount: newInputAmount,
|
|
18073
|
-
inputValue: newInputValue,
|
|
18074
|
-
fiatAmount: round2(newInputAmount * unitPrice, USD_DECIMALS)
|
|
18109
|
+
inputValue: newInputValue ?? "",
|
|
18110
|
+
fiatAmount: newInputAmount !== void 0 ? round2(newInputAmount * unitPrice, USD_DECIMALS) : void 0
|
|
18075
18111
|
};
|
|
18076
18112
|
}
|
|
18077
18113
|
case "setFiatCurrency": {
|
|
@@ -18110,6 +18146,11 @@ function getAmountInputError(state) {
|
|
|
18110
18146
|
type: "noAvailableBalance"
|
|
18111
18147
|
};
|
|
18112
18148
|
}
|
|
18149
|
+
if (fiatAmount === void 0) {
|
|
18150
|
+
return {
|
|
18151
|
+
type: "noInput"
|
|
18152
|
+
};
|
|
18153
|
+
}
|
|
18113
18154
|
if (usdAvailableAmount && fiatAmount > usdAvailableAmount) {
|
|
18114
18155
|
return {
|
|
18115
18156
|
type: "aboveAvailable",
|
|
@@ -18128,11 +18169,6 @@ function getAmountInputError(state) {
|
|
|
18128
18169
|
usdMinAmount
|
|
18129
18170
|
};
|
|
18130
18171
|
}
|
|
18131
|
-
if (fiatAmount === 0) {
|
|
18132
|
-
return {
|
|
18133
|
-
type: "noInput"
|
|
18134
|
-
};
|
|
18135
|
-
}
|
|
18136
18172
|
}
|
|
18137
18173
|
function getDerivedState(state) {
|
|
18138
18174
|
const inputError = getAmountInputError(state);
|
|
@@ -18145,8 +18181,10 @@ function getDerivedState(state) {
|
|
|
18145
18181
|
|
|
18146
18182
|
// src/modals/CheckoutModal/InputAmount/useAmountInput.ts
|
|
18147
18183
|
function useAmountInput(options) {
|
|
18184
|
+
const isMeldEnabled = useFlag(FlagKey21.EnableMeldPayment);
|
|
18148
18185
|
const [state, dispatch] = useReducer3(reduceState, options, initializeState);
|
|
18149
18186
|
const isCardCheckout = options.paymentMethod === "card" /* CARD */;
|
|
18187
|
+
const isMeldFlow = isCardCheckout && isMeldEnabled;
|
|
18150
18188
|
const {
|
|
18151
18189
|
unitPrice: realUnitPrice,
|
|
18152
18190
|
checkoutConfig,
|
|
@@ -18171,7 +18209,7 @@ function useAmountInput(options) {
|
|
|
18171
18209
|
},
|
|
18172
18210
|
[unitPrice]
|
|
18173
18211
|
);
|
|
18174
|
-
const defaultAmount =
|
|
18212
|
+
const defaultAmount = isMeldFlow ? getDefaultAmountFromQuickOptions(quickOptions) : void 0;
|
|
18175
18213
|
useEffect27(() => {
|
|
18176
18214
|
if (state.fiatCurrency !== fiatCurrency) {
|
|
18177
18215
|
dispatch({
|
|
@@ -18218,20 +18256,44 @@ function useAmountInput(options) {
|
|
|
18218
18256
|
{ currency: fiatCurrency, currencyDisplay: "narrowSymbol" }
|
|
18219
18257
|
) : formatCryptoAndStringify3(0),
|
|
18220
18258
|
setFiatAmount,
|
|
18221
|
-
|
|
18259
|
+
// Meld flow does not support update amount suggestions
|
|
18260
|
+
suggestion: isMeldFlow ? void 0 : getInputAmountSuggestion(derivedState.inputError),
|
|
18222
18261
|
toggleInputInFiat
|
|
18223
18262
|
};
|
|
18224
18263
|
}
|
|
18225
18264
|
|
|
18226
18265
|
// src/modals/CheckoutModal/InputAmount/InputAmountLoaded.tsx
|
|
18266
|
+
function autoPickBestQuote(quotes) {
|
|
18267
|
+
const quotesSortedByScore = quotes.sort(
|
|
18268
|
+
(a, b) => (b.customerScore ?? 0) - (a.customerScore ?? 0)
|
|
18269
|
+
);
|
|
18270
|
+
if (quotesSortedByScore[0].customerScore && quotesSortedByScore[0].customerScore >= 30) {
|
|
18271
|
+
return quotesSortedByScore[0];
|
|
18272
|
+
}
|
|
18273
|
+
const quotesSortedByDestinationAmount = quotes.sort(
|
|
18274
|
+
(a, b) => (b.destinationAmount ?? 0) - (a.destinationAmount ?? 0)
|
|
18275
|
+
);
|
|
18276
|
+
return quotesSortedByDestinationAmount[0];
|
|
18277
|
+
}
|
|
18278
|
+
function isBestPriceQuote(quotes, quote) {
|
|
18279
|
+
if (!quotes || quotes.length === 0 || !quote) {
|
|
18280
|
+
return false;
|
|
18281
|
+
}
|
|
18282
|
+
for (const q of quotes) {
|
|
18283
|
+
if (q.destinationAmount > quote.destinationAmount) {
|
|
18284
|
+
return false;
|
|
18285
|
+
}
|
|
18286
|
+
}
|
|
18287
|
+
return true;
|
|
18288
|
+
}
|
|
18227
18289
|
function useMeld(manuallySelectedQuote, usdAmount, fiatCurrency) {
|
|
18228
18290
|
const { query: meldQuotesQuery } = useMeldQuotes(usdAmount, fiatCurrency);
|
|
18229
18291
|
const { mutateAsync, isPending: isMeldLinkPending } = useMeldLink(
|
|
18230
|
-
usdAmount,
|
|
18292
|
+
usdAmount ?? 0,
|
|
18231
18293
|
fiatCurrency
|
|
18232
18294
|
);
|
|
18233
18295
|
const meldLimitError = useMeldLimitError(usdAmount, fiatCurrency);
|
|
18234
|
-
const bestRateQuote = meldQuotesQuery.data
|
|
18296
|
+
const bestRateQuote = meldQuotesQuery.data ? autoPickBestQuote(meldQuotesQuery.data) : void 0;
|
|
18235
18297
|
const selectedQuote = manuallySelectedQuote ?? bestRateQuote;
|
|
18236
18298
|
const isSelectedQuoteUnavailable = manuallySelectedQuote && !meldQuotesQuery.isPending && !meldQuotesQuery.data?.find(
|
|
18237
18299
|
(quote) => quote.serviceProvider === selectedQuote?.serviceProvider
|
|
@@ -18252,15 +18314,15 @@ function InputAmountLoaded({
|
|
|
18252
18314
|
onNext,
|
|
18253
18315
|
sourceHolding,
|
|
18254
18316
|
unitPrice,
|
|
18255
|
-
defaultFiatCurrency
|
|
18317
|
+
defaultFiatCurrency,
|
|
18256
18318
|
textCustomizations
|
|
18257
18319
|
}) {
|
|
18258
|
-
const maxCheckoutUsdString = useFlag(
|
|
18320
|
+
const maxCheckoutUsdString = useFlag(FlagKey22.MaxCheckoutUsd);
|
|
18259
18321
|
const { apiKey } = useFunkitConfig();
|
|
18260
18322
|
const { paymentMethod } = modalState.paymentMethodInfo;
|
|
18261
18323
|
const { quote: manuallySelectedQuote } = modalState;
|
|
18262
18324
|
const isCardCheckout = paymentMethod === "card" /* CARD */;
|
|
18263
|
-
const meldEnabled = useFlag(
|
|
18325
|
+
const meldEnabled = useFlag(FlagKey22.EnableMeldPayment) && isCardCheckout;
|
|
18264
18326
|
const { targetAssetTicker, targetAssetMinAmount } = checkoutConfig;
|
|
18265
18327
|
const { updateTargetAssetAmount } = useCheckoutContext();
|
|
18266
18328
|
const minUsd = targetAssetMinAmount && unitPrice ? Math.ceil(targetAssetMinAmount * unitPrice * 100) / 100 : void 0;
|
|
@@ -18342,8 +18404,12 @@ function InputAmountLoaded({
|
|
|
18342
18404
|
resetText();
|
|
18343
18405
|
};
|
|
18344
18406
|
const handleContinue = async (assetAmount2) => {
|
|
18407
|
+
if (assetAmount2 === void 0) return;
|
|
18345
18408
|
updateTargetAssetAmount(assetAmount2);
|
|
18346
|
-
if (!meldEnabled)
|
|
18409
|
+
if (!meldEnabled) {
|
|
18410
|
+
onNext({});
|
|
18411
|
+
return;
|
|
18412
|
+
}
|
|
18347
18413
|
if (selectedQuote) {
|
|
18348
18414
|
const result = await mutateAsync(selectedQuote.serviceProvider);
|
|
18349
18415
|
window.open(result.widgetUrl, "_blank", "noopener,noreferrer");
|
|
@@ -18362,10 +18428,10 @@ function InputAmountLoaded({
|
|
|
18362
18428
|
handleSubmit();
|
|
18363
18429
|
};
|
|
18364
18430
|
const displayAssetAmount = round3(
|
|
18365
|
-
isStablecoin(targetAssetTicker) ? fiatAmount : assetAmount,
|
|
18431
|
+
(isStablecoin(targetAssetTicker) ? fiatAmount : assetAmount) ?? 0,
|
|
18366
18432
|
ASSET_DECIMALS
|
|
18367
18433
|
);
|
|
18368
|
-
const isConvertedAmountShown = targetAssetTicker && (!isInputInFiat ||
|
|
18434
|
+
const isConvertedAmountShown = targetAssetTicker && (!isInputInFiat || meldEnabled && fiatCurrency === "USD" || !meldEnabled);
|
|
18369
18435
|
const isMeldContinueDisabled = meldEnabled && (!!meldLimitError || isMeldLinkPending || !!meldQuotesQuery.error || meldQuotesQuery.isFetching || isSelectedQuoteUnavailable);
|
|
18370
18436
|
return /* @__PURE__ */ React150.createElement(
|
|
18371
18437
|
InputAmountLayout,
|
|
@@ -18445,18 +18511,18 @@ function InputAmountLoaded({
|
|
|
18445
18511
|
/* @__PURE__ */ React150.createElement(
|
|
18446
18512
|
FunIconButton,
|
|
18447
18513
|
{
|
|
18448
|
-
icon: !
|
|
18514
|
+
icon: !meldEnabled && /* @__PURE__ */ React150.createElement(SwitchIcon, null),
|
|
18449
18515
|
paddingY: "1",
|
|
18450
18516
|
paddingX: "6",
|
|
18451
18517
|
color: { base: "actionColor", hover: "actionColorHover" },
|
|
18452
18518
|
onClick: handleIsAmountInAbsoluteToggle,
|
|
18453
18519
|
borderRadius: "inputAmountSwitcher",
|
|
18454
|
-
isDisabled:
|
|
18520
|
+
isDisabled: meldEnabled
|
|
18455
18521
|
},
|
|
18456
18522
|
/* @__PURE__ */ React150.createElement(Text, { color: "secondaryText", size: "14" }, isInputInFiat ? formatCryptoAndStringify4(
|
|
18457
18523
|
displayAssetAmount,
|
|
18458
18524
|
targetAssetTicker
|
|
18459
|
-
) : formatCurrencyAndStringify9(fiatAmount))
|
|
18525
|
+
) : formatCurrencyAndStringify9(fiatAmount ?? 0))
|
|
18460
18526
|
)
|
|
18461
18527
|
),
|
|
18462
18528
|
amountOptions: (!!usdAvailableAmount || isCardCheckout) && /* @__PURE__ */ React150.createElement(
|
|
@@ -18481,8 +18547,11 @@ function InputAmountLoaded({
|
|
|
18481
18547
|
nextStep: "meld_quotes" /* MELD_QUOTES */
|
|
18482
18548
|
}),
|
|
18483
18549
|
quote: selectedQuote,
|
|
18484
|
-
isLoading: meldQuotesQuery.
|
|
18485
|
-
isBestQuote:
|
|
18550
|
+
isLoading: meldQuotesQuery.isFetching,
|
|
18551
|
+
isBestQuote: isBestPriceQuote(
|
|
18552
|
+
meldQuotesQuery.data,
|
|
18553
|
+
selectedQuote
|
|
18554
|
+
),
|
|
18486
18555
|
disabled: !meldQuotesQuery.data || meldQuotesQuery.data.length === 0,
|
|
18487
18556
|
isPreselected: !manuallySelectedQuote && !!bestRateQuote,
|
|
18488
18557
|
error: meldLimitError?.issue
|
|
@@ -18543,7 +18612,7 @@ function YouPayYouReceiveWrapper({
|
|
|
18543
18612
|
}
|
|
18544
18613
|
|
|
18545
18614
|
// src/modals/CheckoutModal/InputAmount/InputAmountLoading.tsx
|
|
18546
|
-
import { FlagKey as
|
|
18615
|
+
import { FlagKey as FlagKey23, formatCryptoAndStringify as formatCryptoAndStringify5 } from "@funkit/utils";
|
|
18547
18616
|
import React151, { useMemo as useMemo23 } from "react";
|
|
18548
18617
|
function InputAmountLoading({
|
|
18549
18618
|
modalState,
|
|
@@ -18554,7 +18623,7 @@ function InputAmountLoading({
|
|
|
18554
18623
|
const { paymentMethodInfo } = modalState;
|
|
18555
18624
|
const { checkoutItem } = useCheckoutContext();
|
|
18556
18625
|
const { unlinkBrokerage } = useFunkitMesh();
|
|
18557
|
-
const meldEnabled = useFlag(
|
|
18626
|
+
const meldEnabled = useFlag(FlagKey23.EnableMeldPayment);
|
|
18558
18627
|
const targetAssetAmount = checkoutItem?.initSettings.config.targetAssetAmount;
|
|
18559
18628
|
const targetAssetTicker = checkoutItem?.initSettings.config.targetAssetTicker;
|
|
18560
18629
|
const error = useMemo23(() => {
|
|
@@ -18855,7 +18924,7 @@ function InputAmount(props) {
|
|
|
18855
18924
|
import React155, { useEffect as useEffect29 } from "react";
|
|
18856
18925
|
|
|
18857
18926
|
// src/hooks/usePaymentSources.ts
|
|
18858
|
-
import { FlagKey as
|
|
18927
|
+
import { FlagKey as FlagKey24, isNotNullish as isNotNullish8 } from "@funkit/utils";
|
|
18859
18928
|
function useRemainingMeshExchangeConnections(selected) {
|
|
18860
18929
|
const { getActiveConnection } = useFunkitMesh();
|
|
18861
18930
|
const supportedExchanges = useSupportedExchanges();
|
|
@@ -18884,10 +18953,10 @@ function usePaymentMethodEnablement({
|
|
|
18884
18953
|
checkoutConfig
|
|
18885
18954
|
}) {
|
|
18886
18955
|
const { apiKey, uiCustomizations } = useFunkitConfig();
|
|
18887
|
-
const isTokenTransferFlagEnabled = useFlag(
|
|
18956
|
+
const isTokenTransferFlagEnabled = useFlag(FlagKey24.EnableTokenTransfer);
|
|
18888
18957
|
const isFiatFlagEnabled = useFiatEnabled();
|
|
18889
|
-
const isCardFlagEnabled = useFlag(
|
|
18890
|
-
const isBrokerageFlagEnabled = useFlag(
|
|
18958
|
+
const isCardFlagEnabled = useFlag(FlagKey24.EnableCard);
|
|
18959
|
+
const isBrokerageFlagEnabled = useFlag(FlagKey24.EnableBrokerage);
|
|
18891
18960
|
const isKatanaEarnFlowAction = isKatanaEarnFlow({ apiKey, checkoutConfig });
|
|
18892
18961
|
const isUsKatanaUser = useIsUsKatanaUser();
|
|
18893
18962
|
const isFiatEnabled = isFiatFlagEnabled && !isKatanaEarnFlowAction;
|
|
@@ -18938,10 +19007,10 @@ var usePaymentSources = (paymentMethodInfo, targetChainId, checkoutConfig) => {
|
|
|
18938
19007
|
const isBankInNewSources = !matchingFiatAccount && isUserLoggedIn && isFiatEnabled;
|
|
18939
19008
|
const newSources = [
|
|
18940
19009
|
isTokenInNewSources && "token_transfer" /* TOKEN_TRANSFER */,
|
|
19010
|
+
!fallback2.includes("card" /* CARD */) && isCardEnabled && "card" /* CARD */,
|
|
18941
19011
|
isBrokerageEnabled && "brokerage" /* BROKERAGE */,
|
|
18942
19012
|
isBankInNewSources && "virtual_bank" /* VIRTUAL_BANK */,
|
|
18943
|
-
isWalletInNewSources && "balance" /* ACCOUNT_BALANCE
|
|
18944
|
-
!fallback2.includes("card" /* CARD */) && isCardEnabled && "card" /* CARD */
|
|
19013
|
+
isWalletInNewSources && "balance" /* ACCOUNT_BALANCE */
|
|
18945
19014
|
].filter((b) => !!b);
|
|
18946
19015
|
return {
|
|
18947
19016
|
preferred: connected.length > 0 ? connected : fallback2,
|
|
@@ -19549,7 +19618,7 @@ import {
|
|
|
19549
19618
|
meshExecuteTransfer,
|
|
19550
19619
|
meshExecuteTransferProxy
|
|
19551
19620
|
} from "@funkit/api-base";
|
|
19552
|
-
import { ClientError as ClientError4, FlagKey as
|
|
19621
|
+
import { ClientError as ClientError4, FlagKey as FlagKey25, formatAddress as formatAddress4 } from "@funkit/utils";
|
|
19553
19622
|
import React172, { useMemo as useMemo26, useState as useState38 } from "react";
|
|
19554
19623
|
import { createPortal as createPortal9 } from "react-dom";
|
|
19555
19624
|
|
|
@@ -20047,7 +20116,7 @@ function MeshVerification({
|
|
|
20047
20116
|
const executionStatus = executionContent?.status;
|
|
20048
20117
|
const { checkoutItem } = useCheckoutContext();
|
|
20049
20118
|
const bottomSectionRef = useBottomSectionRef();
|
|
20050
|
-
const enableFrogProxyServer = useFlag(
|
|
20119
|
+
const enableFrogProxyServer = useFlag(FlagKey25.EnableFrogProxyServer);
|
|
20051
20120
|
const handleCompletion = useEffectEvent(async (finalOtpInput) => {
|
|
20052
20121
|
try {
|
|
20053
20122
|
setIsExecuting(true);
|
|
@@ -21075,13 +21144,13 @@ var ReceiveTokenDropdown = ({
|
|
|
21075
21144
|
|
|
21076
21145
|
// src/components/NewTokenDepositAlert/NewTokenDepositAlert.tsx
|
|
21077
21146
|
import React182 from "react";
|
|
21078
|
-
import { FlagKey as
|
|
21147
|
+
import { FlagKey as FlagKey26, safeParseJson as safeParseJson4 } from "@funkit/utils";
|
|
21079
21148
|
var NewTokenDepositAlert = ({
|
|
21080
21149
|
onClick
|
|
21081
21150
|
}) => {
|
|
21082
|
-
const alertJson = useFlag(
|
|
21151
|
+
const alertJson = useFlag(FlagKey26.NewTokenAssetSelectionBanner);
|
|
21083
21152
|
const alertData = safeParseJson4(alertJson);
|
|
21084
|
-
const isTokenTransferEnabled = useFlag(
|
|
21153
|
+
const isTokenTransferEnabled = useFlag(FlagKey26.EnableTokenTransfer);
|
|
21085
21154
|
if (!alertData || !isTokenTransferEnabled) return null;
|
|
21086
21155
|
return /* @__PURE__ */ React182.createElement(
|
|
21087
21156
|
FunAlert,
|
|
@@ -21562,7 +21631,7 @@ function SelectMeshAsset({
|
|
|
21562
21631
|
)) : null;
|
|
21563
21632
|
const accountHoldings = data ?? {};
|
|
21564
21633
|
const totalBalance = getTotalAssetBalance(accountHoldings);
|
|
21565
|
-
return /* @__PURE__ */ React183.createElement(React183.Fragment, null, /* @__PURE__ */ React183.createElement(Box, { display: "flex", gap: "8", flexDirection: "column" }, /* @__PURE__ */ React183.createElement(
|
|
21634
|
+
return /* @__PURE__ */ React183.createElement(React183.Fragment, null, isOstiumCustomer(apiKey) ? /* @__PURE__ */ React183.createElement(NewTokenDepositAlert, { onClick: onTokenTransfer }) : /* @__PURE__ */ React183.createElement(Box, { display: "flex", gap: "8", flexDirection: "column" }, /* @__PURE__ */ React183.createElement(
|
|
21566
21635
|
SourcePaymentMethodItem,
|
|
21567
21636
|
{
|
|
21568
21637
|
type: paymentMethodInfo.paymentMethod,
|
|
@@ -21738,7 +21807,7 @@ function SelectBrokerage({
|
|
|
21738
21807
|
|
|
21739
21808
|
// src/modals/CheckoutModal/SourceChange/SourceChange.tsx
|
|
21740
21809
|
import { BridgeCustomerStatus as BridgeCustomerStatus6 } from "@funkit/api-base";
|
|
21741
|
-
import { FlagKey as
|
|
21810
|
+
import { FlagKey as FlagKey27 } from "@funkit/utils";
|
|
21742
21811
|
import React186, { useEffect as useEffect36, useState as useState45 } from "react";
|
|
21743
21812
|
import { createPortal as createPortal12 } from "react-dom";
|
|
21744
21813
|
|
|
@@ -21907,6 +21976,7 @@ var ConnectedSource = ({
|
|
|
21907
21976
|
onSelect,
|
|
21908
21977
|
onBrokerageError
|
|
21909
21978
|
}) => {
|
|
21979
|
+
const { apiKey } = useFunkitConfig();
|
|
21910
21980
|
if (paymentInfo.paymentMethod === "balance" /* ACCOUNT_BALANCE */) {
|
|
21911
21981
|
const isSelected2 = selectedPaymentInfo?.paymentMethod === "balance" /* ACCOUNT_BALANCE */;
|
|
21912
21982
|
return /* @__PURE__ */ React186.createElement(
|
|
@@ -21914,7 +21984,7 @@ var ConnectedSource = ({
|
|
|
21914
21984
|
{
|
|
21915
21985
|
isActive: isSelected2,
|
|
21916
21986
|
onClick: onSelect,
|
|
21917
|
-
customValueIcon: isSelected2 ? /* @__PURE__ */ React186.createElement(CheckIcon, null) : null,
|
|
21987
|
+
customValueIcon: isSelected2 && !isOstiumCustomer(apiKey) ? /* @__PURE__ */ React186.createElement(CheckIcon, null) : null,
|
|
21918
21988
|
targetChainId
|
|
21919
21989
|
}
|
|
21920
21990
|
);
|
|
@@ -21935,8 +22005,9 @@ var ConnectedSource = ({
|
|
|
21935
22005
|
ConnectedMeshPaymentMethodItem,
|
|
21936
22006
|
{
|
|
21937
22007
|
paymentMethodInfo: paymentInfo,
|
|
21938
|
-
isSelected,
|
|
22008
|
+
isActive: isSelected,
|
|
21939
22009
|
onSelect,
|
|
22010
|
+
customValueIcon: isSelected && !isOstiumCustomer(apiKey) ? /* @__PURE__ */ React186.createElement(CheckIcon, null) : null,
|
|
21940
22011
|
onBrokerageError,
|
|
21941
22012
|
targetChainId
|
|
21942
22013
|
}
|
|
@@ -21955,7 +22026,7 @@ function SourceChange({
|
|
|
21955
22026
|
const { data: fiatAccounts } = useVirtualFiatAccounts();
|
|
21956
22027
|
const matchingFiatAccount = useMatchingVirtualFiatAccount(fiatAccounts);
|
|
21957
22028
|
const { apiKey, textCustomizations } = useFunkitConfig();
|
|
21958
|
-
const enableMeldPayment = useFlag(
|
|
22029
|
+
const enableMeldPayment = useFlag(FlagKey27.EnableMeldPayment);
|
|
21959
22030
|
const hasAutoContinue = !isOstiumCustomer(apiKey);
|
|
21960
22031
|
useEffect36(() => {
|
|
21961
22032
|
if (!paymentMethodInfo) return;
|
|
@@ -22127,7 +22198,7 @@ function SourceChange({
|
|
|
22127
22198
|
}
|
|
22128
22199
|
|
|
22129
22200
|
// src/modals/CheckoutModal/TransferToken/TransferToken.tsx
|
|
22130
|
-
import { FlagKey as
|
|
22201
|
+
import { FlagKey as FlagKey30 } from "@funkit/utils";
|
|
22131
22202
|
import { motion as motion8, useAnimationControls as useAnimationControls3 } from "motion/react";
|
|
22132
22203
|
import React200, { useEffect as useEffect37, useRef as useRef15, useState as useState48 } from "react";
|
|
22133
22204
|
import { createPortal as createPortal13 } from "react-dom";
|
|
@@ -22189,13 +22260,13 @@ function CopyInputDisplayedAddress({
|
|
|
22189
22260
|
}
|
|
22190
22261
|
|
|
22191
22262
|
// src/components/Dropdown/TokenDropdown.tsx
|
|
22192
|
-
import { FlagKey as
|
|
22263
|
+
import { FlagKey as FlagKey28, safeParseJson as safeParseJson5 } from "@funkit/utils";
|
|
22193
22264
|
import React189, { useState as useState46 } from "react";
|
|
22194
22265
|
var TOKEN_ICON_SIZE2 = 16;
|
|
22195
22266
|
var useNewTokens = () => {
|
|
22196
|
-
const bannerJson = useFlag(
|
|
22267
|
+
const bannerJson = useFlag(FlagKey28.NewTokenAssetSelectionBanner);
|
|
22197
22268
|
const bannerData = safeParseJson5(bannerJson);
|
|
22198
|
-
const newBadgeTokensJson = useFlag(
|
|
22269
|
+
const newBadgeTokensJson = useFlag(FlagKey28.TokenTransferNewTokens);
|
|
22199
22270
|
const newBadgeData = safeParseJson5(newBadgeTokensJson);
|
|
22200
22271
|
const newTokens = newBadgeData && Object.values(newBadgeData).flat();
|
|
22201
22272
|
const newUniqueTokens = new Set(newTokens);
|
|
@@ -22886,12 +22957,12 @@ var TransferTokenDetails = ({
|
|
|
22886
22957
|
|
|
22887
22958
|
// src/hooks/useTokenTransfer.ts
|
|
22888
22959
|
import { solanaChain as solanaChain2 } from "@funkit/chains";
|
|
22889
|
-
import { FlagKey as
|
|
22960
|
+
import { FlagKey as FlagKey29 } from "@funkit/utils";
|
|
22890
22961
|
import { mainnet as mainnet8, polygon as polygon5 } from "viem/chains";
|
|
22891
22962
|
var useTokenTransfer = (selectedChainId, selectedToken) => {
|
|
22892
22963
|
const { checkoutItem } = useCheckoutContext();
|
|
22893
22964
|
const enableUniversal = useFlag(
|
|
22894
|
-
|
|
22965
|
+
FlagKey29.EnableTokenTransferUniversalDepositAddress,
|
|
22895
22966
|
false
|
|
22896
22967
|
);
|
|
22897
22968
|
const estPriceImpact = usePriceImpactEstimation(selectedToken);
|
|
@@ -22922,7 +22993,7 @@ var useTokenTransfer = (selectedChainId, selectedToken) => {
|
|
|
22922
22993
|
};
|
|
22923
22994
|
};
|
|
22924
22995
|
var useMinTransferValue = (selectedChainId) => {
|
|
22925
|
-
const minTransferValueJsonString = useFlag(
|
|
22996
|
+
const minTransferValueJsonString = useFlag(FlagKey29.MinTokenTransferValue);
|
|
22926
22997
|
const minTransferValue = safeJSONParse(
|
|
22927
22998
|
minTransferValueJsonString
|
|
22928
22999
|
);
|
|
@@ -22956,7 +23027,7 @@ var getMaxSlippage = (sourceToken, targetToken, isSameChain) => {
|
|
|
22956
23027
|
// src/modals/CheckoutModal/TransferToken/TransferToken.tsx
|
|
22957
23028
|
var TransferTokenInfo = {
|
|
22958
23029
|
Component: TransferToken,
|
|
22959
|
-
disableBack: () =>
|
|
23030
|
+
disableBack: ({ apiKey }) => !isOstiumCustomer(apiKey),
|
|
22960
23031
|
onNext: (state) => {
|
|
22961
23032
|
const common = extractCommonState(state);
|
|
22962
23033
|
return {
|
|
@@ -22975,14 +23046,14 @@ function TransferToken({
|
|
|
22975
23046
|
const defaultValues = modalState.transferToken;
|
|
22976
23047
|
const controls = useAnimationControls3();
|
|
22977
23048
|
const [qrCodeHover, setQrCodeHover] = useState48(false);
|
|
22978
|
-
const { textCustomizations } = useFunkitConfig();
|
|
23049
|
+
const { textCustomizations, apiKey } = useFunkitConfig();
|
|
22979
23050
|
const { checkoutItem } = useCheckoutContext();
|
|
22980
23051
|
const checkoutConfig = checkoutItem?.initSettings.config;
|
|
22981
23052
|
const { transferInit } = useCheckoutTransferInit(checkoutConfig);
|
|
22982
23053
|
const filteredAssets = useEnabledTokenTransferChainTokens(
|
|
22983
23054
|
transferInit ?? null
|
|
22984
23055
|
);
|
|
22985
|
-
const defaultChainIdFlag = useFlag(
|
|
23056
|
+
const defaultChainIdFlag = useFlag(FlagKey30.TokenTransferDefaultChainId);
|
|
22986
23057
|
const defaultChainId = defaultValues?.chainId ?? Number(defaultChainIdFlag);
|
|
22987
23058
|
const validDefaultChainId = filteredAssets[defaultChainId] !== void 0 ? defaultChainId : polygon6.id;
|
|
22988
23059
|
const [selectedChainId, setSelectedChainId] = useState48(validDefaultChainId);
|
|
@@ -23028,7 +23099,7 @@ function TransferToken({
|
|
|
23028
23099
|
justifyContent: "center",
|
|
23029
23100
|
gap: "18"
|
|
23030
23101
|
},
|
|
23031
|
-
/* @__PURE__ */ React200.createElement(Box, { display: "flex", flexDirection: "column", width: "full" }, /* @__PURE__ */ React200.createElement(
|
|
23102
|
+
!isOstiumCustomer(apiKey) && /* @__PURE__ */ React200.createElement(Box, { display: "flex", flexDirection: "column", width: "full" }, /* @__PURE__ */ React200.createElement(
|
|
23032
23103
|
SourcePaymentMethodItem,
|
|
23033
23104
|
{
|
|
23034
23105
|
type: "token_transfer" /* TOKEN_TRANSFER */,
|
|
@@ -23426,7 +23497,7 @@ var AccountDetailsScreen = ({
|
|
|
23426
23497
|
const { paymentMethodInfo } = modalState;
|
|
23427
23498
|
const { matchingFiatAccount } = paymentMethodInfo;
|
|
23428
23499
|
const label = usePaymentMethodInfoLabel(paymentMethodInfo);
|
|
23429
|
-
const { appName } = useFunkitConfig();
|
|
23500
|
+
const { appName, apiKey } = useFunkitConfig();
|
|
23430
23501
|
const { animation, animate } = useAnimatedNavigation(void 0);
|
|
23431
23502
|
const [activeTab, setActiveTab] = useState49(0);
|
|
23432
23503
|
const [detailsExpanded, setDetailsExpanded] = useState49(false);
|
|
@@ -23442,7 +23513,7 @@ var AccountDetailsScreen = ({
|
|
|
23442
23513
|
flexDirection: "column",
|
|
23443
23514
|
gap: "16"
|
|
23444
23515
|
},
|
|
23445
|
-
/* @__PURE__ */ React204.createElement(
|
|
23516
|
+
!isOstiumCustomer(apiKey) && /* @__PURE__ */ React204.createElement(
|
|
23446
23517
|
SourcePaymentMethodItem,
|
|
23447
23518
|
{
|
|
23448
23519
|
onClick: () => onNext({}),
|
|
@@ -27128,16 +27199,16 @@ function ChainModal({ onClose, open }) {
|
|
|
27128
27199
|
// src/modals/CheckoutModal/FunCheckoutModal.tsx
|
|
27129
27200
|
import { FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST as FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST3 } from "@funkit/chains";
|
|
27130
27201
|
import { LogLevel, initializeRelayClient } from "@funkit/fun-relay";
|
|
27131
|
-
import { FlagKey as
|
|
27202
|
+
import { FlagKey as FlagKey33 } from "@funkit/utils";
|
|
27132
27203
|
import React253, { useRef as useRef24 } from "react";
|
|
27133
27204
|
|
|
27134
27205
|
// src/components/DydxSwitchModalTab/DydxSwitchModalTab.tsx
|
|
27135
27206
|
import React245, { useCallback as useCallback44 } from "react";
|
|
27136
27207
|
|
|
27137
27208
|
// src/hooks/useFunkitMaxCheckoutUsdInfo.ts
|
|
27138
|
-
import { FlagKey as
|
|
27209
|
+
import { FlagKey as FlagKey31, formatCurrencyAndStringify as formatCurrencyAndStringify15 } from "@funkit/utils";
|
|
27139
27210
|
var useFunkitMaxCheckoutUsdInfo = () => {
|
|
27140
|
-
const maxCheckoutUsd = Number(useFlag(
|
|
27211
|
+
const maxCheckoutUsd = Number(useFlag(FlagKey31.MaxCheckoutUsd));
|
|
27141
27212
|
const limitText = maxCheckoutUsd === Number.MAX_VALUE ? "no" : formatCurrencyAndStringify15(maxCheckoutUsd, {
|
|
27142
27213
|
decimalPrecisionForSuffix: 0,
|
|
27143
27214
|
minimumSignificantDigits: 0,
|
|
@@ -27325,13 +27396,13 @@ var FunNotificationShowMoreButton = ({
|
|
|
27325
27396
|
import {
|
|
27326
27397
|
getCheckoutsByUserId as getCheckoutsByUserId2
|
|
27327
27398
|
} from "@funkit/api-base";
|
|
27328
|
-
import { FlagKey as
|
|
27399
|
+
import { FlagKey as FlagKey32 } from "@funkit/utils";
|
|
27329
27400
|
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
27330
27401
|
var hasCorrectPaymentMethod = (checkout, paymentMethod) => !paymentMethod || checkout.clientMetadata.selectedPaymentMethodInfo?.paymentMethod === paymentMethod;
|
|
27331
27402
|
var isRecent = (checkout, timestampCutoff) => checkout.createdTimeMs > timestampCutoff;
|
|
27332
27403
|
var DEFAULT_NOTIF_CUTOFF = 7 * 24 * 60 * 60 * 1e3;
|
|
27333
27404
|
function useCheckoutRefreshInterval() {
|
|
27334
|
-
const str = useFlag(
|
|
27405
|
+
const str = useFlag(FlagKey32.CheckoutNotificationsRefreshInterval);
|
|
27335
27406
|
return safeJSONParse(str) || { listRefresh: 50 * 1e3, itemRefresh: 5 * 1e3 };
|
|
27336
27407
|
}
|
|
27337
27408
|
var useRecentCheckouts = ({
|
|
@@ -28462,7 +28533,7 @@ function FunCheckoutModalInner({
|
|
|
28462
28533
|
const hasBack = hasHistoryEntry && !disableBack;
|
|
28463
28534
|
const checkoutConfig = checkoutItem.initSettings.config;
|
|
28464
28535
|
const showDydxSwitch = !hasBack && modalState.step !== "checkout_complete" /* CHECKOUT_COMPLETE */;
|
|
28465
|
-
const helpButtonUrl = useFlag(
|
|
28536
|
+
const helpButtonUrl = useFlag(FlagKey33.HelpTutorialUrl);
|
|
28466
28537
|
const { onScroll, topbar, withTopDivider } = useCustomStatusAnimationAboveTopbar({
|
|
28467
28538
|
depositAddress: checkoutItem.depositAddress ?? void 0,
|
|
28468
28539
|
isCheckoutDetailView: modalState.step === "checkout_complete" /* CHECKOUT_COMPLETE */,
|
|
@@ -30296,9 +30367,9 @@ function cssStringFromTheme(theme, options = {}) {
|
|
|
30296
30367
|
}
|
|
30297
30368
|
|
|
30298
30369
|
// src/hooks/useIsFunkitCheckoutActivated.ts
|
|
30299
|
-
import { FlagKey as
|
|
30370
|
+
import { FlagKey as FlagKey34 } from "@funkit/utils";
|
|
30300
30371
|
var useIsFunkitCheckoutActivated = () => {
|
|
30301
|
-
const isCheckoutActivated = useFlag(
|
|
30372
|
+
const isCheckoutActivated = useFlag(FlagKey34.IsCheckoutActivated);
|
|
30302
30373
|
return {
|
|
30303
30374
|
isActivated: isCheckoutActivated
|
|
30304
30375
|
};
|
|
@@ -30403,7 +30474,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
30403
30474
|
localStorage.setItem(storageKey5, version);
|
|
30404
30475
|
}
|
|
30405
30476
|
function getCurrentSdkVersion() {
|
|
30406
|
-
return "5.5.
|
|
30477
|
+
return "5.5.11";
|
|
30407
30478
|
}
|
|
30408
30479
|
function useFingerprint() {
|
|
30409
30480
|
const fingerprint = useCallback49(() => {
|