@funkit/connect 6.15.6 → 6.15.7
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
|
+
## 6.15.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d0ab683: fix(connect): fix copy animation in buy_eng mode
|
|
8
|
+
- 0c3f602: fix(connect): fix "Buy with" label on confirmation screen
|
|
9
|
+
- 940011e: fix(connect): hide "you receive" on brokerage processing screen and redirect to destination instead of source for same assets checkouts
|
|
10
|
+
- 62753c3: fix(connect): fix MON token symbol
|
|
11
|
+
|
|
3
12
|
## 6.15.6
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import type { MergedMultiStepDirectExecution } from '~/hooks/queries/useRecentDirectExecutions';
|
|
4
4
|
import type { TextConfigStatus, TextConfigSteps } from '../TransactionStatus/TransactionStatus';
|
|
5
5
|
import type { FunDirectExecutionStatusProps } from './FunDirectExecutionStatus';
|
|
6
|
-
export declare function FunDirectExecutionHistoryDetail({ bottomBarId, directExecution, isActiveCheckout, onClose, onAnimationComplete, showCheckoutStatus, customTextConfigStatus, customTextConfigSteps, dangerousCustomDelayedAutoTriggerCutoff, disableAutoUpdate, }: {
|
|
6
|
+
export declare function FunDirectExecutionHistoryDetail({ bottomBarId, directExecution, isActiveCheckout, onClose, onAnimationComplete, showCheckoutStatus, customTextConfigStatus, customTextConfigSteps, dangerousCustomDelayedAutoTriggerCutoff, disableAutoUpdate, hideYouReceive, }: {
|
|
7
7
|
bottomBarId: string;
|
|
8
8
|
directExecution: DirectExecution;
|
|
9
9
|
isActiveCheckout: boolean;
|
|
@@ -25,6 +25,7 @@ export declare function FunDirectExecutionHistoryDetail({ bottomBarId, directExe
|
|
|
25
25
|
* If you want to disable this, set this to true.
|
|
26
26
|
*/
|
|
27
27
|
disableAutoUpdate?: boolean;
|
|
28
|
+
hideYouReceive?: boolean;
|
|
28
29
|
}): React.JSX.Element;
|
|
29
30
|
export declare function DirectExecutionOrderDetailSection({ directExecution, disabled, }: {
|
|
30
31
|
directExecution: MergedMultiStepDirectExecution;
|
package/dist/index.js
CHANGED
|
@@ -1514,7 +1514,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
1514
1514
|
localStorage.setItem(storageKey, version);
|
|
1515
1515
|
}
|
|
1516
1516
|
function getCurrentSdkVersion() {
|
|
1517
|
-
return "6.15.
|
|
1517
|
+
return "6.15.7";
|
|
1518
1518
|
}
|
|
1519
1519
|
function useFingerprint() {
|
|
1520
1520
|
const fingerprint = useCallback2(() => {
|
|
@@ -7039,7 +7039,8 @@ var ASSET_LOGO_SRCS = {
|
|
|
7039
7039
|
WVLP: "https://sdk-cdn.fun.xyz/images/wvlp.svg",
|
|
7040
7040
|
LIQUIDHYPE: "https://sdk-cdn.fun.xyz/images/liquidhype.svg",
|
|
7041
7041
|
VHYPE: "https://sdk-cdn.fun.xyz/images/vhype.png",
|
|
7042
|
-
HBHYPE: "https://sdk-cdn.fun.xyz/images/hbhype.svg"
|
|
7042
|
+
HBHYPE: "https://sdk-cdn.fun.xyz/images/hbhype.svg",
|
|
7043
|
+
MON: "https://sdk-cdn.fun.xyz/images/monad.svg"
|
|
7043
7044
|
};
|
|
7044
7045
|
var FALLBACK_ASSET = "https://sdk-cdn.fun.xyz/images/dollar_circle.png";
|
|
7045
7046
|
function getAssetLogoSrc(symbol) {
|
|
@@ -15715,6 +15716,9 @@ var ConnectedMeshPaymentMethodItem = ({
|
|
|
15715
15716
|
} = useBluvoExchangeBalance({ exchange: paymentMethodInfo.exchange });
|
|
15716
15717
|
const sourceBalance = assetHoldings ? getTotalAssetBalance(assetHoldings) : 0;
|
|
15717
15718
|
const label = usePaymentMethodInfoLabel(paymentMethodInfo);
|
|
15719
|
+
const keyText = t("sourceChange.brokerageDisplayLabel", {
|
|
15720
|
+
brokerageLabel: label.text
|
|
15721
|
+
});
|
|
15718
15722
|
const { estimatedTimeText } = useCheckoutTimeEstimate(
|
|
15719
15723
|
apiKey,
|
|
15720
15724
|
null,
|
|
@@ -15745,7 +15749,7 @@ var ConnectedMeshPaymentMethodItem = ({
|
|
|
15745
15749
|
isError: !!isBalanceError,
|
|
15746
15750
|
isActive: isSelected,
|
|
15747
15751
|
keyIcon: icon,
|
|
15748
|
-
keyText
|
|
15752
|
+
keyText,
|
|
15749
15753
|
valueIcon: isSelected && showSelectedCheckmark && /* @__PURE__ */ React79.createElement(CheckIcon, null),
|
|
15750
15754
|
onClick: onSelect,
|
|
15751
15755
|
disclaimerText
|
|
@@ -15912,13 +15916,16 @@ var ActiveFiatAccountPaymentMethodItem = ({
|
|
|
15912
15916
|
const { t } = useFunkitTranslation();
|
|
15913
15917
|
const label = usePaymentMethodInfoLabel(paymentMethodInfo);
|
|
15914
15918
|
const customerStatus = paymentMethodInfo.bridgeCustomer?.status;
|
|
15919
|
+
const keyText = t("sourceChange.virtualFiatDisplayLabel", {
|
|
15920
|
+
virtualFiatLabel: label.text
|
|
15921
|
+
});
|
|
15915
15922
|
return /* @__PURE__ */ React79.createElement(
|
|
15916
15923
|
FunPaymentMethodItem,
|
|
15917
15924
|
{
|
|
15918
15925
|
isActive,
|
|
15919
15926
|
keyIcon: label.icon,
|
|
15920
15927
|
valueIcon: customValueIcon ?? (customerStatus === BridgeCustomerStatus3.OFFBOARDED && /* @__PURE__ */ React79.createElement(BridgeCustomerStatusBadge, { status: customerStatus })),
|
|
15921
|
-
keyText
|
|
15928
|
+
keyText,
|
|
15922
15929
|
onClick,
|
|
15923
15930
|
disclaimerText: t("payment.disclaimerText", {
|
|
15924
15931
|
limit: t("payment.noLimit"),
|
|
@@ -18405,7 +18412,8 @@ function FunDirectExecutionHistoryDetail({
|
|
|
18405
18412
|
customTextConfigStatus,
|
|
18406
18413
|
customTextConfigSteps,
|
|
18407
18414
|
dangerousCustomDelayedAutoTriggerCutoff,
|
|
18408
|
-
disableAutoUpdate = false
|
|
18415
|
+
disableAutoUpdate = false,
|
|
18416
|
+
hideYouReceive = false
|
|
18409
18417
|
}) {
|
|
18410
18418
|
const { t } = useFunkitTranslation();
|
|
18411
18419
|
const isLoaded = !!directExecution;
|
|
@@ -18470,7 +18478,8 @@ function FunDirectExecutionHistoryDetail({
|
|
|
18470
18478
|
{
|
|
18471
18479
|
directExecution,
|
|
18472
18480
|
isLoaded,
|
|
18473
|
-
disableAutoUpdate
|
|
18481
|
+
disableAutoUpdate,
|
|
18482
|
+
hideYouReceive
|
|
18474
18483
|
}
|
|
18475
18484
|
), /* @__PURE__ */ React113.createElement(
|
|
18476
18485
|
DirectExecutionOrderDetail,
|
|
@@ -18498,7 +18507,8 @@ function FunDirectExecutionHistoryDetail({
|
|
|
18498
18507
|
function DirectExecutionSummaryHistory({
|
|
18499
18508
|
directExecution,
|
|
18500
18509
|
isLoaded,
|
|
18501
|
-
disableAutoUpdate = false
|
|
18510
|
+
disableAutoUpdate = false,
|
|
18511
|
+
hideYouReceive = false
|
|
18502
18512
|
}) {
|
|
18503
18513
|
const { t } = useFunkitTranslation();
|
|
18504
18514
|
const { uiCustomizations } = useFunkitConfig();
|
|
@@ -18557,7 +18567,7 @@ function DirectExecutionSummaryHistory({
|
|
|
18557
18567
|
}
|
|
18558
18568
|
)
|
|
18559
18569
|
}
|
|
18560
|
-
) : /* @__PURE__ */ React113.createElement(PaymentRouteSummarySkeletonLoader, null)), /* @__PURE__ */ React113.createElement(FunTxSummaryBox, null, /* @__PURE__ */ React113.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React113.createElement(FunTxSummaryLineItemKeyText, { text: receiveAmountLabel }), isLoaded && clientMetadata ? /* @__PURE__ */ React113.createElement(Box, { display: "flex", gap: "5", alignItems: "center" }, /* @__PURE__ */ React113.createElement(
|
|
18570
|
+
) : /* @__PURE__ */ React113.createElement(PaymentRouteSummarySkeletonLoader, null)), hideYouReceive ? null : /* @__PURE__ */ React113.createElement(FunTxSummaryBox, null, /* @__PURE__ */ React113.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React113.createElement(FunTxSummaryLineItemKeyText, { text: receiveAmountLabel }), isLoaded && clientMetadata ? /* @__PURE__ */ React113.createElement(Box, { display: "flex", gap: "5", alignItems: "center" }, /* @__PURE__ */ React113.createElement(
|
|
18561
18571
|
AsyncImage,
|
|
18562
18572
|
{
|
|
18563
18573
|
src: clientMetadata.initSettings.config.iconSrc || "",
|
|
@@ -18813,14 +18823,14 @@ var overrideStatus = (de, status) => {
|
|
|
18813
18823
|
} : void 0
|
|
18814
18824
|
};
|
|
18815
18825
|
};
|
|
18816
|
-
var getFakeDirectExecution = (checkoutItem) => {
|
|
18826
|
+
var getFakeDirectExecution = (checkoutItem, walletAddress) => {
|
|
18817
18827
|
return {
|
|
18818
18828
|
// It must be empty as empty string disables auto refresh of data
|
|
18819
18829
|
txHash: "",
|
|
18820
18830
|
// version: 1,
|
|
18821
18831
|
customerId: "",
|
|
18822
18832
|
userId: "",
|
|
18823
|
-
recipientAddr: checkoutItem.initSettings.config.customRecipient,
|
|
18833
|
+
recipientAddr: checkoutItem.initSettings.config.customRecipient ?? walletAddress,
|
|
18824
18834
|
type: DirectExecutionType2.RELAY,
|
|
18825
18835
|
fromChainId: checkoutItem.selectedSourceAssetInfo.chainId,
|
|
18826
18836
|
fromTokenAddress: checkoutItem.selectedSourceAssetInfo.address,
|
|
@@ -18867,6 +18877,7 @@ var BrokerageSuccess = ({
|
|
|
18867
18877
|
});
|
|
18868
18878
|
const { checkoutItem, setCheckoutProgress } = useCheckoutContext();
|
|
18869
18879
|
const { exchangeType } = useBluvo();
|
|
18880
|
+
const { walletAddress } = useGeneralWallet();
|
|
18870
18881
|
const [directExecution, setDirectExecution] = useState33(null);
|
|
18871
18882
|
useIsomorphicLayoutEffect(() => {
|
|
18872
18883
|
if (!checkoutItem) {
|
|
@@ -18874,7 +18885,7 @@ var BrokerageSuccess = ({
|
|
|
18874
18885
|
}
|
|
18875
18886
|
if (!directExecution) {
|
|
18876
18887
|
setCheckoutProgress(checkoutItem.id, { step: 1 });
|
|
18877
|
-
setDirectExecution(getFakeDirectExecution(checkoutItem));
|
|
18888
|
+
setDirectExecution(getFakeDirectExecution(checkoutItem, walletAddress));
|
|
18878
18889
|
}
|
|
18879
18890
|
}, [directExecution, checkoutItem, setCheckoutProgress]);
|
|
18880
18891
|
const latestDirectExecution = useMemo24(() => {
|
|
@@ -18969,7 +18980,8 @@ var BrokerageSuccess = ({
|
|
|
18969
18980
|
isActiveCheckout: true,
|
|
18970
18981
|
showCheckoutStatus: true,
|
|
18971
18982
|
onClose: handleClose,
|
|
18972
|
-
onAnimationComplete: handleNewDeposit
|
|
18983
|
+
onAnimationComplete: handleNewDeposit,
|
|
18984
|
+
hideYouReceive: true
|
|
18973
18985
|
}
|
|
18974
18986
|
);
|
|
18975
18987
|
};
|
|
@@ -27768,7 +27780,7 @@ function CopyInputDisplayedAddressI18n({
|
|
|
27768
27780
|
}
|
|
27769
27781
|
function CopyInputDisplayedAddress(props) {
|
|
27770
27782
|
const { i18n: i18n2 } = useFunkitTranslation();
|
|
27771
|
-
const isEnglish = i18n2.language === "en";
|
|
27783
|
+
const isEnglish = i18n2.language === "en" || i18n2.language === "buy_en";
|
|
27772
27784
|
return isEnglish ? /* @__PURE__ */ React176.createElement(CopyInputDisplayedAddressEN, { ...props }) : /* @__PURE__ */ React176.createElement(CopyInputDisplayedAddressI18n, { ...props });
|
|
27773
27785
|
}
|
|
27774
27786
|
|
|
@@ -30638,9 +30650,7 @@ var usePaymentMethodInfoLabel = (methodInfo, iconSize = DEFAULT_PAYMENT_METHOD_I
|
|
|
30638
30650
|
if (methodInfo.paymentMethod === "brokerage" /* BROKERAGE */) {
|
|
30639
30651
|
const icon2 = getExchangeIcon(methodInfo.exchange, iconSize);
|
|
30640
30652
|
const brokerageLabel = methodInfo.title;
|
|
30641
|
-
const text =
|
|
30642
|
-
brokerageLabel
|
|
30643
|
-
});
|
|
30653
|
+
const text = brokerageLabel;
|
|
30644
30654
|
return { text, icon: icon2 };
|
|
30645
30655
|
}
|
|
30646
30656
|
if (methodInfo.paymentMethod === "virtual_bank" /* VIRTUAL_BANK */) {
|
|
@@ -30648,9 +30658,7 @@ var usePaymentMethodInfoLabel = (methodInfo, iconSize = DEFAULT_PAYMENT_METHOD_I
|
|
|
30648
30658
|
methodInfo.title,
|
|
30649
30659
|
methodInfo.matchingFiatAccount
|
|
30650
30660
|
);
|
|
30651
|
-
const text =
|
|
30652
|
-
virtualFiatLabel
|
|
30653
|
-
});
|
|
30661
|
+
const text = virtualFiatLabel;
|
|
30654
30662
|
const icon2 = /* @__PURE__ */ React209.createElement(
|
|
30655
30663
|
PaymentMethodIcon,
|
|
30656
30664
|
{
|
|
@@ -30721,7 +30729,7 @@ var PaymentRouteSummary = ({
|
|
|
30721
30729
|
{
|
|
30722
30730
|
isSameDestination,
|
|
30723
30731
|
paymentMethodInfo,
|
|
30724
|
-
redirect: sourceRedirect,
|
|
30732
|
+
redirect: isSameDestination ? destinationRedirect : sourceRedirect,
|
|
30725
30733
|
isWithdrawal
|
|
30726
30734
|
}
|
|
30727
30735
|
);
|
|
@@ -20,15 +20,15 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
tokenPocketWallet
|
|
22
22
|
} from "./chunk-2L43XSW3.js";
|
|
23
|
-
import {
|
|
24
|
-
tokenaryWallet
|
|
25
|
-
} from "./chunk-D6AOOO5F.js";
|
|
26
23
|
import {
|
|
27
24
|
trustWallet
|
|
28
25
|
} from "./chunk-VYBAYMP3.js";
|
|
29
26
|
import {
|
|
30
27
|
uniswapWallet
|
|
31
28
|
} from "./chunk-LH7BMNFZ.js";
|
|
29
|
+
import {
|
|
30
|
+
tokenaryWallet
|
|
31
|
+
} from "./chunk-D6AOOO5F.js";
|
|
32
32
|
import {
|
|
33
33
|
walletConnectWallet
|
|
34
34
|
} from "./chunk-NP5QGWNL.js";
|
|
@@ -59,12 +59,12 @@ import {
|
|
|
59
59
|
import {
|
|
60
60
|
ledgerWallet
|
|
61
61
|
} from "./chunk-BRBKM4PW.js";
|
|
62
|
-
import {
|
|
63
|
-
mewWallet
|
|
64
|
-
} from "./chunk-OL5ZO7E4.js";
|
|
65
62
|
import {
|
|
66
63
|
metaMaskWallet
|
|
67
64
|
} from "./chunk-2HYNUNAS.js";
|
|
65
|
+
import {
|
|
66
|
+
mewWallet
|
|
67
|
+
} from "./chunk-OL5ZO7E4.js";
|
|
68
68
|
import {
|
|
69
69
|
oktoWallet
|
|
70
70
|
} from "./chunk-ADIXAKUL.js";
|