@funkit/connect 5.5.20 → 5.5.21

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 (30) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/components/Dialog/DialogContent.css.d.ts +1 -0
  3. package/dist/components/FunButton/FunButton.d.ts +2 -1
  4. package/dist/index.css +24 -16
  5. package/dist/index.js +86 -33
  6. package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +2 -1
  7. package/dist/providers/FunkitConfigContext.d.ts +1 -0
  8. package/dist/providers/ModalSizeContext.d.ts +1 -1
  9. package/dist/utils/flags/config.d.ts +19 -2
  10. package/dist/utils/signature.d.ts +1 -0
  11. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  12. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  13. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  14. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  15. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  16. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  17. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  18. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  19. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  20. package/dist/wallets/walletConnectors/index.js +49 -49
  21. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  22. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  23. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  24. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  25. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  26. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  27. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  28. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  29. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  30. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 5.5.21
4
+
5
+ ### Patch Changes
6
+
7
+ - b1a851c: feat(connect,with-next): adjust UI for Hyperbeat theme
8
+ - e2bbe8a: fix(connect): back button for fiat account detail
9
+ - 2511449: feat: better chain switch error handling
10
+ - 579f106: dark theme defined for hyperbeat
11
+ - 9af95e3: fix: use correct uda flag
12
+ - Updated dependencies [e2bbe8a]
13
+ - @funkit/utils@1.1.8
14
+ - @funkit/api-base@1.9.10
15
+ - @funkit/core@2.3.34
16
+ - @funkit/wagmi-tools@3.0.56
17
+
3
18
  ## 5.5.20
4
19
 
5
20
  ### Patch Changes
@@ -3,6 +3,7 @@ export declare const DIALOG_BOTTOM_PADDING = "15";
3
3
  export declare const dialog: string;
4
4
  export declare const dialogCompact: string;
5
5
  export declare const dialogMedium: string;
6
+ export declare const dialogWide: string;
6
7
  export declare const withoutSidePadding: string;
7
8
  export declare const withoutBottomPadding: string;
8
9
  export declare const dialogMobile: string;
@@ -13,5 +13,6 @@ export interface FunButtonProps {
13
13
  loaderSize?: number;
14
14
  borderRadius?: BoxProps['borderRadius'];
15
15
  textSize?: BoxProps['fontSize'];
16
+ uppercase?: boolean;
16
17
  }
17
- export declare function FunButton({ id, title, customTitleComponent, onClick, isDisabled, type, isLoading, loaderSize, textSize, borderRadius, height, }: FunButtonProps): React.JSX.Element;
18
+ export declare function FunButton({ id, title, customTitleComponent, onClick, isDisabled, type, isLoading, loaderSize, textSize, borderRadius, height, uppercase, }: FunButtonProps): React.JSX.Element;
package/dist/index.css CHANGED
@@ -8374,7 +8374,7 @@
8374
8374
  }
8375
8375
  }
8376
8376
 
8377
- /* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#H4sIAAAAAAAAE7WVy66bMBCG9+cpLHWTLBwREs7JIZuqz9B9NeAhWDE2sodAWuXdKy6hmCRqoqor5GG+fwbPhdWPdfmTtuFmzX69MVZAw3OUh5xiFoVR2ewHYy0F5TFbB8Gpbm3DeRsFrc/lbTXqxDm4xRdxFg0v4VygJu5qSWmOdnkT4/0jus+TOaLmZEG7DC0v4YC39C58QGcSiAskkOpVNDU6k7YAkka/zhalQsJXuVpSLizUoHimTP0MGfY+Ul8rs9kFfbX88wTZvI5sO6QEIaQ+cNsnE+wnNoVZb5pQkUclhsgUc5+PeTJSS5KgJumkoNJF13CMs01QNsv9/FoCd8p92Ve6J2hh3/YZPVB8oqOekvvsOHNC21aaNzHLpRCo91PrOWZQkWltLrVGqQQsP1REaGPmCBKF/rvhxirtkPxwccxrTI6S2ttIj130BNLjwZpKC54aZWzMTmAXnNtjf3a8MALUt9Ft+UhzzKDTFdKVCs5jHmMl3/s2+w9xOeVVkfRfZaxAyy0IWbmJdGuQvfLyuSwILUmw5+/YkJ8C/CWFf/vAx+px3vbGkzEcpkaLu/knfp0yhV1h2icX0mLabr2YpUZVRdeS10Zux9Bv5NQb8nEN3NsWE0p0VDeYso9lSkglnVmwCh1DcMil5qby2xhvMFCKBatohvjTF0bDfrsO1p9hm2hnN5M8ULfhtkO4IdY92a8FCgntaCJqBlqwxWTJfbzvyqZfHSv/xzv/ozJ2mTqFg9O97T3f3zN0c4tuwzk6Wi5vl99vlQlxEwgAAA== */
8377
+ /* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#H4sIAAAAAAAAE7WVzY6bMBDH7/sUlnpJDo5YErIpuVR9ht6rwR6CFWMjMwTSat+94mNZDImaqOoJeZjffwbPB5ufr8Uv2oXbV/b7hbEcGp6hOmUUsyiMiuY4GGslKYvZaxBc6tY2nHdR0Pq8v2xGnTiDcvVFXmXDC7jmaIiXtSKRoVsvYuzfots82TMaTg5MmaLjBZxwSR/CO3SqgLhEAqWfRYU1qXI5kLLmeTYvNBI+y9WKMumgBs1TbetHyLD3UeajMttD0FfLP0+Q7fPI7nkk6pACpFTmxF2ff3Cc2DSmvWlC7T0qsUQ2n/sc5skoo0iBnqQjQItV16OMs21QNOvj/CaD8pL5ss80XNDCvu1rdEfxgSZ8SA46zl7Qtc3Bm5hlSko0x6n1GjOoyLa2UjirdQKOnyoidDErCRKN/rvhxipTIvnh4pjXmJwVtbchzl30BMT55GxlJBdWWxezC7gV5+7cn0ueWwn6++i2vqc5ZtDpSlUWGq5jHmMl932b/Ye4nLIqT/qvsk6i4w6kqsqJdGtQvfL6sSwIHSlw1x/YkJ9C8pcU/u0D76vHWdsbD8YoUVgjb+Yv/DqlGrvCtE8ulUPRLsqYCaurvGvJj0Zux9BvZOkN+bgGbm2LCYUd1Q2m6mPZAoSiKws2YckQSuTKcFv5bZwuMNCaBZtohvjTF0bDfvsYrM9hm2ifFpM8UMtwuyHcEOuW7LccpYJ2NBENAyPZarLk3vaHoulXx8b/V89/woy9T53CwenW9p7v7xm6XaK7cI6OFg/d3UCjBfqZ8PsfygoTsoEIAAA= */
8378
8378
  [data-rk] ._1pzt4231 {
8379
8379
  max-height: 525px;
8380
8380
  max-width: 100vw;
@@ -8407,67 +8407,71 @@
8407
8407
  width: 380px;
8408
8408
  }
8409
8409
  [data-rk] ._1pzt4234 {
8410
+ min-width: 380px;
8411
+ width: 380px;
8412
+ }
8413
+ [data-rk] ._1pzt4235 {
8410
8414
  padding-right: 0;
8411
8415
  padding-left: 0;
8412
8416
  }
8413
- [data-rk] ._1pzt4235 {
8417
+ [data-rk] ._1pzt4236 {
8414
8418
  padding-bottom: 0;
8415
8419
  }
8416
- [data-rk] ._1pzt4237 {
8420
+ [data-rk] ._1pzt4238 {
8417
8421
  min-width: initial;
8418
8422
  width: calc(100vw - 30px);
8419
8423
  max-height: 80svh;
8420
8424
  }
8421
- [data-rk] ._1pzt4237:has(#token-transfer-page) {
8425
+ [data-rk] ._1pzt4238:has(#token-transfer-page) {
8422
8426
  max-height: 80vh;
8423
8427
  max-height: 95svh;
8424
8428
  }
8425
- [data-rk] ._1pzt4237:has(#fiat-detail-page) {
8429
+ [data-rk] ._1pzt4238:has(#fiat-detail-page) {
8426
8430
  max-height: 80vh;
8427
8431
  max-height: 95svh;
8428
8432
  }
8429
- [data-rk] ._1pzt4239 {
8433
+ [data-rk] ._1pzt423a {
8430
8434
  overflow-x: hidden;
8431
8435
  overflow-y: auto;
8432
8436
  scrollbar-gutter: stable;
8433
8437
  scrollbar-width: unset;
8434
8438
  }
8435
- [data-rk] ._1pzt4239::-webkit-track {
8439
+ [data-rk] ._1pzt423a::-webkit-track {
8436
8440
  background-color: var(--rk-colors-modalBackground);
8437
8441
  }
8438
- [data-rk] ._1pzt4239::-webkit-scrollbar {
8442
+ [data-rk] ._1pzt423a::-webkit-scrollbar {
8439
8443
  display: unset;
8440
8444
  width: 6px;
8441
8445
  background-color: var(--rk-colors-modalBackground);
8442
8446
  }
8443
- [data-rk] ._1pzt4239::-webkit-scrollbar-thumb {
8447
+ [data-rk] ._1pzt423a::-webkit-scrollbar-thumb {
8444
8448
  border-radius: var(--rk-radii-modal);
8445
8449
  background-color: var(--rk-colors-tertiaryText);
8446
8450
  }
8447
- [data-rk] ._1pzt423a::-webkit-scrollbar-thumb {
8451
+ [data-rk] ._1pzt423b::-webkit-scrollbar-thumb {
8448
8452
  background-color: var(--rk-colors-modalBackground);
8449
8453
  }
8450
- [data-rk] ._1pzt423a::-webkit-scrollbar-thumb:hover {
8454
+ [data-rk] ._1pzt423b::-webkit-scrollbar-thumb:hover {
8451
8455
  background-color: var(--rk-colors-secondaryText);
8452
8456
  }
8453
- [data-rk] ._1pzt423b {
8457
+ [data-rk] ._1pzt423c {
8454
8458
  display: flex;
8455
8459
  flex-direction: column;
8456
8460
  height: 100vh;
8457
8461
  }
8458
- [data-rk] ._1pzt423c {
8462
+ [data-rk] ._1pzt423d {
8459
8463
  padding-left: 0;
8460
8464
  padding-right: 0;
8461
8465
  }
8462
- [data-rk] ._1pzt423d {
8466
+ [data-rk] ._1pzt423e {
8463
8467
  transition: opacity 0.2s ease-in-out;
8464
8468
  }
8465
- [data-rk] ._1pzt423e {
8469
+ [data-rk] ._1pzt423f {
8466
8470
  transition: all 0.5s ease-in-out;
8467
8471
  max-height: 250px;
8468
8472
  overflow: hidden;
8469
8473
  }
8470
- [data-rk] ._1pzt423f {
8474
+ [data-rk] ._1pzt423g {
8471
8475
  max-height: 0px;
8472
8476
  transition: all 0.4s ease-out;
8473
8477
  overflow: hidden;
@@ -8484,6 +8488,10 @@
8484
8488
  min-width: 420px;
8485
8489
  width: 420px;
8486
8490
  }
8491
+ [data-rk] ._1pzt4234 {
8492
+ min-width: 450px;
8493
+ width: 450px;
8494
+ }
8487
8495
  }
8488
8496
 
8489
8497
  /* vanilla-extract-css-ns:src/components/Icons/Icons.css.ts.vanilla.css?source=QGtleWZyYW1lcyBxZTIyMWEwIHsKICAwJSB7CiAgICB0cmFuc2Zvcm06IHJvdGF0ZSgwZGVnKTsKICB9CiAgMTAwJSB7CiAgICB0cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOwogIH0KfQpAa2V5ZnJhbWVzIHFlMjIxYTEgewogIDAlIHsKICAgIHRyYW5zZm9ybTogcm90YXRlKDBkZWcpOwogIH0KICAxMDAlIHsKICAgIHRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7CiAgfQp9Ci5xZTIyMWEyIHsKICBhbmltYXRpb246IHFlMjIxYTAgMnMgaW5maW5pdGUgbGluZWFyOwp9Ci5xZTIyMWEzIHsKICBhbmltYXRpb246IHFlMjIxYTAgMzAwMG1zIGluZmluaXRlIGxpbmVhcjsKfQoucWUyMjFhNCB7CiAgcG9zaXRpb246IHJlbGF0aXZlOwogIGJvcmRlci1yYWRpdXM6IDUwJTsKICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgYW5pbWF0aW9uOiBxZTIyMWExIDcwMG1zIGxpbmVhciBpbmZpbml0ZTsKICBhc3BlY3QtcmF0aW86IDEgLyAxOwp9Ci5xZTIyMWE1IHsKICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgdG9wOiA1MCU7CiAgbGVmdDogNTAlOwogIHRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIC01MCUpOwogIGJvcmRlci1yYWRpdXM6IDUwJTsKfQ== */
package/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
1
  "use client";
2
- import {
3
- lightTheme
4
- } from "./chunk-K4APSFTL.js";
5
2
  import {
6
3
  darkTheme
7
4
  } from "./chunk-ES634CAR.js";
5
+ import {
6
+ lightTheme
7
+ } from "./chunk-K4APSFTL.js";
8
8
  import {
9
9
  systemFontStack
10
10
  } from "./chunk-OV3P5HQK.js";
11
11
 
12
12
  // src/components/Dialog/DialogContent.css.ts
13
13
  var SCROLL_BAR_WIDTH = 6;
14
- var contentCollapsed = "_1pzt423f";
15
- var contentExpanded = "_1pzt423e";
14
+ var contentCollapsed = "_1pzt423g";
15
+ var contentExpanded = "_1pzt423f";
16
16
  var dialog = "_1pzt4231 _1rsrm2fla _1rsrm2f11s _1rsrm2fw _1rsrm2f1b _1rsrm2f1f _1rsrm2f1es _1rsrm2fa _1rsrm2f1p _1rsrm2fd0 _1rsrm2fdv _1rsrm2fep _1rsrm2ffl _1rsrm2fgn";
17
17
  var dialogCompact = "_1pzt4232 _1pzt4231 _1rsrm2fla _1rsrm2f11s _1rsrm2fw _1rsrm2f1b _1rsrm2f1f _1rsrm2f1es _1rsrm2fa _1rsrm2f1p _1rsrm2fd0 _1rsrm2fdv _1rsrm2fep _1rsrm2ffl _1rsrm2fgn";
18
18
  var dialogMedium = "_1pzt4233 _1pzt4231 _1rsrm2fla _1rsrm2f11s _1rsrm2fw _1rsrm2f1b _1rsrm2f1f _1rsrm2f1es _1rsrm2fa _1rsrm2f1p _1rsrm2fd0 _1rsrm2fdv _1rsrm2fep _1rsrm2ffl _1rsrm2fgn";
19
- var dialogMobile = "_1pzt4237 _1rsrm2fx _1rsrm2f1f";
20
- var dividerTransition = "_1pzt423d";
21
- var fullHeightContent = "_1pzt423b";
22
- var noPaddingContent = "_1pzt423c";
23
- var scrollContent = "_1pzt4239 _1rsrm2fht";
24
- var scrollbarHidden = "_1pzt423a";
25
- var withoutBottomPadding = "_1pzt4235";
26
- var withoutSidePadding = "_1pzt4234";
19
+ var dialogMobile = "_1pzt4238 _1rsrm2fx _1rsrm2f1f";
20
+ var dividerTransition = "_1pzt423e";
21
+ var fullHeightContent = "_1pzt423c";
22
+ var noPaddingContent = "_1pzt423d";
23
+ var scrollContent = "_1pzt423a _1rsrm2fht";
24
+ var scrollbarHidden = "_1pzt423b";
25
+ var withoutBottomPadding = "_1pzt4236";
26
+ var withoutSidePadding = "_1pzt4235";
27
27
 
28
28
  // src/modals/DevTest/DevEmbed.tsx
29
29
  import React2 from "react";
@@ -2709,6 +2709,32 @@ var flagConfig = {
2709
2709
  }
2710
2710
  ],
2711
2711
  value: true
2712
+ },
2713
+ {
2714
+ if_all: [
2715
+ {
2716
+ key: "userId",
2717
+ type: "isAnyOf",
2718
+ values: [
2719
+ "0x2A8Bd916E85d98d8175258De99fc0ddbcC102eF6",
2720
+ "0x21b94a3E67c4a72d3D15f478A696c5175f036092"
2721
+ // jianhe
2722
+ ]
2723
+ },
2724
+ {
2725
+ key: "apiKey",
2726
+ type: "isAnyOf",
2727
+ values: [HYPERBEAT_API_KEY]
2728
+ }
2729
+ ],
2730
+ if_any: [
2731
+ {
2732
+ key: "userId",
2733
+ type: "pctRollout",
2734
+ pct: 0
2735
+ }
2736
+ ],
2737
+ value: true
2712
2738
  }
2713
2739
  ]
2714
2740
  },
@@ -4601,10 +4627,7 @@ var useCheckoutTransferInit = () => {
4601
4627
  const checkoutConfig = checkoutItem?.initSettings.config;
4602
4628
  const { walletAddress, userInfo } = useGeneralWallet();
4603
4629
  const { apiKey } = useFunkitConfig();
4604
- const isQrCodeEnabled = useFlag(
4605
- FlagKey4.EnableTokenTransferUniversalDepositAddress,
4606
- false
4607
- );
4630
+ const isQrCodeEnabled = useFlag(FlagKey4.EnableTokenTransfer, false);
4608
4631
  const recipientAddr = checkoutConfig?.customRecipient || walletAddress || "0x";
4609
4632
  const queryKey = {
4610
4633
  userId: userInfo.id || "",
@@ -7250,8 +7273,8 @@ var FunkitThemeProvider = ({
7250
7273
  import React48, { createContext as createContext11 } from "react";
7251
7274
  var ModalSizeOptions = {
7252
7275
  COMPACT: "compact",
7253
- WIDE: "wide",
7254
- MEDIUM: "medium"
7276
+ MEDIUM: "medium",
7277
+ WIDE: "wide"
7255
7278
  };
7256
7279
  var ModalSizeContext = createContext11(ModalSizeOptions.WIDE);
7257
7280
  function ModalSizeProvider({
@@ -7583,7 +7606,8 @@ function FunButton({
7583
7606
  textSize,
7584
7607
  // TODO: remove this
7585
7608
  borderRadius,
7586
- height
7609
+ height,
7610
+ uppercase = false
7587
7611
  }) {
7588
7612
  const { background, color, boxShadow, paddingX, paddingY } = getStyleProps(
7589
7613
  type,
@@ -7632,7 +7656,18 @@ function FunButton({
7632
7656
  }
7633
7657
  },
7634
7658
  /* @__PURE__ */ React55.createElement(SpinnerIcon, { size: loaderSize })
7635
- ), customTitleComponent ? customTitleComponent : /* @__PURE__ */ React55.createElement(Text, { size: buttonTextSize, color, weight: "medium" }, title))
7659
+ ), customTitleComponent ? customTitleComponent : /* @__PURE__ */ React55.createElement(
7660
+ Text,
7661
+ {
7662
+ size: buttonTextSize,
7663
+ color,
7664
+ weight: "medium",
7665
+ style: {
7666
+ textTransform: uppercase ? "uppercase" : "none"
7667
+ }
7668
+ },
7669
+ title
7670
+ ))
7636
7671
  );
7637
7672
  }
7638
7673
 
@@ -7781,6 +7816,7 @@ var FunBottomBar = ({
7781
7816
  bottomSection,
7782
7817
  onClose
7783
7818
  }) => {
7819
+ const { uiCustomizations } = useFunkitConfig();
7784
7820
  const showTagline = useFlag(FlagKey7.ShowPoweredTagline);
7785
7821
  const defaultBottomSection = showTagline ? /* @__PURE__ */ React58.createElement(FunPoweredTagline, null) : void 0;
7786
7822
  const bottomSectionComponent = bottomSection ?? defaultBottomSection;
@@ -7803,7 +7839,8 @@ var FunBottomBar = ({
7803
7839
  ...actionButtonProps,
7804
7840
  borderRadius: customButtonRadius,
7805
7841
  height: "modalBottomBarButtonHeight",
7806
- textSize: "modalBottomBarButtonText"
7842
+ textSize: "modalBottomBarButtonText",
7843
+ uppercase: uiCustomizations?.callToActionsUppercase
7807
7844
  }
7808
7845
  )), bottomSectionComponent && /* @__PURE__ */ React58.createElement(Box, { paddingTop: "10" }, bottomSectionComponent));
7809
7846
  };
@@ -8328,9 +8365,9 @@ var DialogWrapper = ({
8328
8365
  const mobile = isMobile2();
8329
8366
  const modalSize = useContext11(ModalSizeContext);
8330
8367
  const mapModalSizeToClassName = {
8331
- [ModalSizeOptions.WIDE]: dialog,
8332
8368
  [ModalSizeOptions.MEDIUM]: dialogMedium,
8333
- [ModalSizeOptions.COMPACT]: dialogCompact
8369
+ [ModalSizeOptions.COMPACT]: dialogCompact,
8370
+ [ModalSizeOptions.WIDE]: dialog
8334
8371
  };
8335
8372
  return /* @__PURE__ */ React66.createElement(ErrorBoundary_default, { fallback: /* @__PURE__ */ React66.createElement(ErrorFallback, null) }, /* @__PURE__ */ React66.createElement(Box, { position: "relative", paddingBottom: "15" }, /* @__PURE__ */ React66.createElement(
8336
8373
  Box,
@@ -12102,6 +12139,13 @@ function isUserRejectedError(error) {
12102
12139
  const regex = /user\s?rejected/gi;
12103
12140
  return regex.test(error.name) || regex.test(error.message);
12104
12141
  }
12142
+ function isSwitchChainError(error) {
12143
+ if (!(error instanceof Error)) {
12144
+ return false;
12145
+ }
12146
+ const regex = /switch\s?chain/gi;
12147
+ return regex.test(error.name) || regex.test(error.message);
12148
+ }
12105
12149
 
12106
12150
  // src/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.ts
12107
12151
  var CHECKOUT_CONFIRMATION_UI_ERRORS = {
@@ -12126,6 +12170,11 @@ var CHECKOUT_CONFIRMATION_UI_ERRORS = {
12126
12170
  durationMs: 5e3,
12127
12171
  type: "hint",
12128
12172
  code: "SIGNATURE_DENIED" /* SIGNATURE_DENIED */
12173
+ },
12174
+ SWITCH_CHAIN_ERROR: {
12175
+ message: "Unable to switch chains. Please ensure your wallet supports the chain.",
12176
+ type: "warning",
12177
+ code: "SWITCH_CHAIN_ERROR" /* SWITCH_CHAIN_ERROR */
12129
12178
  }
12130
12179
  };
12131
12180
  function isQuoteExpiredError(error) {
@@ -12138,6 +12187,9 @@ function toCheckoutConfirmationError(error) {
12138
12187
  if (isUserRejectedError(error)) {
12139
12188
  return CHECKOUT_CONFIRMATION_UI_ERRORS.SIGNATURE_DENIED;
12140
12189
  }
12190
+ if (isSwitchChainError(error)) {
12191
+ return CHECKOUT_CONFIRMATION_UI_ERRORS.SWITCH_CHAIN_ERROR;
12192
+ }
12141
12193
  if (error instanceof Error) {
12142
12194
  const confirmationError = CHECKOUT_CONFIRMATION_UI_ERRORS[error.message];
12143
12195
  if (confirmationError) {
@@ -18289,6 +18341,11 @@ var POST_CHECKOUT_UI_ERRORS = {
18289
18341
  message: "Signature declined. Please Confirm Order to retry.",
18290
18342
  type: "hint"
18291
18343
  },
18344
+ SWITCH_CHAIN_ERROR: {
18345
+ disableContinue: false,
18346
+ message: "Unable to switch chains. Please ensure your wallet supports the chain.",
18347
+ type: "warning"
18348
+ },
18292
18349
  ERROR_FUNDING_CHECKOUT: {
18293
18350
  disableContinue: true,
18294
18351
  message: /* @__PURE__ */ React148.createElement(React148.Fragment, null, "An error occurred trying to fund the checkout.", /* @__PURE__ */ React148.createElement("br", null), "Please try again or ", /* @__PURE__ */ React148.createElement(ContactSupportLink, { size: "10" }), " for help."),
@@ -18299,14 +18356,10 @@ function toPostCheckoutError(error) {
18299
18356
  if (isUserRejectedError(error)) {
18300
18357
  return POST_CHECKOUT_UI_ERRORS.SIGNATURE_DENIED;
18301
18358
  }
18359
+ if (isSwitchChainError(error)) {
18360
+ return POST_CHECKOUT_UI_ERRORS.SWITCH_CHAIN_ERROR;
18361
+ }
18302
18362
  if (error instanceof Error) {
18303
- if (error.name === "SwitchChainNotSupportedError") {
18304
- return {
18305
- disableContinue: true,
18306
- message: "An error occurred while switching chains. Please check your wallet or contact support for help.",
18307
- type: "error"
18308
- };
18309
- }
18310
18363
  if (error.message.match(/insufficient balance/i)) {
18311
18364
  return {
18312
18365
  disableContinue: true,
@@ -26120,7 +26173,7 @@ var AccountDetailsScreen = ({
26120
26173
  };
26121
26174
  var FiatAccountDetail = {
26122
26175
  Component: AccountDetailsScreen,
26123
- disableBack: ({ state }) => !state.newUser,
26176
+ disableBack: ({ isSourceNavWidgetEnabled }) => isSourceNavWidgetEnabled,
26124
26177
  onNext(state, _payload) {
26125
26178
  const common = extractCommonState(state);
26126
26179
  return {
@@ -32881,7 +32934,7 @@ function setFunkitConnectVersion({ version }) {
32881
32934
  localStorage.setItem(storageKey5, version);
32882
32935
  }
32883
32936
  function getCurrentSdkVersion() {
32884
- return "5.5.20";
32937
+ return "5.5.21";
32885
32938
  }
32886
32939
  function useFingerprint() {
32887
32940
  const fingerprint = useCallback50(() => {
@@ -8,7 +8,8 @@ export declare enum ConfirmationErrorCode {
8
8
  QUOTE_EXPIRED = "QUOTE_EXPIRED",
9
9
  GENERIC_ERROR = "GENERIC_ERROR",
10
10
  RISK_ERROR = "RISK_ERROR",
11
- SIGNATURE_DENIED = "SIGNATURE_DENIED"
11
+ SIGNATURE_DENIED = "SIGNATURE_DENIED",
12
+ SWITCH_CHAIN_ERROR = "SWITCH_CHAIN_ERROR"
12
13
  }
13
14
  interface UseCheckoutConfirmationOptions {
14
15
  onError(error: CheckoutConfirmationError): void;
@@ -44,6 +44,7 @@ export interface FunkitUiCustomizationsConfig {
44
44
  /** Whether paying by card is a payment method the users can use - defaults to true */
45
45
  isCardEnabled?: boolean;
46
46
  };
47
+ callToActionsUppercase?: boolean;
47
48
  }
48
49
  export declare const DEFAULT_TEXT_CUSTOMIZATIONS: FunkitTextCustomizationsConfig;
49
50
  interface FunkitLoginOptionsConfig {
@@ -1,8 +1,8 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  export declare const ModalSizeOptions: {
3
3
  readonly COMPACT: "compact";
4
- readonly WIDE: "wide";
5
4
  readonly MEDIUM: "medium";
5
+ readonly WIDE: "wide";
6
6
  };
7
7
  export type ModalSizes = (typeof ModalSizeOptions)[keyof typeof ModalSizeOptions];
8
8
  export declare const ModalSizeContext: React.Context<ModalSizes>;
@@ -34,14 +34,31 @@ export declare const flagConfig: {
34
34
  enable_token_transfer: {
35
35
  type: "boolean";
36
36
  default_value: false;
37
- overrides: {
37
+ overrides: ({
38
38
  if_any: {
39
39
  key: "apiKey";
40
40
  type: "isAnyOf";
41
41
  values: string[];
42
42
  }[];
43
43
  value: true;
44
- }[];
44
+ if_all?: undefined;
45
+ } | {
46
+ if_all: ({
47
+ key: "userId";
48
+ type: "isAnyOf";
49
+ values: string[];
50
+ } | {
51
+ key: "apiKey";
52
+ type: "isAnyOf";
53
+ values: string[];
54
+ })[];
55
+ if_any: {
56
+ key: "userId";
57
+ type: "pctRollout";
58
+ pct: number;
59
+ }[];
60
+ value: true;
61
+ })[];
45
62
  };
46
63
  enable_fiat_deposit: {
47
64
  type: "boolean";
@@ -1 +1,2 @@
1
1
  export declare function isUserRejectedError(error: unknown): boolean;
2
+ export declare function isSwitchChainError(error: unknown): boolean;
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bifrostWallet
4
- } from "../chunk-A5N6B5UW.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-UIASLGLV.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  bifrostWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bitgetWallet
4
- } from "../chunk-TDAVGY5F.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-5W7VDOCL.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  bitgetWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bybitWallet
4
- } from "../chunk-2STUC6QL.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-LNEC5RNX.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  bybitWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  clvWallet
4
- } from "../chunk-M3NZ6R2E.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-2GJQ4XZQ.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  clvWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  coin98Wallet
4
- } from "../chunk-OBOVHCEI.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-KIDC67XJ.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  coin98Wallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  coreWallet
4
- } from "../chunk-VR4TBQ6S.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-JCHN6A47.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  coreWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  foxWallet
4
- } from "../chunk-7QONTUXT.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-CNPKISHN.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  foxWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  frontierWallet
4
- } from "../chunk-TCAGNB4B.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-VWCLFMWJ.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  frontierWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  gateWallet
4
- } from "../chunk-FKJJQNKX.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-CJGUM55H.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  gateWallet
9
9
  };
@@ -1,100 +1,100 @@
1
1
  "use client";
2
2
  import {
3
- xdefiWallet
4
- } from "./chunk-BOU4WKRZ.js";
3
+ walletConnectWallet
4
+ } from "./chunk-NP5QGWNL.js";
5
5
  import {
6
6
  zealWallet
7
7
  } from "./chunk-RNBEDQHF.js";
8
8
  import {
9
9
  zerionWallet
10
- } from "./chunk-SULRQO27.js";
10
+ } from "./chunk-Q3H3TRBS.js";
11
11
  import {
12
- subWallet
13
- } from "./chunk-JWFF4AAL.js";
12
+ safepalWallet
13
+ } from "./chunk-EC6CHBSZ.js";
14
14
  import {
15
15
  tahoWallet
16
16
  } from "./chunk-ZZZRUXZE.js";
17
- import {
18
- tokenPocketWallet
19
- } from "./chunk-2L43XSW3.js";
20
17
  import {
21
18
  talismanWallet
22
19
  } from "./chunk-DRO6WYMM.js";
20
+ import {
21
+ tokenPocketWallet
22
+ } from "./chunk-J3LI3FYZ.js";
23
23
  import {
24
24
  tokenaryWallet
25
25
  } from "./chunk-D6AOOO5F.js";
26
- import {
27
- trustWallet
28
- } from "./chunk-VYBAYMP3.js";
29
26
  import {
30
27
  uniswapWallet
31
28
  } from "./chunk-LH7BMNFZ.js";
32
29
  import {
33
- walletConnectWallet
34
- } from "./chunk-NP5QGWNL.js";
30
+ trustWallet
31
+ } from "./chunk-RKPCWHXL.js";
32
+ import {
33
+ xdefiWallet
34
+ } from "./chunk-BOU4WKRZ.js";
35
+ import {
36
+ rabbyWallet
37
+ } from "./chunk-BBOM42DL.js";
35
38
  import {
36
39
  phantomWallet
37
40
  } from "./chunk-362NXNTM.js";
38
41
  import {
39
- rainbowWallet
40
- } from "./chunk-2KUBG3S6.js";
42
+ roninWallet
43
+ } from "./chunk-QLVVUKYB.js";
41
44
  import {
42
- rabbyWallet
43
- } from "./chunk-BBOM42DL.js";
45
+ rainbowWallet
46
+ } from "./chunk-3CICVJUN.js";
44
47
  import {
45
48
  ramperWallet
46
49
  } from "./chunk-BYXPFMI7.js";
47
50
  import {
48
51
  safeWallet
49
52
  } from "./chunk-BQQQL6UD.js";
50
- import {
51
- roninWallet
52
- } from "./chunk-NWIQNBJU.js";
53
53
  import {
54
54
  safeheronWallet
55
55
  } from "./chunk-RZIO5TFF.js";
56
56
  import {
57
- safepalWallet
58
- } from "./chunk-NT2HYJKW.js";
57
+ subWallet
58
+ } from "./chunk-ZSI5N4VV.js";
59
59
  import {
60
60
  ledgerWallet
61
61
  } from "./chunk-BRBKM4PW.js";
62
62
  import {
63
63
  metaMaskWallet
64
- } from "./chunk-2HYNUNAS.js";
64
+ } from "./chunk-UYGJO62F.js";
65
+ import {
66
+ mewWallet
67
+ } from "./chunk-OL5ZO7E4.js";
65
68
  import {
66
69
  oktoWallet
67
70
  } from "./chunk-ADIXAKUL.js";
68
71
  import {
69
72
  okxWallet
70
- } from "./chunk-TDIEHTMB.js";
73
+ } from "./chunk-AFXHGWBH.js";
71
74
  import {
72
75
  omniWallet
73
76
  } from "./chunk-7CUY5G6R.js";
74
- import {
75
- mewWallet
76
- } from "./chunk-OL5ZO7E4.js";
77
77
  import {
78
78
  oneInchWallet
79
79
  } from "./chunk-OESTDX6I.js";
80
80
  import {
81
81
  oneKeyWallet
82
82
  } from "./chunk-SHBUZ7U7.js";
83
+ import {
84
+ foxWallet
85
+ } from "./chunk-CNPKISHN.js";
83
86
  import {
84
87
  frameWallet
85
88
  } from "./chunk-IFON7E6U.js";
86
- import {
87
- foxWallet
88
- } from "./chunk-7QONTUXT.js";
89
89
  import {
90
90
  frontierWallet
91
- } from "./chunk-TCAGNB4B.js";
92
- import {
93
- gateWallet
94
- } from "./chunk-FKJJQNKX.js";
91
+ } from "./chunk-VWCLFMWJ.js";
95
92
  import {
96
93
  imTokenWallet
97
94
  } from "./chunk-COZ7MIQS.js";
95
+ import {
96
+ gateWallet
97
+ } from "./chunk-CJGUM55H.js";
98
98
  import {
99
99
  injectedWallet
100
100
  } from "./chunk-XWUJE7MW.js";
@@ -102,20 +102,20 @@ import {
102
102
  kresusWallet
103
103
  } from "./chunk-MJXPRJZT.js";
104
104
  import {
105
- bybitWallet
106
- } from "./chunk-2STUC6QL.js";
105
+ braveWallet
106
+ } from "./chunk-BPZ2XJO2.js";
107
107
  import {
108
108
  clvWallet
109
- } from "./chunk-M3NZ6R2E.js";
109
+ } from "./chunk-2GJQ4XZQ.js";
110
110
  import {
111
111
  coin98Wallet
112
- } from "./chunk-OBOVHCEI.js";
112
+ } from "./chunk-KIDC67XJ.js";
113
113
  import {
114
114
  coinbaseWallet
115
115
  } from "./chunk-H4IRCEZN.js";
116
116
  import {
117
117
  coreWallet
118
- } from "./chunk-VR4TBQ6S.js";
118
+ } from "./chunk-JCHN6A47.js";
119
119
  import {
120
120
  dawnWallet
121
121
  } from "./chunk-HWPKCIBE.js";
@@ -128,26 +128,26 @@ import {
128
128
  import {
129
129
  argentWallet
130
130
  } from "./chunk-WSQ2YJO2.js";
131
+ import {
132
+ bitgetWallet
133
+ } from "./chunk-5W7VDOCL.js";
134
+ import {
135
+ bitverseWallet
136
+ } from "./chunk-3HZRRP4Y.js";
131
137
  import {
132
138
  bifrostWallet
133
- } from "./chunk-A5N6B5UW.js";
139
+ } from "./chunk-UIASLGLV.js";
134
140
  import {
135
141
  bitskiWallet
136
142
  } from "./chunk-HS3C7OQV.js";
137
- import {
138
- bitgetWallet
139
- } from "./chunk-TDAVGY5F.js";
140
143
  import {
141
144
  bloomWallet
142
145
  } from "./chunk-S27IADFU.js";
143
146
  import {
144
- bitverseWallet
145
- } from "./chunk-3HZRRP4Y.js";
146
- import "./chunk-23WIEY36.js";
147
- import {
148
- braveWallet
149
- } from "./chunk-BPZ2XJO2.js";
147
+ bybitWallet
148
+ } from "./chunk-LNEC5RNX.js";
150
149
  import "./chunk-DNSG5Q7V.js";
150
+ import "./chunk-23WIEY36.js";
151
151
  export {
152
152
  argentWallet,
153
153
  bifrostWallet,
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  metaMaskWallet
4
- } from "../chunk-2HYNUNAS.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-UYGJO62F.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  metaMaskWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  okxWallet
4
- } from "../chunk-TDIEHTMB.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-AFXHGWBH.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  okxWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  rainbowWallet
4
- } from "../chunk-2KUBG3S6.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-3CICVJUN.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  rainbowWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  roninWallet
4
- } from "../chunk-NWIQNBJU.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-QLVVUKYB.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  roninWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  safepalWallet
4
- } from "../chunk-NT2HYJKW.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-EC6CHBSZ.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  safepalWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  subWallet
4
- } from "../chunk-JWFF4AAL.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-ZSI5N4VV.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  subWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  tokenPocketWallet
4
- } from "../chunk-2L43XSW3.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-J3LI3FYZ.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  tokenPocketWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  trustWallet
4
- } from "../chunk-VYBAYMP3.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-RKPCWHXL.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  trustWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  zerionWallet
4
- } from "../chunk-SULRQO27.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-Q3H3TRBS.js";
6
5
  import "../chunk-DNSG5Q7V.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  zerionWallet
9
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "5.5.20",
3
+ "version": "5.5.21",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -89,12 +89,12 @@
89
89
  "ua-parser-js": "^1.0.37",
90
90
  "use-debounce": "^10.0.5",
91
91
  "uuid": "^9.0.1",
92
- "@funkit/api-base": "1.9.9",
93
- "@funkit/chains": "0.3.6",
94
- "@funkit/core": "2.3.33",
92
+ "@funkit/api-base": "1.9.10",
93
+ "@funkit/core": "2.3.34",
95
94
  "@funkit/fun-relay": "0.1.12",
96
- "@funkit/utils": "1.1.7",
97
- "@funkit/wagmi-tools": "3.0.55"
95
+ "@funkit/chains": "0.3.6",
96
+ "@funkit/utils": "1.1.8",
97
+ "@funkit/wagmi-tools": "3.0.56"
98
98
  },
99
99
  "repository": {
100
100
  "type": "git",