@funkit/connect 6.0.6 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
  3. package/dist/index.css +4 -4
  4. package/dist/index.js +175 -116
  5. package/dist/providers/FunkitConfigContext.d.ts +5 -0
  6. package/dist/utils/checkout.d.ts +1 -1
  7. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  8. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  9. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  10. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  11. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  12. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  13. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  14. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  15. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  16. package/dist/wallets/walletConnectors/index.js +72 -72
  17. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  18. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  19. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  20. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  21. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  22. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  23. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  24. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  25. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  26. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -3283,12 +3283,14 @@ function useFunkitUserIp() {
3283
3283
  throw Error(response.statusText);
3284
3284
  }
3285
3285
  const data = await response.json();
3286
+ logger.info("getUserIpViaMoonpay:done");
3286
3287
  return data;
3287
3288
  } catch (error) {
3288
3289
  logger.error("getUserIpViaMoonpay:error", error);
3289
3290
  throw error;
3290
3291
  }
3291
3292
  },
3293
+ enabled: !!moonpayApiKey,
3292
3294
  // no need to refetch as aggressively
3293
3295
  refetchOnMount: false,
3294
3296
  refetchOnReconnect: true,
@@ -5871,7 +5873,8 @@ function StatusIcon({
5871
5873
  {
5872
5874
  animate: { height: backgroundSize, width: backgroundSize },
5873
5875
  className: slots.container,
5874
- initial: animateEntrance ? { height: iconSize, width: iconSize } : false
5876
+ initial: animateEntrance ? { height: iconSize, width: iconSize } : false,
5877
+ transition: { duration: 0.2 }
5875
5878
  },
5876
5879
  /* @__PURE__ */ React44.createElement("div", { className: slots.background[variant] }),
5877
5880
  /* @__PURE__ */ React44.createElement(
@@ -5997,7 +6000,7 @@ var DEPOSIT_TEXT_CONFIG_STEPS = {
5997
6000
  },
5998
6001
  2: {
5999
6002
  title: "Depositing into your account...",
6000
- description: "It will take around one minute to finalize."
6003
+ description: "It will take a few seconds to finalize."
6001
6004
  }
6002
6005
  };
6003
6006
  var WITHDRAWAL_TEXT_CONFIG_STEPS = {
@@ -6012,7 +6015,7 @@ var STEP_SPINNER_SIZE_BIG_SCALE = 1;
6012
6015
  var STEP_SPINNER_SIZE_SMALL_SCALE = 28 / 30;
6013
6016
  var STEP_SPINNER_STROKE_WIDTH = 2;
6014
6017
  var STEP_SPINNER_GROWTH_MARGIN = 5;
6015
- var STEP_SPINNER_SPIN_DURATION_MS = 1e3;
6018
+ var STEP_SPINNER_SPIN_DURATION_MS = 700;
6016
6019
  var STEP_SPINNER_ARC_SPAN_DEGREES = 60;
6017
6020
  var STEP_SPINNER_MORPH_DEGREES = 45;
6018
6021
  var STEP_SPINNER_MORPH_MAX_OFFSET = 4;
@@ -6177,6 +6180,46 @@ function TransactionStatus({
6177
6180
  },
6178
6181
  [animate, stopSpinning]
6179
6182
  );
6183
+ const animateCircleToSuccess = useCallback10(
6184
+ async (step2) => {
6185
+ const durationMs = 300;
6186
+ const checkmarkDelayMs = 50;
6187
+ const duration = durationMs / 1e3;
6188
+ const checkmarkDelay = checkmarkDelayMs / 1e3;
6189
+ await Promise.all([
6190
+ // Change the spinner outline to solid green
6191
+ animate(
6192
+ `.framer-step-circle-${step2}-spinner-circle`,
6193
+ { opacity: 1, stroke: SUCCESS_COLOR, strokeDasharray: 0 },
6194
+ { duration }
6195
+ ),
6196
+ // Hide the spinner arc
6197
+ animate(
6198
+ `.framer-step-circle-${step2}-spinner-arc`,
6199
+ { opacity: 0 },
6200
+ { duration }
6201
+ ),
6202
+ // Hide the step number
6203
+ animate(
6204
+ `.framer-step-circle-${step2}-label`,
6205
+ { opacity: 0, filter: "blur(4px)" },
6206
+ { duration }
6207
+ ),
6208
+ // Draw the checkmark (after a short delay)
6209
+ animate(
6210
+ `.framer-step-circle-${step2}-checkmark`,
6211
+ { opacity: 1, pathLength: 1 },
6212
+ { delay: checkmarkDelay, duration: duration - checkmarkDelay }
6213
+ )
6214
+ ]);
6215
+ animate(
6216
+ `.framer-step-circle-${step2}-spinner`,
6217
+ { rotate: [0, 0] },
6218
+ { duration: 0.1 }
6219
+ );
6220
+ },
6221
+ [animate]
6222
+ );
6180
6223
  useEffect9(() => {
6181
6224
  if (initialStatus === "progress") {
6182
6225
  startSpinning(initialStep);
@@ -6191,46 +6234,18 @@ function TransactionStatus({
6191
6234
  setCurrentStatus(status);
6192
6235
  } else if (status === "success") {
6193
6236
  async function doFancySuccessAnimation() {
6194
- await Promise.all(
6195
- // For all steps...
6196
- STEPS.flatMap((step2) => [
6197
- // Change the spinner outline to solid green
6198
- animate(
6199
- `.framer-step-circle-${step2}-spinner-circle`,
6200
- { opacity: 1, stroke: SUCCESS_COLOR, strokeDasharray: 0 },
6201
- { duration: 0.3 }
6202
- ),
6203
- // Hide the spinner arc
6204
- animate(
6205
- `.framer-step-circle-${step2}-spinner-arc`,
6206
- { opacity: 0 },
6207
- { duration: 0.3 }
6208
- ),
6209
- // Hide the step number
6210
- animate(
6211
- `.framer-step-circle-${step2}-label`,
6212
- { opacity: 0 },
6213
- { duration: 0.3 }
6214
- ),
6215
- // Draw the checkmark
6216
- animate(
6217
- `.framer-step-circle-${step2}-checkmark`,
6218
- { opacity: 1, pathLength: 1 },
6219
- { duration: 0.3 }
6220
- )
6221
- ])
6222
- );
6237
+ await Promise.all(STEPS.map(animateCircleToSuccess));
6223
6238
  stopSpinning();
6224
6239
  animate(
6225
6240
  ".framer-step-circle-dots",
6226
6241
  { opacity: 0 },
6227
- { delay: 0.2, duration: 0.3 }
6242
+ { delay: 0.1, duration: 0.3, ease: "easeIn" }
6228
6243
  );
6229
6244
  for (const step2 of STEPS) {
6230
6245
  animate(
6231
6246
  `.framer-step-circle-${step2}`,
6232
6247
  { filter: "blur(3px)", x: step2 > 1 ? -36 : 36 },
6233
- { delay: 0.2, duration: 0.3, ease: "easeIn" }
6248
+ { delay: 0.1, duration: 0.3, ease: "easeIn" }
6234
6249
  );
6235
6250
  }
6236
6251
  await Promise.all(
@@ -6240,13 +6255,13 @@ function TransactionStatus({
6240
6255
  animate(
6241
6256
  `.framer-step-circle-${step2}`,
6242
6257
  { scale: STEP_SPINNER_SIZE_SMALL_SCALE },
6243
- { duration: 0.3 }
6258
+ { duration: 0.2 }
6244
6259
  ),
6245
6260
  // Make sure spinner arc really stays hidden
6246
6261
  animate(
6247
6262
  `.framer-step-circle-${step2}-spinner-arc`,
6248
6263
  { opacity: 0 },
6249
- { duration: 0.3 }
6264
+ { duration: 0.2 }
6250
6265
  ),
6251
6266
  // Morph circle towards the center
6252
6267
  animate(
@@ -6265,7 +6280,7 @@ function TransactionStatus({
6265
6280
  )
6266
6281
  ]
6267
6282
  },
6268
- { duration: 0.3 }
6283
+ { duration: 0.2 }
6269
6284
  )
6270
6285
  ])
6271
6286
  );
@@ -6282,7 +6297,7 @@ function TransactionStatus({
6282
6297
  animate(
6283
6298
  `.framer-step-circle-${step2}-spinner-circle`,
6284
6299
  { fill: SUCCESS_COLOR, opacity: 0.5 },
6285
- { duration: 0.5 }
6300
+ { duration: 0.3 }
6286
6301
  ),
6287
6302
  // Morph back to circle
6288
6303
  animate(
@@ -6294,7 +6309,7 @@ function TransactionStatus({
6294
6309
  step2 > 1 ? "left" : "right"
6295
6310
  )
6296
6311
  },
6297
- { delay: 0.2, duration: 0.3 }
6312
+ { delay: 0.2, duration: 0.1 }
6298
6313
  )
6299
6314
  ])
6300
6315
  );
@@ -6304,32 +6319,7 @@ function TransactionStatus({
6304
6319
  doFancySuccessAnimation();
6305
6320
  } else if (step > currentStep) {
6306
6321
  async function doFancyNextStepAnimation(nextStep) {
6307
- await Promise.all([
6308
- // Change the spinner outline to solid green
6309
- animate(
6310
- `.framer-step-circle-${currentStep}-spinner-circle`,
6311
- { opacity: 1, stroke: SUCCESS_COLOR, strokeDasharray: 0 },
6312
- { duration: 0.3 }
6313
- ),
6314
- // Hide the spinner arc
6315
- animate(
6316
- `.framer-step-circle-${currentStep}-spinner-arc`,
6317
- { opacity: 0 },
6318
- { duration: 0.3 }
6319
- ),
6320
- // Hide the step number
6321
- animate(
6322
- `.framer-step-circle-${currentStep}-label`,
6323
- { opacity: 0 },
6324
- { duration: 0.3 }
6325
- ),
6326
- // Draw the checkmark
6327
- animate(
6328
- `.framer-step-circle-${currentStep}-checkmark`,
6329
- { opacity: 1, pathLength: 1 },
6330
- { duration: 0.3 }
6331
- )
6332
- ]);
6322
+ await animateCircleToSuccess(currentStep);
6333
6323
  stopSpinning();
6334
6324
  animate(
6335
6325
  `.framer-step-circle-${currentStep}-spinner-circle`,
@@ -6435,6 +6425,7 @@ function TransactionStatus({
6435
6425
  }
6436
6426
  }, [
6437
6427
  animate,
6428
+ animateCircleToSuccess,
6438
6429
  currentStatus,
6439
6430
  currentStep,
6440
6431
  isDelayed2,
@@ -6455,6 +6446,7 @@ function TransactionStatus({
6455
6446
  display: "flex",
6456
6447
  flexDirection: "column",
6457
6448
  gap: "24",
6449
+ paddingTop: "4",
6458
6450
  ref: scope
6459
6451
  },
6460
6452
  currentStatus === "success" ? /* @__PURE__ */ React45.createElement(
@@ -8434,7 +8426,7 @@ Dialog.BottomSection = DialogBottom;
8434
8426
  Dialog.BottomBar = FunBottomBar;
8435
8427
 
8436
8428
  // src/modals/WithdrwalModal/WithdrawalContent.tsx
8437
- import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO8 } from "@funkit/chains";
8429
+ import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO9 } from "@funkit/chains";
8438
8430
  import {
8439
8431
  FlagKey as FlagKey14,
8440
8432
  formatCryptoAndStringify as formatCryptoAndStringify2,
@@ -10161,12 +10153,15 @@ function FunNotification({
10161
10153
  import {
10162
10154
  formatCurrencyAndStringify as formatCurrencyAndStringify2,
10163
10155
  formatDynamicFeeUsd,
10156
+ formatNumberAndStringify,
10164
10157
  formatPercent,
10165
10158
  noop as noop4
10166
10159
  } from "@funkit/utils";
10167
10160
  import React90, { useEffect as useEffect23, useMemo as useMemo11, useState as useState21 } from "react";
10161
+ import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO6 } from "@funkit/chains";
10168
10162
  import clsx14 from "clsx";
10169
10163
  import { motion as motion6, useAnimationControls } from "motion/react";
10164
+ import { mainnet as mainnet5 } from "viem/chains";
10170
10165
 
10171
10166
  // src/domains/relay.ts
10172
10167
  var KATANA_BRIDGE_ALERT_THRESHOLD_PERCENT = 0.5;
@@ -10319,32 +10314,80 @@ function formatRelayFee({
10319
10314
  }
10320
10315
  return formatPercent(percent);
10321
10316
  }
10322
- function renderRelayFee(relayQuoteMetadata, fees, totalUsd) {
10317
+ function makeRateComponent(exchangeRate, relayQuoteMetadata) {
10318
+ const { currencyIn, currencyOut } = relayQuoteMetadata.relayQuote.details || {};
10319
+ const sourceSymbol = currencyIn?.currency?.symbol;
10320
+ const sourceChain = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO6[currencyIn?.currency?.chainId || ""]?.name;
10321
+ const destinationSymbol = currencyOut?.currency?.symbol;
10322
+ const destinationChain = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO6[currencyOut?.currency?.chainId || ""]?.name;
10323
+ if (!exchangeRate || !sourceSymbol || !destinationSymbol) {
10324
+ return void 0;
10325
+ }
10326
+ if (sourceSymbol === destinationSymbol && sourceChain === destinationChain) {
10327
+ return void 0;
10328
+ }
10329
+ const tooltipText = sourceChain === destinationChain ? `The conversion rate between ${sourceSymbol} and ${destinationSymbol} on ${sourceChain}.` : sourceSymbol === destinationSymbol ? `The conversion rate between ${sourceSymbol} on ${sourceChain} and on ${destinationChain}.` : `The conversion rate between ${sourceSymbol} on ${sourceChain} and ${destinationSymbol} on ${destinationChain}.`;
10330
+ const exchangeRateComponent = {
10331
+ label: "Rate",
10332
+ value: `1.0 ${sourceSymbol} = ${formatNumberAndStringify(exchangeRate)} ${destinationSymbol}`,
10333
+ tooltipText
10334
+ };
10335
+ return exchangeRateComponent;
10336
+ }
10337
+ function computeDigest(relayQuoteMetadata, uiCustomizations, totalPriceImpactPercent, gasUsd) {
10338
+ const showTransactionDigest = uiCustomizations?.confirmationScreen?.showTransactionDigest ?? "none";
10339
+ if (showTransactionDigest === "none") {
10340
+ return {
10341
+ isMainnet: false,
10342
+ value: void 0
10343
+ };
10344
+ }
10345
+ const details = relayQuoteMetadata.relayQuote.details;
10346
+ const isMainnet = details?.currencyIn?.currency?.chainId === mainnet5.id || details?.currencyOut?.currency?.chainId === mainnet5.id;
10347
+ const percent = formatPercent(totalPriceImpactPercent);
10348
+ return {
10349
+ isMainnet: true,
10350
+ value: isMainnet ? `${formatCurrencyAndStringify2(gasUsd)} \u2022 ${percent}` : percent
10351
+ };
10352
+ }
10353
+ function renderRelayFee({
10354
+ relayQuoteMetadata,
10355
+ fees,
10356
+ totalUsd,
10357
+ uiCustomizations
10358
+ }) {
10323
10359
  const {
10324
10360
  gasUsd,
10325
- totalImpactUsd,
10326
10361
  swapImpactUsd,
10327
10362
  swapImpact,
10328
10363
  appFeeUsd,
10329
10364
  appFeePercent,
10330
10365
  maxSlippage,
10331
10366
  minReceived,
10332
- fillCostUsd
10367
+ fillCostUsd,
10368
+ exchangeRate,
10369
+ appFeeLabel
10333
10370
  } = extractRelayFeeInfo(relayQuoteMetadata);
10334
10371
  const totalNetworkCostUsd = fillCostUsd + gasUsd;
10335
10372
  const totalPriceImpact = swapImpactUsd + appFeeUsd;
10336
10373
  const totalPriceImpactPercent = swapImpact + appFeePercent;
10374
+ const exchangeRateComponent = makeRateComponent(
10375
+ exchangeRate,
10376
+ relayQuoteMetadata
10377
+ );
10378
+ const { isMainnet, value: collapsedValue } = computeDigest(
10379
+ relayQuoteMetadata,
10380
+ uiCustomizations,
10381
+ totalPriceImpactPercent,
10382
+ totalNetworkCostUsd
10383
+ );
10337
10384
  return {
10338
10385
  collapsed: {
10339
- value: formatCurrencyAndStringify2(totalImpactUsd + gasUsd)
10386
+ value: collapsedValue ?? "",
10387
+ valueIcon: isMainnet ? /* @__PURE__ */ React90.createElement(GasIcon, null) : void 0
10340
10388
  },
10341
10389
  expanded: [
10342
- // {
10343
- // label: 'Rate',
10344
- // value: `1.000 ${details?.currencyIn?.currency?.symbol} = ${ratePretty} ${details?.currencyOut?.currency?.symbol}`,
10345
- // tooltipText:
10346
- // 'The conversion rate between ETH on Arbitrum and USDCe on Polygon.',
10347
- // },
10390
+ ...exchangeRateComponent ? [exchangeRateComponent] : [],
10348
10391
  {
10349
10392
  label: "Network cost",
10350
10393
  valueIcon: /* @__PURE__ */ React90.createElement(GasIcon, null),
@@ -10425,7 +10468,7 @@ function renderRelayFee(relayQuoteMetadata, fees, totalUsd) {
10425
10468
  justifyContent: "space-between",
10426
10469
  gap: "16"
10427
10470
  },
10428
- /* @__PURE__ */ React90.createElement(Text, { size: "10" }, "Fun.xyz fee"),
10471
+ /* @__PURE__ */ React90.createElement(Text, { size: "10" }, appFeeLabel ?? "Fun.xyz fee"),
10429
10472
  /* @__PURE__ */ React90.createElement(Text, { size: "10", weight: "medium" }, formatRelayFee({
10430
10473
  usd: appFeeUsd,
10431
10474
  percent: appFeePercent,
@@ -10435,7 +10478,7 @@ function renderRelayFee(relayQuoteMetadata, fees, totalUsd) {
10435
10478
  },
10436
10479
  {
10437
10480
  label: "Max slippage",
10438
- value: formatPercent(maxSlippage),
10481
+ value: `Auto \u2022 ${formatPercent(maxSlippage)}`,
10439
10482
  tooltipText: `Slippage occurs due to price changes during trade execution. Minimum received: ${formatCurrencyAndStringify2(minReceived)}`
10440
10483
  },
10441
10484
  ...getCardFeeItems(fees),
@@ -10443,9 +10486,19 @@ function renderRelayFee(relayQuoteMetadata, fees, totalUsd) {
10443
10486
  ]
10444
10487
  };
10445
10488
  }
10446
- var extractFeeItems = (fees, totalUsd, relayQuoteMetadata) => {
10489
+ var extractFeeItems = ({
10490
+ fees,
10491
+ totalUsd,
10492
+ relayQuoteMetadata,
10493
+ uiCustomizations
10494
+ }) => {
10447
10495
  if (relayQuoteMetadata) {
10448
- return renderRelayFee(relayQuoteMetadata, fees, totalUsd);
10496
+ return renderRelayFee({
10497
+ relayQuoteMetadata,
10498
+ fees,
10499
+ totalUsd,
10500
+ uiCustomizations
10501
+ });
10449
10502
  }
10450
10503
  const marketMakerFee = {
10451
10504
  label: "Market maker gas costs",
@@ -10526,6 +10579,7 @@ function PaymentFeesSummary({
10526
10579
  setIsExpanded(false);
10527
10580
  }
10528
10581
  }, [valuesNotAvailable, isExpanded]);
10582
+ const { uiCustomizations } = useFunkitConfig();
10529
10583
  const { collapsed: collapsedItem, expanded: expandedItems } = useMemo11(() => {
10530
10584
  const fees = quote?.finalFeesBreakdown ?? fallbackFees;
10531
10585
  if (!fees) {
@@ -10533,8 +10587,13 @@ function PaymentFeesSummary({
10533
10587
  }
10534
10588
  const totalUsd = Number(quote?.finalTotalUsd ?? "0");
10535
10589
  const relayQuoteMetadata = quote?.baseQuote?.metadata;
10536
- return extractFeeItems(fees, totalUsd, relayQuoteMetadata);
10537
- }, [quote, fallbackFees]);
10590
+ return extractFeeItems({
10591
+ fees,
10592
+ totalUsd,
10593
+ relayQuoteMetadata,
10594
+ uiCustomizations
10595
+ });
10596
+ }, [quote, fallbackFees, uiCustomizations]);
10538
10597
  const isExpandable = expandedItems.length > 0 && !isLoading && !valuesNotAvailable;
10539
10598
  return /* @__PURE__ */ React90.createElement(Box, null, /* @__PURE__ */ React90.createElement(
10540
10599
  Box,
@@ -10639,7 +10698,7 @@ function FeeLineItem({
10639
10698
  className: clsx14(isExpanded ? feeLineHideStyles : feeLineShowStyles)
10640
10699
  },
10641
10700
  valueIcon,
10642
- value !== void 0 && /* @__PURE__ */ React90.createElement(Text, { color: "tertiaryText", size: "12" }, value)
10701
+ value !== void 0 ? /* @__PURE__ */ React90.createElement(Text, { color: "tertiaryText", size: "12" }, value) : void 0
10643
10702
  ), isExpandable && /* @__PURE__ */ React90.createElement(ArrowIcon, { size: 12, direction: isExpanded ? "down" : "right" }))
10644
10703
  );
10645
10704
  }
@@ -10685,18 +10744,18 @@ import {
10685
10744
  getAssetPriceInfo as getAssetPriceInfo2,
10686
10745
  getMoonpayBuyQuoteForCreditCard
10687
10746
  } from "@funkit/api-base";
10688
- import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO7 } from "@funkit/chains";
10747
+ import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO8 } from "@funkit/chains";
10689
10748
  import { estimateGas, getGasPrice } from "@wagmi/core";
10690
10749
  import { encodeFunctionData, erc20Abi as erc20Abi2, formatEther } from "viem";
10691
10750
  import { zkSync } from "viem/zksync";
10692
10751
 
10693
10752
  // src/utils/moonpay.ts
10694
- import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO6 } from "@funkit/chains";
10753
+ import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO7 } from "@funkit/chains";
10695
10754
  var MINIMUM_MOONPAY_DEPOSIT_AMOUNT_USD = 35;
10696
10755
  var MINIMUM_DEFI_MOONPAY_DEPOSIT_AMOUNT_USD = 25;
10697
10756
  var MAXIMUM_MOONPAY_DEPOSIT_AMOUNT_USD = 1e4;
10698
10757
  var generateMoonpayCurrencyCode = (tokenSymbol, chainId) => {
10699
- let moonpayChainName = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO6[chainId]?.moonpayChainName;
10758
+ let moonpayChainName = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO7[chainId]?.moonpayChainName;
10700
10759
  if (moonpayChainName == null) {
10701
10760
  throw new Error("MoonPay not supported on testnets");
10702
10761
  }
@@ -10762,7 +10821,7 @@ async function evaluateAccountWalletFees({
10762
10821
  apiKey,
10763
10822
  isWithdrawal
10764
10823
  }) {
10765
- const nativeCurrencySymbol = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO7[selectedSourceAssetInfo.chainId]?.nativeCurrency.symbol || "";
10824
+ const nativeCurrencySymbol = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO8[selectedSourceAssetInfo.chainId]?.nativeCurrency.symbol || "";
10766
10825
  const walletCheckoutFees = {
10767
10826
  paymentMethod: "balance" /* ACCOUNT_BALANCE */,
10768
10827
  ...getFunFeeBreakdown(baseQuote),
@@ -12228,7 +12287,7 @@ var WithdrawContent = ({
12228
12287
  return "Withdraw";
12229
12288
  };
12230
12289
  const getAlertMessage = () => {
12231
- const chainName = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO8[selectedChainId]?.name;
12290
+ const chainName = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO9[selectedChainId]?.name;
12232
12291
  if (chainName) {
12233
12292
  return `Please ensure the address supports receiving ${selectedToken} on ${chainName}.`;
12234
12293
  }
@@ -12686,7 +12745,7 @@ function FunTxSummaryLineItemKeyText({ text }) {
12686
12745
 
12687
12746
  // src/components/FunButton/FunRedirectButton.tsx
12688
12747
  import React97 from "react";
12689
- import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO9 } from "@funkit/chains";
12748
+ import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO10 } from "@funkit/chains";
12690
12749
 
12691
12750
  // src/components/Icons/RedirectIcon.tsx
12692
12751
  import React96 from "react";
@@ -12745,7 +12804,7 @@ var AddressRedirectButton = ({
12745
12804
  address,
12746
12805
  customRedirectUrl
12747
12806
  }) => {
12748
- const explorerInfo = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO9[chainId]?.explorerInfo;
12807
+ const explorerInfo = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO10[chainId]?.explorerInfo;
12749
12808
  return /* @__PURE__ */ React97.createElement(
12750
12809
  FunRedirectButton,
12751
12810
  {
@@ -12759,7 +12818,7 @@ var TransactionRedirectButton = ({
12759
12818
  txHash,
12760
12819
  customRedirectUrl
12761
12820
  }) => {
12762
- const explorerInfo = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO9[chainId]?.explorerInfo;
12821
+ const explorerInfo = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO10[chainId]?.explorerInfo;
12763
12822
  return /* @__PURE__ */ React97.createElement(
12764
12823
  FunRedirectButton,
12765
12824
  {
@@ -12796,7 +12855,7 @@ import {
12796
12855
  getBridgeCustomer,
12797
12856
  getFrogAccount
12798
12857
  } from "@funkit/api-base";
12799
- import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO10 } from "@funkit/chains";
12858
+ import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO11 } from "@funkit/chains";
12800
12859
  import { ResourceNotFoundError } from "@funkit/utils";
12801
12860
  async function fetchFrogAccounts(walletAddress, params) {
12802
12861
  const { logger: logger2 } = params;
@@ -12840,7 +12899,7 @@ async function fetchAllFiatAccounts(bridgeSubAccount, params) {
12840
12899
  }
12841
12900
  function getMatchingBankAccount(accounts, targetChain, targetAddress) {
12842
12901
  const { bankAccounts } = accounts;
12843
- const chainInfo = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO10[targetChain];
12902
+ const chainInfo = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO11[targetChain];
12844
12903
  if (!bankAccounts || !chainInfo) {
12845
12904
  return void 0;
12846
12905
  }
@@ -12885,7 +12944,7 @@ import {
12885
12944
  createBridgeBankAccount,
12886
12945
  getBridgeKycLink
12887
12946
  } from "@funkit/api-base";
12888
- import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO11 } from "@funkit/chains";
12947
+ import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO12 } from "@funkit/chains";
12889
12948
  import { FlagKey as FlagKey16 } from "@funkit/utils";
12890
12949
  import { useQuery as useQuery11, useQueryClient } from "@tanstack/react-query";
12891
12950
  import { useCallback as useCallback18 } from "react";
@@ -13065,7 +13124,7 @@ function useCreateVirtualBankAccount() {
13065
13124
  const targetChainId = checkoutConfig?.targetChain;
13066
13125
  const { transferInit, recipientAddr } = useCheckoutTransferInit();
13067
13126
  const destinationAddress = transferInit?.depositAddr || recipientAddr;
13068
- const chainName = targetChainId && FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO11[targetChainId]?.name?.toLowerCase();
13127
+ const chainName = targetChainId && FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO12[targetChainId]?.name?.toLowerCase();
13069
13128
  const subAccountId = allFiatAccounts?.bridgeCustomer?.id;
13070
13129
  const { clearVirtualFiatAccounts } = useClearFrogAccountsCache();
13071
13130
  const handleCreateVirtualFiatAccount = useCallback18(async () => {
@@ -13116,7 +13175,7 @@ var useWalletLabel = () => {
13116
13175
  // src/modals/CheckoutModal/useWalletAssetHoldings.ts
13117
13176
  import {
13118
13177
  FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS as FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS3,
13119
- FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO12
13178
+ FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO13
13120
13179
  } from "@funkit/chains";
13121
13180
  import { useMemo as useMemo13 } from "react";
13122
13181
 
@@ -13136,14 +13195,14 @@ var processWalletAssets = (walletAssets, targetChain) => {
13136
13195
  if (!walletAssets) {
13137
13196
  return;
13138
13197
  }
13139
- const targetChainInfo = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO12[targetChain];
13198
+ const targetChainInfo = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO13[targetChain];
13140
13199
  const isCheckoutOnMainnet = targetChainInfo?.isMainnet;
13141
13200
  return Object.values(walletAssets).reduce(
13142
13201
  (result, asset) => {
13143
13202
  if (!asset.symbol || !asset.contractAddress) {
13144
13203
  return result;
13145
13204
  }
13146
- const assetChainInfo = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO12[asset.chainId];
13205
+ const assetChainInfo = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO13[asset.chainId];
13147
13206
  const isAssetOnMainnet = assetChainInfo?.isMainnet;
13148
13207
  if (isCheckoutOnMainnet && !isAssetOnMainnet) {
13149
13208
  return result;
@@ -13190,7 +13249,7 @@ function useWalletAssetHoldings(targetChain) {
13190
13249
 
13191
13250
  // src/config/getDefaultConfig.ts
13192
13251
  import {
13193
- FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO13,
13252
+ FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO14,
13194
13253
  FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST
13195
13254
  } from "@funkit/chains";
13196
13255
  import { fallback } from "viem";
@@ -13887,7 +13946,7 @@ var createDefaultTransports = (chains) => {
13887
13946
  const transportsObject = {};
13888
13947
  for (const chain of chains) {
13889
13948
  const key = chain.id;
13890
- const fallbackRpcs = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO13[key]?.fallbackRpcUrls;
13949
+ const fallbackRpcs = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO14[key]?.fallbackRpcUrls;
13891
13950
  if (fallbackRpcs && fallbackRpcs.length > 0) {
13892
13951
  transportsObject[key] = fallback([
13893
13952
  http(),
@@ -17470,14 +17529,14 @@ import { useAccount as useAccount5, useSendTransaction, useWriteContract } from
17470
17529
 
17471
17530
  // src/utils/isMainnetUsdt.ts
17472
17531
  import { isTokenEquivalent as isTokenEquivalent4 } from "@funkit/utils";
17473
- import { mainnet as mainnet5 } from "viem/chains";
17532
+ import { mainnet as mainnet6 } from "viem/chains";
17474
17533
  var USDT_MAINNET_ADDRESS = "0xdAC17F958D2ee523a2206206994597C13D831ec7";
17475
17534
  function isMainnetUsdt(chainId, address) {
17476
17535
  return isTokenEquivalent4({
17477
17536
  firstTokenAddress: address,
17478
17537
  firstTokenChainId: chainId.toString(),
17479
17538
  secondTokenAddress: USDT_MAINNET_ADDRESS,
17480
- secondTokenChainId: mainnet5.id.toString()
17539
+ secondTokenChainId: mainnet6.id.toString()
17481
17540
  });
17482
17541
  }
17483
17542
 
@@ -20627,7 +20686,7 @@ function InputAmountLoaded({
20627
20686
  {
20628
20687
  ref,
20629
20688
  value: inputValue,
20630
- placeholder,
20689
+ placeholder: `\xA0${placeholder}`,
20631
20690
  onChange,
20632
20691
  onKeyDown: handleKeyDown,
20633
20692
  inputProps: {
@@ -20973,9 +21032,9 @@ function InputAmount(props) {
20973
21032
  import React167, { useEffect as useEffect38 } from "react";
20974
21033
 
20975
21034
  // src/domains/wallet.ts
20976
- import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO14 } from "@funkit/chains";
21035
+ import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO15 } from "@funkit/chains";
20977
21036
  import { isNotNullish as isNotNullish7 } from "@funkit/utils";
20978
- import { mainnet as mainnet6, polygon as polygon6 } from "viem/chains";
21037
+ import { mainnet as mainnet7, polygon as polygon6 } from "viem/chains";
20979
21038
  var ASSETS_LOW_VALUE_THRESHOLD2 = 0.1;
20980
21039
 
20981
21040
  // src/hooks/usePaymentSources.ts
@@ -22366,12 +22425,12 @@ var DefiPurchaseSection = ({ config }) => {
22366
22425
 
22367
22426
  // src/modals/CheckoutModal/SourceChange/useUpdateSourceAssetForCard.ts
22368
22427
  import {
22369
- FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO15,
22428
+ FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO16,
22370
22429
  katanaChain
22371
22430
  } from "@funkit/chains";
22372
22431
  import { getTokenAddressBySymbolAndChainId as getTokenAddressBySymbolAndChainId2 } from "@funkit/core";
22373
22432
  import { useCallback as useCallback31, useState as useState46 } from "react";
22374
- import { mainnet as mainnet7, mantle, zkSync as zkSync2 } from "viem/chains";
22433
+ import { mainnet as mainnet8, mantle, zkSync as zkSync2 } from "viem/chains";
22375
22434
  var pickSourceAssetForCard = async (checkoutItem, userIpInfo) => {
22376
22435
  if (!checkoutItem?.initSettings.config.targetChain) {
22377
22436
  throw new Error("pickSourceAssetForCard: Missing targetChain");
@@ -22386,7 +22445,7 @@ var pickSourceAssetForCard = async (checkoutItem, userIpInfo) => {
22386
22445
  const wethAddrOnTargetChain = (await getTokenAddressBySymbolAndChainId2("weth", moonpayChainId)).toLowerCase();
22387
22446
  const isTargetAssetEthOrWeth = [NATIVE_TOKEN, wethAddrOnTargetChain].includes(
22388
22447
  checkoutItem.initSettings.config.targetAsset
22389
- ) && FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO15[moonpayChainId]?.nativeCurrency.symbol === "ETH" /* ETH */;
22448
+ ) && FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO16[moonpayChainId]?.nativeCurrency.symbol === "ETH" /* ETH */;
22390
22449
  let sourceTokenAddress;
22391
22450
  let sourceTokenTicker;
22392
22451
  let sourceTokenChainId;
@@ -22395,7 +22454,7 @@ var pickSourceAssetForCard = async (checkoutItem, userIpInfo) => {
22395
22454
  sourceTokenAddress = NATIVE_TOKEN;
22396
22455
  sourceTokenChainId = moonpayChainId;
22397
22456
  } else {
22398
- sourceTokenChainId = isNyOrTxOrVi ? mainnet7.id.toString() : moonpayChainId;
22457
+ sourceTokenChainId = isNyOrTxOrVi ? mainnet8.id.toString() : moonpayChainId;
22399
22458
  if (isTargetAssetEthOrWeth) {
22400
22459
  sourceTokenTicker = "ETH" /* ETH */;
22401
22460
  sourceTokenAddress = NATIVE_TOKEN;
@@ -23033,7 +23092,7 @@ var QRCodeSkeletonLoader_default = QRCodeSkeletonLoader;
23033
23092
 
23034
23093
  // src/components/TransferTokenDetails/TransferTokenDetails.tsx
23035
23094
  import {
23036
- formatNumberAndStringify,
23095
+ formatNumberAndStringify as formatNumberAndStringify2,
23037
23096
  formatSecondsToReadableForm as formatSecondsToReadableForm3
23038
23097
  } from "@funkit/utils";
23039
23098
  import React187 from "react";
@@ -23344,7 +23403,7 @@ var TransferTokenDetails = ({
23344
23403
  {
23345
23404
  text: `${estPriceImpact.label}:`,
23346
23405
  prefix: estPriceImpact.value > 0 ? "~" : "",
23347
- value: `${formatNumberAndStringify(estPriceImpact.value, void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}%`,
23406
+ value: `${formatNumberAndStringify2(estPriceImpact.value, void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}%`,
23348
23407
  icon: /* @__PURE__ */ React187.createElement(DollarIcon, null),
23349
23408
  tooltip: /* @__PURE__ */ React187.createElement(
23350
23409
  FunTooltip,
@@ -23365,7 +23424,7 @@ var TransferTokenDetails = ({
23365
23424
  {
23366
23425
  text: `${maxSlippage.label}:`,
23367
23426
  prefix: maxSlippage.value > 0 ? "~" : "",
23368
- value: `${formatNumberAndStringify(maxSlippage.value, void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}%`,
23427
+ value: `${formatNumberAndStringify2(maxSlippage.value, void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}%`,
23369
23428
  icon: /* @__PURE__ */ React187.createElement(PercentageIcon, null),
23370
23429
  tooltip: /* @__PURE__ */ React187.createElement(
23371
23430
  FunTooltip,
@@ -23416,7 +23475,7 @@ var TransferTokenDetails = ({
23416
23475
  import { solanaChain as solanaChain4 } from "@funkit/chains";
23417
23476
  import { FlagKey as FlagKey25 } from "@funkit/utils";
23418
23477
  import { useMemo as useMemo29 } from "react";
23419
- import { mainnet as mainnet8, polygon as polygon7 } from "viem/chains";
23478
+ import { mainnet as mainnet9, polygon as polygon7 } from "viem/chains";
23420
23479
  var useTokenTransfer = (selectedChainId, selectedToken, chainIds) => {
23421
23480
  const { checkoutItem } = useCheckoutContext();
23422
23481
  const enableUniversal = useFlag(
@@ -23467,7 +23526,7 @@ var useMinTransferLimits = () => {
23467
23526
  };
23468
23527
  var useMinTransferValue = (selectedChainId) => {
23469
23528
  const limits = useMinTransferLimits();
23470
- const limit = selectedChainId === mainnet8.id ? limits.mainnet : limits.nonMainnet;
23529
+ const limit = selectedChainId === mainnet9.id ? limits.mainnet : limits.nonMainnet;
23471
23530
  return Math.ceil(limit);
23472
23531
  };
23473
23532
  var useMinTransferValues = (chainIds) => {
@@ -23475,7 +23534,7 @@ var useMinTransferValues = (chainIds) => {
23475
23534
  return useMemo29(() => {
23476
23535
  return chainIds.reduce(
23477
23536
  (acc, id) => {
23478
- const limit = id === mainnet8.id ? limits.mainnet : limits.nonMainnet;
23537
+ const limit = id === mainnet9.id ? limits.mainnet : limits.nonMainnet;
23479
23538
  acc[id] = Math.ceil(limit);
23480
23539
  return acc;
23481
23540
  },
@@ -31286,7 +31345,7 @@ function setFunkitConnectVersion({ version }) {
31286
31345
  localStorage.setItem(storageKey5, version);
31287
31346
  }
31288
31347
  function getCurrentSdkVersion() {
31289
- return "6.0.6";
31348
+ return "6.1.0";
31290
31349
  }
31291
31350
  function useFingerprint() {
31292
31351
  const fingerprint = useCallback50(() => {