@funkit/connect 12.18.0 → 12.18.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,14 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 12.18.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f03d203: Convert's collapsed transaction breakdown now previews the price impact (plus gas on Ethereum mainnet) before it is expanded.
8
+ - Updated dependencies [1e0e550]
9
+ - @funkit/api-base@9.1.1
10
+ - @funkit/connect-core@10.0.1
11
+
3
12
  ## 12.18.0
4
13
 
5
14
  ### Minor Changes
@@ -5,7 +5,6 @@ import {
5
5
  import {
6
6
  PLACEHOLDER_FUNKIT_USER_INFO
7
7
  } from "../../chunk-CE42WHAA.js";
8
- import "../../chunk-LICTGZXW.js";
9
8
  import "../../chunk-R25GIAD5.js";
10
9
  import {
11
10
  useFunkitConfig
@@ -13,6 +12,7 @@ import {
13
12
  import {
14
13
  useFunkitTranslation
15
14
  } from "../../chunk-L6JL2XJY.js";
15
+ import "../../chunk-LICTGZXW.js";
16
16
  import "../../chunk-2W2P3OS6.js";
17
17
  import "../../chunk-YSAAJSWT.js";
18
18
  import {
@@ -20,8 +20,10 @@ interface PaymentFeesSummaryProps {
20
20
  * - Display-only: excluded from the total, expandability and analytics.
21
21
  */
22
22
  extraFeeItems?: FeeItem[];
23
+ /** Overrides `confirmationScreen.showTransactionDigest` for screens that always want the collapsed preview */
24
+ isFeePreviewEnabled?: boolean;
23
25
  }
24
- export declare function PaymentFeesSummary({ isLoading, quote, fallbackFees, isWithdrawal, valuesNotAvailable, extraSourceChainGasUsd, step, extraFeeItems, }: PaymentFeesSummaryProps): React.JSX.Element;
26
+ export declare function PaymentFeesSummary({ isLoading, quote, fallbackFees, isWithdrawal, valuesNotAvailable, extraSourceChainGasUsd, step, extraFeeItems, isFeePreviewEnabled, }: PaymentFeesSummaryProps): React.JSX.Element;
25
27
  export interface FeeItem {
26
28
  label: string;
27
29
  value: string;
package/dist/index.js CHANGED
@@ -113,7 +113,7 @@ function setFunkitConnectVersion({ version }) {
113
113
  localStorage.setItem(storageKey, version);
114
114
  }
115
115
  function getCurrentSdkVersion() {
116
- return "12.18.0";
116
+ return "12.18.1";
117
117
  }
118
118
  function useFingerprint() {
119
119
  const fingerprint = useCallback(() => {
@@ -21446,10 +21446,9 @@ function translateAppFeeLabel(appFeeLabel, t) {
21446
21446
  };
21447
21447
  return feeLabelMap[appFeeLabel] ?? t("fees.funxyzFee");
21448
21448
  }
21449
- function computeDigest(relayQuoteMetadata, uiCustomizations, totalPriceImpactPercent, gasUsd) {
21450
- const showTransactionDigest = uiCustomizations.confirmationScreen.showTransactionDigest;
21449
+ function computeDigest(relayQuoteMetadata, isPaymentFeePreviewEnabled, totalPriceImpactPercent, gasUsd) {
21451
21450
  const details = relayQuoteMetadata.relayQuote.details;
21452
- if (showTransactionDigest === "none") {
21451
+ if (!isPaymentFeePreviewEnabled) {
21453
21452
  return {
21454
21453
  isMainnet: false,
21455
21454
  value: void 0
@@ -21470,6 +21469,7 @@ function renderRelayFee({
21470
21469
  uiCustomizations,
21471
21470
  checkoutConfig,
21472
21471
  extraSourceChainGasUsd,
21472
+ isPaymentFeePreviewEnabled,
21473
21473
  t
21474
21474
  }) {
21475
21475
  const {
@@ -21524,7 +21524,7 @@ function renderRelayFee({
21524
21524
  const translatedAppFeeLabel = translateAppFeeLabel(appFeeLabel, t);
21525
21525
  const { isMainnet, value: collapsedValue } = computeDigest(
21526
21526
  relayQuoteMetadata,
21527
- uiCustomizations,
21527
+ isPaymentFeePreviewEnabled,
21528
21528
  totalPriceImpactPercent,
21529
21529
  totalNetworkCostUsd
21530
21530
  );
@@ -21657,6 +21657,7 @@ var extractFeeItems = ({
21657
21657
  uiCustomizations,
21658
21658
  checkoutConfig,
21659
21659
  extraSourceChainGasUsd,
21660
+ isPaymentFeePreviewEnabled,
21660
21661
  t
21661
21662
  }) => {
21662
21663
  if (relayQuoteMetadata) {
@@ -21668,6 +21669,7 @@ var extractFeeItems = ({
21668
21669
  uiCustomizations,
21669
21670
  checkoutConfig,
21670
21671
  extraSourceChainGasUsd,
21672
+ isPaymentFeePreviewEnabled,
21671
21673
  t
21672
21674
  });
21673
21675
  }
@@ -21734,7 +21736,8 @@ function PaymentFeesSummary({
21734
21736
  valuesNotAvailable = false,
21735
21737
  extraSourceChainGasUsd = 0,
21736
21738
  step,
21737
- extraFeeItems
21739
+ extraFeeItems,
21740
+ isFeePreviewEnabled
21738
21741
  }) {
21739
21742
  const { t } = useFunkitTranslation();
21740
21743
  const controls = useAnimationControls2();
@@ -21745,6 +21748,7 @@ function PaymentFeesSummary({
21745
21748
  const logEventV2 = useTrackV2();
21746
21749
  const { connectorId } = useGeneralWallet();
21747
21750
  const isExpandingRef = useRef19(false);
21751
+ const isPaymentFeePreviewEnabled = isFeePreviewEnabled ?? uiCustomizations.confirmationScreen.showTransactionDigest === "chainDependent";
21748
21752
  const toggleIsExpanded = async () => {
21749
21753
  if (valuesNotAvailable || isExpandingRef.current) {
21750
21754
  return;
@@ -21808,6 +21812,7 @@ function PaymentFeesSummary({
21808
21812
  uiCustomizations,
21809
21813
  checkoutConfig: checkoutItem?.initSettings.config,
21810
21814
  extraSourceChainGasUsd,
21815
+ isPaymentFeePreviewEnabled,
21811
21816
  t
21812
21817
  });
21813
21818
  }, [
@@ -21816,6 +21821,7 @@ function PaymentFeesSummary({
21816
21821
  uiCustomizations,
21817
21822
  checkoutItem,
21818
21823
  extraSourceChainGasUsd,
21824
+ isPaymentFeePreviewEnabled,
21819
21825
  t
21820
21826
  ]);
21821
21827
  const isExpandable = expandedItems.length > 0 && !isLoading && !valuesNotAvailable;
@@ -47649,7 +47655,8 @@ function ConvertStep({
47649
47655
  isLoading: view.isQuoteLoading,
47650
47656
  quote: quote?.checkoutQuote,
47651
47657
  isWithdrawal: false,
47652
- step: "convert" /* CONVERT */
47658
+ step: "convert" /* CONVERT */,
47659
+ isFeePreviewEnabled: true
47653
47660
  }
47654
47661
  ), titleCountdownRef && createPortal12(countdown, titleCountdownRef), bottomSectionRef && createPortal12(
47655
47662
  /* @__PURE__ */ React256.createElement(
@@ -1,67 +1,61 @@
1
1
  "use client";
2
2
  import {
3
- xdefiWallet
4
- } from "./chunk-HXX4PRE2.js";
5
- import {
6
- zerionWallet
7
- } from "./chunk-34B7OJNT.js";
3
+ tokenaryWallet
4
+ } from "./chunk-TPM5PUJD.js";
8
5
  import {
9
6
  zealWallet
10
7
  } from "./chunk-GLX5FULK.js";
11
8
  import {
12
- subWallet
13
- } from "./chunk-XODA5ESL.js";
9
+ zerionWallet
10
+ } from "./chunk-34B7OJNT.js";
11
+ import {
12
+ tahoWallet
13
+ } from "./chunk-U74RFZOL.js";
14
14
  import {
15
15
  talismanWallet
16
16
  } from "./chunk-IAYYWCVB.js";
17
+ import {
18
+ safepalWallet
19
+ } from "./chunk-BBB2J3US.js";
17
20
  import {
18
21
  tokenPocketWallet
19
22
  } from "./chunk-NXWG6FG2.js";
20
- import {
21
- tahoWallet
22
- } from "./chunk-U74RFZOL.js";
23
- import {
24
- tokenaryWallet
25
- } from "./chunk-TPM5PUJD.js";
26
23
  import {
27
24
  uniswapWallet
28
25
  } from "./chunk-UNDWHCDH.js";
29
- import {
30
- trustWallet
31
- } from "./chunk-SR5CZR3L.js";
32
26
  import {
33
27
  walletConnectWallet
34
28
  } from "./chunk-DUX4XCDV.js";
35
29
  import {
36
- phantomWallet
37
- } from "./chunk-Q27YVDDH.js";
30
+ xdefiWallet
31
+ } from "./chunk-HXX4PRE2.js";
32
+ import {
33
+ trustWallet
34
+ } from "./chunk-SR5CZR3L.js";
38
35
  import {
39
36
  rabbyWallet
40
37
  } from "./chunk-RQ2GXOJL.js";
38
+ import {
39
+ omniWallet
40
+ } from "./chunk-2TAUCVX7.js";
41
41
  import {
42
42
  rainbowWallet
43
43
  } from "./chunk-ZSSSLFQF.js";
44
- import {
45
- roninWallet
46
- } from "./chunk-IA5432IR.js";
47
44
  import {
48
45
  ramperWallet
49
46
  } from "./chunk-GPXIBTWN.js";
50
- import {
51
- safepalWallet
52
- } from "./chunk-BBB2J3US.js";
53
47
  import {
54
48
  safeWallet
55
49
  } from "./chunk-IR3PJMVM.js";
50
+ import {
51
+ roninWallet
52
+ } from "./chunk-IA5432IR.js";
56
53
  import {
57
54
  safeheronWallet
58
55
  } from "./chunk-UN3ONVNC.js";
59
56
  import {
60
- mewWallet
61
- } from "./chunk-DSPQXAB2.js";
62
- import {
63
- ledgerWallet
64
- } from "./chunk-BL4OC2EJ.js";
57
+ subWallet
58
+ } from "./chunk-XODA5ESL.js";
65
59
  import {
66
60
  metaMaskWallet
67
61
  } from "./chunk-RXRYHMRI.js";
@@ -69,8 +63,11 @@ import {
69
63
  oktoWallet
70
64
  } from "./chunk-V4M3SNPS.js";
71
65
  import {
72
- omniWallet
73
- } from "./chunk-2TAUCVX7.js";
66
+ mewWallet
67
+ } from "./chunk-DSPQXAB2.js";
68
+ import {
69
+ ledgerWallet
70
+ } from "./chunk-BL4OC2EJ.js";
74
71
  import {
75
72
  okxWallet
76
73
  } from "./chunk-CU5J53XR.js";
@@ -81,20 +78,23 @@ import {
81
78
  oneKeyWallet
82
79
  } from "./chunk-KN32ITJ7.js";
83
80
  import {
84
- enkryptWallet
85
- } from "./chunk-Z6LDN2AN.js";
81
+ phantomWallet
82
+ } from "./chunk-Q27YVDDH.js";
83
+ import {
84
+ customWallet
85
+ } from "./chunk-VKM5M5UK.js";
86
86
  import {
87
87
  foxWallet
88
88
  } from "./chunk-U52QO5HF.js";
89
89
  import {
90
90
  frameWallet
91
91
  } from "./chunk-B572YIAQ.js";
92
- import {
93
- gateWallet
94
- } from "./chunk-YRMBR6NA.js";
95
92
  import {
96
93
  frontierWallet
97
94
  } from "./chunk-IWOMSW64.js";
95
+ import {
96
+ gateWallet
97
+ } from "./chunk-YRMBR6NA.js";
98
98
  import {
99
99
  imTokenWallet
100
100
  } from "./chunk-YY2JA23M.js";
@@ -104,52 +104,52 @@ import {
104
104
  import {
105
105
  kresusWallet
106
106
  } from "./chunk-V77ATGZT.js";
107
+ import {
108
+ bybitWallet
109
+ } from "./chunk-BBDNB5TQ.js";
107
110
  import {
108
111
  clvWallet
109
112
  } from "./chunk-4FHNLTR3.js";
110
113
  import {
111
114
  coin98Wallet
112
115
  } from "./chunk-RFCZYLNR.js";
116
+ import {
117
+ coinbaseWallet
118
+ } from "./chunk-SM2A3OSG.js";
113
119
  import {
114
120
  coreWallet
115
121
  } from "./chunk-TRZDAXCQ.js";
116
122
  import {
117
- coinbaseWallet
118
- } from "./chunk-SM2A3OSG.js";
123
+ desigWallet
124
+ } from "./chunk-DFHP75HV.js";
119
125
  import {
120
126
  dawnWallet
121
127
  } from "./chunk-LV6YV3DE.js";
122
128
  import {
123
- customWallet
124
- } from "./chunk-VKM5M5UK.js";
125
- import {
126
- bitverseWallet
127
- } from "./chunk-5AEWIKRA.js";
129
+ enkryptWallet
130
+ } from "./chunk-Z6LDN2AN.js";
128
131
  import {
129
- desigWallet
130
- } from "./chunk-DFHP75HV.js";
132
+ argentWallet
133
+ } from "./chunk-XSDTNMQY.js";
131
134
  import {
132
135
  bifrostWallet
133
136
  } from "./chunk-ALGPGI6V.js";
137
+ import {
138
+ bitverseWallet
139
+ } from "./chunk-5AEWIKRA.js";
134
140
  import {
135
141
  bitgetWallet
136
142
  } from "./chunk-HOCKAU5H.js";
137
- import {
138
- bitskiWallet
139
- } from "./chunk-NPITCCJE.js";
140
- import {
141
- argentWallet
142
- } from "./chunk-XSDTNMQY.js";
143
143
  import {
144
144
  bloomWallet
145
145
  } from "./chunk-PNHDOC77.js";
146
+ import "./chunk-AALSJCUR.js";
147
+ import {
148
+ bitskiWallet
149
+ } from "./chunk-NPITCCJE.js";
146
150
  import {
147
151
  braveWallet
148
152
  } from "./chunk-U2XXV45G.js";
149
- import {
150
- bybitWallet
151
- } from "./chunk-BBDNB5TQ.js";
152
- import "./chunk-AALSJCUR.js";
153
153
  import "./chunk-EYWGX5LT.js";
154
154
  import "./chunk-B454LLKJ.js";
155
155
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "12.18.0",
3
+ "version": "12.18.1",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -119,11 +119,11 @@
119
119
  "ua-parser-js": "^1.0.37",
120
120
  "use-debounce": "^10.0.5",
121
121
  "uuid": "^11.1.1",
122
- "@funkit/api-base": "9.1.0",
122
+ "@funkit/api-base": "9.1.1",
123
123
  "@funkit/chains": "2.6.0",
124
- "@funkit/connect-core": "10.0.0",
125
- "@funkit/fun-relay": "3.2.0",
126
- "@funkit/utils": "5.1.0"
124
+ "@funkit/connect-core": "10.0.1",
125
+ "@funkit/utils": "5.1.0",
126
+ "@funkit/fun-relay": "3.2.0"
127
127
  },
128
128
  "repository": {
129
129
  "type": "git",