@funkit/connect 9.28.0 → 9.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 9.28.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1d867b3: Fix Aave supply health factor showing an inflated value while the quote loads
8
+ - 2d5650d: Show the exact withdrawable balance on withdrawal cash methods instead of a rounded-down limit
9
+ - Updated dependencies [ec71a28]
10
+ - Updated dependencies [2d5650d]
11
+ - @funkit/chains@2.1.2
12
+ - @funkit/connect-core@1.6.0
13
+
3
14
  ## 9.28.0
4
15
 
5
16
  ### Minor Changes
@@ -5,10 +5,10 @@ import {
5
5
  import {
6
6
  useFunkitConfig
7
7
  } from "./chunk-CGHPNWIF.js";
8
- import "./chunk-UPZNKPYU.js";
9
8
  import {
10
9
  Box
11
10
  } from "./chunk-LUHEVXPD.js";
11
+ import "./chunk-UPZNKPYU.js";
12
12
  import {
13
13
  useFunkitTranslation
14
14
  } from "./chunk-STLOQEN7.js";
@@ -3,8 +3,8 @@ import {
3
3
  PolymarketDepositAccountDropdown
4
4
  } from "../chunk-4O4YAFYK.js";
5
5
  import "../chunk-CGHPNWIF.js";
6
- import "../chunk-UPZNKPYU.js";
7
6
  import "../chunk-LUHEVXPD.js";
7
+ import "../chunk-UPZNKPYU.js";
8
8
  import "../chunk-STLOQEN7.js";
9
9
  import "../chunk-TQVRP3Z2.js";
10
10
  import "../chunk-7LKK5QMZ.js";
@@ -3,8 +3,8 @@ import {
3
3
  PolymarketDepositAccountDropdown
4
4
  } from "../chunk-4O4YAFYK.js";
5
5
  import "../chunk-CGHPNWIF.js";
6
- import "../chunk-UPZNKPYU.js";
7
6
  import "../chunk-LUHEVXPD.js";
7
+ import "../chunk-UPZNKPYU.js";
8
8
  import "../chunk-STLOQEN7.js";
9
9
  import {
10
10
  POLYMARKET_PERPS_ROUTING_ID,
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- lightTheme
4
- } from "./chunk-67BKQQNG.js";
5
2
  import {
6
3
  darkTheme
7
4
  } from "./chunk-36KVHK22.js";
5
+ import {
6
+ lightTheme
7
+ } from "./chunk-67BKQQNG.js";
8
8
  import {
9
9
  systemFontStack
10
10
  } from "./chunk-4YEAUICE.js";
@@ -1681,7 +1681,7 @@ function setFunkitConnectVersion({ version }) {
1681
1681
  localStorage.setItem(storageKey, version);
1682
1682
  }
1683
1683
  function getCurrentSdkVersion() {
1684
- return "9.28.0";
1684
+ return "9.28.1";
1685
1685
  }
1686
1686
  function useFingerprint() {
1687
1687
  const fingerprint = useCallback3(() => {
@@ -27391,6 +27391,7 @@ var WithdrawContent = ({
27391
27391
  };
27392
27392
 
27393
27393
  // src/modals/WithdrawalModal/WithdrawalMethodSelect.tsx
27394
+ import { getWithdrawalFopsLimit } from "@funkit/connect-core";
27394
27395
  import React139 from "react";
27395
27396
 
27396
27397
  // src/hooks/queries/useWithdrawFops.ts
@@ -27742,6 +27743,7 @@ function FormOfPaymentsContent({
27742
27743
  selectedFop,
27743
27744
  onFopSelect,
27744
27745
  exchangeRatesData,
27746
+ getDisclaimerLimit,
27745
27747
  defaultMaxItems,
27746
27748
  enableSourceGroupLabels,
27747
27749
  isDisabled,
@@ -27792,7 +27794,7 @@ function FormOfPaymentsContent({
27792
27794
  {
27793
27795
  key: fop.embeddedFlowUrl || fop.fopType,
27794
27796
  fop,
27795
- disclaimerLimit: getFopsLimit(fop, exchangeRatesData),
27797
+ disclaimerLimit: getDisclaimerLimit(fop, exchangeRatesData),
27796
27798
  isActive: selectedFop?.embeddedFlowUrl === fop.embeddedFlowUrl,
27797
27799
  onClick: () => onFopSelect(fop),
27798
27800
  disabled: isDisabled,
@@ -27827,6 +27829,7 @@ function FormOfPaymentsList({
27827
27829
  selectedFop,
27828
27830
  onFopSelect,
27829
27831
  exchangeRatesData,
27832
+ getDisclaimerLimit = getFopsLimit,
27830
27833
  enableSourceGroupLabels,
27831
27834
  isDisabled,
27832
27835
  isBelowMinimumBalance
@@ -27858,6 +27861,7 @@ function FormOfPaymentsList({
27858
27861
  selectedFop,
27859
27862
  onFopSelect,
27860
27863
  exchangeRatesData,
27864
+ getDisclaimerLimit,
27861
27865
  defaultMaxItems,
27862
27866
  enableSourceGroupLabels,
27863
27867
  isDisabled,
@@ -27964,6 +27968,7 @@ function WithdrawalMethodSelect({
27964
27968
  isLoading: withdrawFops.isLoading || exchangeRates.isLoading,
27965
27969
  onFopSelect: onCashFopSelect,
27966
27970
  exchangeRatesData: exchangeRates.data,
27971
+ getDisclaimerLimit: getWithdrawalFopsLimit,
27967
27972
  enableSourceGroupLabels: false,
27968
27973
  isBelowMinimumBalance
27969
27974
  }
@@ -35027,7 +35032,7 @@ function ConfirmationStep({
35027
35032
  const healthFactorInfo = resolveHealthFactor ? {
35028
35033
  before: resolvedHealthFactor?.before ?? null,
35029
35034
  after: resolvedHealthFactor?.after ?? null,
35030
- isLoading: !resolvedHealthFactor && isQuoteLoading
35035
+ isLoading: isQuoteLoading
35031
35036
  } : void 0;
35032
35037
  const isExactIn = quoteBuilder.isExactIn();
35033
35038
  const hasStaticPrimaryInfoValue = isExactIn && checkoutItem?.inputFiatAmount != null || !isExactIn && !!checkoutConfig?.targetAssetAmount && isStablecoin(checkoutConfig.targetAssetTicker);
@@ -8,6 +8,12 @@ interface FormOfPaymentsListProps {
8
8
  exchangeRatesData?: ExchangeRates;
9
9
  enableSourceGroupLabels: boolean;
10
10
  isDisabled?: boolean;
11
+ /**
12
+ * Maps a FOP to its disclaimer-limit string. Defaults to the rounded deposit
13
+ * limit (getFopsLimit); the withdrawal off-ramp passes getWithdrawalFopsLimit
14
+ * so the user's exact withdrawable balance isn't rounded down.
15
+ */
16
+ getDisclaimerLimit?: (fop: SwappedFormOfPayment, exchangeRates: ExchangeRates | undefined) => string;
11
17
  /**
12
18
  * Withdrawal off-ramp only: balance is below the cash sell minimum, so every
13
19
  * cash method is disabled with a "Low Balance" badge. A single flag is enough
@@ -24,5 +30,5 @@ export declare function getFormOfPaymentSections(fopsData: GetFopsResponse, fopP
24
30
  primary: FormOfPaymentSection;
25
31
  secondary: FormOfPaymentSection;
26
32
  };
27
- export declare function FormOfPaymentsList({ fopsData, isLoading, selectedFop, onFopSelect, exchangeRatesData, enableSourceGroupLabels, isDisabled, isBelowMinimumBalance, }: FormOfPaymentsListProps): React.JSX.Element;
33
+ export declare function FormOfPaymentsList({ fopsData, isLoading, selectedFop, onFopSelect, exchangeRatesData, getDisclaimerLimit, enableSourceGroupLabels, isDisabled, isBelowMinimumBalance, }: FormOfPaymentsListProps): React.JSX.Element;
28
34
  export {};
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
- zealWallet
4
- } from "./chunk-52QXXLDS.js";
3
+ xdefiWallet
4
+ } from "./chunk-JN5I3DNC.js";
5
5
  import {
6
6
  zerionWallet
7
7
  } from "./chunk-RVOY537T.js";
@@ -27,8 +27,8 @@ import {
27
27
  walletConnectWallet
28
28
  } from "./chunk-3FCWJRI4.js";
29
29
  import {
30
- xdefiWallet
31
- } from "./chunk-JN5I3DNC.js";
30
+ zealWallet
31
+ } from "./chunk-52QXXLDS.js";
32
32
  import {
33
33
  rabbyWallet
34
34
  } from "./chunk-RB66PKPA.js";
@@ -53,21 +53,21 @@ import {
53
53
  import {
54
54
  subWallet
55
55
  } from "./chunk-X6CGV36L.js";
56
- import {
57
- ledgerWallet
58
- } from "./chunk-RPV27V2Y.js";
59
56
  import {
60
57
  mewWallet
61
58
  } from "./chunk-MQM45ADF.js";
59
+ import {
60
+ metaMaskWallet
61
+ } from "./chunk-CCQV2ZET.js";
62
+ import {
63
+ oktoWallet
64
+ } from "./chunk-YWOVAU6O.js";
62
65
  import {
63
66
  okxWallet
64
67
  } from "./chunk-STVVP43G.js";
65
68
  import {
66
69
  omniWallet
67
70
  } from "./chunk-2CX7LX4J.js";
68
- import {
69
- oktoWallet
70
- } from "./chunk-YWOVAU6O.js";
71
71
  import {
72
72
  oneInchWallet
73
73
  } from "./chunk-QG6ZHI7B.js";
@@ -77,12 +77,15 @@ import {
77
77
  import {
78
78
  phantomWallet
79
79
  } from "./chunk-QY53O7WG.js";
80
- import {
81
- frontierWallet
82
- } from "./chunk-YEZM4CK4.js";
83
80
  import {
84
81
  foxWallet
85
82
  } from "./chunk-MIQTHJ6X.js";
83
+ import {
84
+ frameWallet
85
+ } from "./chunk-BU3ZAT5X.js";
86
+ import {
87
+ frontierWallet
88
+ } from "./chunk-YEZM4CK4.js";
86
89
  import {
87
90
  gateWallet
88
91
  } from "./chunk-HNRB7KJU.js";
@@ -96,23 +99,20 @@ import {
96
99
  kresusWallet
97
100
  } from "./chunk-RICTB3FA.js";
98
101
  import {
99
- metaMaskWallet
100
- } from "./chunk-CCQV2ZET.js";
101
- import {
102
- frameWallet
103
- } from "./chunk-BU3ZAT5X.js";
104
- import {
105
- argentWallet
106
- } from "./chunk-NTMBEOR2.js";
102
+ ledgerWallet
103
+ } from "./chunk-RPV27V2Y.js";
107
104
  import {
108
- braveWallet
109
- } from "./chunk-DS73TZ6O.js";
105
+ clvWallet
106
+ } from "./chunk-UK7C2JXW.js";
110
107
  import {
111
108
  coin98Wallet
112
109
  } from "./chunk-6BW3HLBG.js";
113
110
  import {
114
111
  coinbaseWallet
115
112
  } from "./chunk-2DLDAZRH.js";
113
+ import {
114
+ braveWallet
115
+ } from "./chunk-DS73TZ6O.js";
116
116
  import {
117
117
  coreWallet
118
118
  } from "./chunk-RB3HR4R2.js";
@@ -125,6 +125,9 @@ import {
125
125
  import {
126
126
  enkryptWallet
127
127
  } from "./chunk-HBQK5RD5.js";
128
+ import {
129
+ argentWallet
130
+ } from "./chunk-NTMBEOR2.js";
128
131
  import {
129
132
  bifrostWallet
130
133
  } from "./chunk-4T6ZSRJF.js";
@@ -143,9 +146,6 @@ import {
143
146
  import {
144
147
  bybitWallet
145
148
  } from "./chunk-F5XEEVG6.js";
146
- import {
147
- clvWallet
148
- } from "./chunk-UK7C2JXW.js";
149
149
  import "./chunk-OLZ7626J.js";
150
150
  import "./chunk-N4IJLYFY.js";
151
151
  import "./chunk-IGKXZBTA.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "9.28.0",
3
+ "version": "9.28.1",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -112,8 +112,8 @@
112
112
  "use-debounce": "^10.0.5",
113
113
  "uuid": "^11.1.1",
114
114
  "@funkit/api-base": "5.2.0",
115
- "@funkit/chains": "2.1.1",
116
- "@funkit/connect-core": "1.5.0",
115
+ "@funkit/chains": "2.1.2",
116
+ "@funkit/connect-core": "1.6.0",
117
117
  "@funkit/fun-relay": "2.9.0",
118
118
  "@funkit/utils": "4.0.0"
119
119
  },