@funkit/connect 12.18.0 → 12.19.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.
- package/CHANGELOG.md +32 -0
- package/dist/clients/{chunk-FLREOB24.js → chunk-5NYKSTGH.js} +1 -1
- package/dist/clients/{chunk-AHYOV7AV.js → chunk-GTPMJGCF.js} +1 -1
- package/dist/clients/{chunk-G6A62MZO.js → chunk-KH2HLTHP.js} +6 -6
- package/dist/clients/{chunk-RQALGV5U.js → chunk-N46CL4ZT.js} +1 -1
- package/dist/clients/{chunk-IUVVGGP4.js → chunk-Y7ONHWCW.js} +2 -2
- package/dist/clients/fanatics.js +2 -2
- package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
- package/dist/clients/internal/nado/withdrawalForm.js +3 -3
- package/dist/clients/internal/nado/withdrawalStatus.js +2 -2
- package/dist/clients/lighter.js +3 -3
- package/dist/clients/mallard.js +2 -2
- package/dist/clients/nado.js +5 -5
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
- package/dist/clients/polymarket/index.js +3 -3
- package/dist/clients/polymarket/polymarket.js +2 -2
- package/dist/clients/solana-transfer.d.ts +1 -0
- package/dist/clients/solana-transfer.js +13 -0
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +3 -1
- package/dist/domains/bridge.d.ts +1 -2
- package/dist/index.js +31 -20
- package/dist/modals/CheckoutModal/Convert/ConvertAssetRow.d.ts +5 -0
- package/dist/modals/CheckoutModal/Convert/ConvertSelectDestinationStep.d.ts +5 -2
- package/dist/modals/CheckoutModal/Convert/ConvertSelectSourceStep.d.ts +1 -1
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +51 -51
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +9 -4
- package/dist/wallets/walletConnectors/{chunk-CU5J53XR.js → chunk-53MYTA42.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ZSSSLFQF.js → chunk-65ULY6OC.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-XODA5ESL.js → chunk-A5POD5SV.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RXRYHMRI.js → chunk-ANODOMIN.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-IWOMSW64.js → chunk-ASTCNVJC.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-U52QO5HF.js → chunk-F45CUFRR.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-YRMBR6NA.js → chunk-FYPQ3HP4.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-BBDNB5TQ.js → chunk-IWPW26AL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-4FHNLTR3.js → chunk-JJBLW4IU.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-NXWG6FG2.js → chunk-KE4CWI3A.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-BBB2J3US.js → chunk-MWB6LFSG.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-34B7OJNT.js → chunk-OVDCDVFX.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-SR5CZR3L.js → chunk-PPQ6L4K2.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-IA5432IR.js → chunk-RJF2YEZ5.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RFCZYLNR.js → chunk-RQYEGJKL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-TRZDAXCQ.js → chunk-TIHTQ3OB.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ALGPGI6V.js → chunk-TM7UBV3Q.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-HOCKAU5H.js → chunk-USLZMUJ3.js} +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 12.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1bdcbce: Provide opt-in unsigned SOL and USDC transfer construction for web and React Native.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- c6e5943: Fix scroll divider updating state after its modal content unmounts
|
|
12
|
+
- c083795: Convert's receive token list now shows tokens the user already holds first, by USD value.
|
|
13
|
+
- 22276a3: Fix the Convert token lists cutting off long lists instead of scrolling
|
|
14
|
+
- 9cf858e: Remove an unused Bridge customer-status mapper and commented-out image-loading debug scaffolding.
|
|
15
|
+
- 29b52d4: Warn logs now report their error in Datadog's standard error fields, as error logs do.
|
|
16
|
+
- Updated dependencies [5283b62]
|
|
17
|
+
- Updated dependencies [ff472ba]
|
|
18
|
+
- Updated dependencies [5283b62]
|
|
19
|
+
- Updated dependencies [bf49825]
|
|
20
|
+
- Updated dependencies [a2cff67]
|
|
21
|
+
- Updated dependencies [1bdcbce]
|
|
22
|
+
- Updated dependencies [29b52d4]
|
|
23
|
+
- @funkit/api-base@9.1.2
|
|
24
|
+
- @funkit/connect-core@10.1.0
|
|
25
|
+
|
|
26
|
+
## 12.18.1
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- f03d203: Convert's collapsed transaction breakdown now previews the price impact (plus gas on Ethereum mainnet) before it is expanded.
|
|
31
|
+
- Updated dependencies [1e0e550]
|
|
32
|
+
- @funkit/api-base@9.1.1
|
|
33
|
+
- @funkit/connect-core@10.0.1
|
|
34
|
+
|
|
3
35
|
## 12.18.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
|
@@ -35,7 +35,7 @@ var DatadogBrowserLogsTransport = class {
|
|
|
35
35
|
datadogLogs.logger.debug(title, context);
|
|
36
36
|
break;
|
|
37
37
|
case "warn":
|
|
38
|
-
datadogLogs.logger.warn(title, context);
|
|
38
|
+
datadogLogs.logger.warn(title, context, error);
|
|
39
39
|
break;
|
|
40
40
|
case "error":
|
|
41
41
|
datadogLogs.logger.error(title, context, error);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
generateClientMetadataForTokenTransfer
|
|
4
|
+
} from "./chunk-TKEBGMVW.js";
|
|
2
5
|
import {
|
|
3
6
|
isExpectedNadoWithdrawalFailure,
|
|
4
7
|
toNadoWithdrawalErrorMessage
|
|
@@ -11,15 +14,12 @@ import {
|
|
|
11
14
|
signTypedData,
|
|
12
15
|
switchChain
|
|
13
16
|
} from "./chunk-OODIKHYE.js";
|
|
17
|
+
import {
|
|
18
|
+
logger
|
|
19
|
+
} from "./chunk-GTPMJGCF.js";
|
|
14
20
|
import {
|
|
15
21
|
i18n_default
|
|
16
22
|
} from "./chunk-YSAAJSWT.js";
|
|
17
|
-
import {
|
|
18
|
-
generateClientMetadataForTokenTransfer
|
|
19
|
-
} from "./chunk-TKEBGMVW.js";
|
|
20
|
-
import {
|
|
21
|
-
logger
|
|
22
|
-
} from "./chunk-AHYOV7AV.js";
|
|
23
23
|
|
|
24
24
|
// src/clients/internal/nado/withdrawalCallback.ts
|
|
25
25
|
import {
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
VAULT_DEPOSITOR_ABI,
|
|
11
11
|
VAULT_DEPOSITOR_POLYGON,
|
|
12
12
|
createPerpsGenerateActionParams
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5NYKSTGH.js";
|
|
14
14
|
import {
|
|
15
15
|
logger
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GTPMJGCF.js";
|
|
17
17
|
|
|
18
18
|
// src/clients/polymarket/createPolymarketDepositConfig.ts
|
|
19
19
|
import { encodeFunctionData, erc20Abi, getAddress as getAddress2, maxUint256 } from "viem";
|
package/dist/clients/fanatics.js
CHANGED
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
Box,
|
|
8
8
|
Text,
|
|
9
9
|
preloadRemoteImages
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-N46CL4ZT.js";
|
|
11
11
|
import {
|
|
12
12
|
useFunkitTranslation
|
|
13
13
|
} from "./chunk-L6JL2XJY.js";
|
|
14
|
+
import "./chunk-GTPMJGCF.js";
|
|
14
15
|
import "./chunk-YSAAJSWT.js";
|
|
15
|
-
import "./chunk-AHYOV7AV.js";
|
|
16
16
|
|
|
17
17
|
// src/clients/fanatics.tsx
|
|
18
18
|
import React4, { useEffect, useMemo } from "react";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createNadoWithdrawalCallback
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-KH2HLTHP.js";
|
|
5
|
+
import "../../chunk-TKEBGMVW.js";
|
|
5
6
|
import "../../chunk-AELXD5XA.js";
|
|
6
7
|
import "../../chunk-LICTGZXW.js";
|
|
7
8
|
import "../../chunk-OODIKHYE.js";
|
|
9
|
+
import "../../chunk-GTPMJGCF.js";
|
|
8
10
|
import "../../chunk-YSAAJSWT.js";
|
|
9
|
-
import "../../chunk-TKEBGMVW.js";
|
|
10
|
-
import "../../chunk-AHYOV7AV.js";
|
|
11
11
|
export {
|
|
12
12
|
createNadoWithdrawalCallback
|
|
13
13
|
};
|
|
@@ -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,11 +12,12 @@ 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
|
-
import "../../chunk-YSAAJSWT.js";
|
|
18
17
|
import {
|
|
19
18
|
logger
|
|
20
|
-
} from "../../chunk-
|
|
19
|
+
} from "../../chunk-GTPMJGCF.js";
|
|
20
|
+
import "../../chunk-YSAAJSWT.js";
|
|
21
21
|
|
|
22
22
|
// src/clients/internal/nado/withdrawalForm.ts
|
|
23
23
|
import {
|
|
@@ -6,10 +6,10 @@ import "../../chunk-L6JL2XJY.js";
|
|
|
6
6
|
import {
|
|
7
7
|
useAccount
|
|
8
8
|
} from "../../chunk-2W2P3OS6.js";
|
|
9
|
-
import "../../chunk-YSAAJSWT.js";
|
|
10
9
|
import {
|
|
11
10
|
logger
|
|
12
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-GTPMJGCF.js";
|
|
12
|
+
import "../../chunk-YSAAJSWT.js";
|
|
13
13
|
|
|
14
14
|
// src/clients/internal/nado/withdrawalStatus.ts
|
|
15
15
|
import {
|
package/dist/clients/lighter.js
CHANGED
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
AsyncImage,
|
|
12
12
|
Box,
|
|
13
13
|
sanitizeUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-N46CL4ZT.js";
|
|
15
15
|
import {
|
|
16
16
|
useFunkitTranslation
|
|
17
17
|
} from "./chunk-L6JL2XJY.js";
|
|
18
18
|
import "./chunk-OODIKHYE.js";
|
|
19
19
|
import "./chunk-2W2P3OS6.js";
|
|
20
|
-
import "./chunk-YSAAJSWT.js";
|
|
21
20
|
import {
|
|
22
21
|
logger
|
|
23
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GTPMJGCF.js";
|
|
23
|
+
import "./chunk-YSAAJSWT.js";
|
|
24
24
|
|
|
25
25
|
// src/clients/lighter.tsx
|
|
26
26
|
import {
|
package/dist/clients/mallard.js
CHANGED
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
useAccount,
|
|
15
15
|
useConfig
|
|
16
16
|
} from "./chunk-2W2P3OS6.js";
|
|
17
|
-
import "./chunk-YSAAJSWT.js";
|
|
18
17
|
import {
|
|
19
18
|
logger
|
|
20
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GTPMJGCF.js";
|
|
20
|
+
import "./chunk-YSAAJSWT.js";
|
|
21
21
|
|
|
22
22
|
// src/clients/mallard.tsx
|
|
23
23
|
import { ROBINHOOD_MAINNET_CHAIN_ID } from "@funkit/chains";
|
package/dist/clients/nado.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createNadoWithdrawalCallback
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KH2HLTHP.js";
|
|
5
|
+
import "./chunk-TKEBGMVW.js";
|
|
5
6
|
import "./chunk-AELXD5XA.js";
|
|
6
7
|
import "./chunk-LICTGZXW.js";
|
|
7
8
|
import "./chunk-OODIKHYE.js";
|
|
@@ -9,13 +10,12 @@ import {
|
|
|
9
10
|
useAccount,
|
|
10
11
|
useConfig
|
|
11
12
|
} from "./chunk-2W2P3OS6.js";
|
|
13
|
+
import {
|
|
14
|
+
logger
|
|
15
|
+
} from "./chunk-GTPMJGCF.js";
|
|
12
16
|
import {
|
|
13
17
|
i18n_default
|
|
14
18
|
} from "./chunk-YSAAJSWT.js";
|
|
15
|
-
import "./chunk-TKEBGMVW.js";
|
|
16
|
-
import {
|
|
17
|
-
logger
|
|
18
|
-
} from "./chunk-AHYOV7AV.js";
|
|
19
19
|
|
|
20
20
|
// src/clients/nado.tsx
|
|
21
21
|
import { useMemo } from "react";
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createPolymarketDepositConfig,
|
|
4
4
|
createPredictionsGenerateActionParams
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-Y7ONHWCW.js";
|
|
6
6
|
import {
|
|
7
7
|
POLYMARKET_PERPS_ROUTING_ID,
|
|
8
8
|
POLYMARKET_PREDICTIONS_ROUTING_ID
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-5NYKSTGH.js";
|
|
10
10
|
import "../chunk-TKEBGMVW.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-GTPMJGCF.js";
|
|
12
12
|
export {
|
|
13
13
|
POLYMARKET_PERPS_ROUTING_ID,
|
|
14
14
|
POLYMARKET_PREDICTIONS_ROUTING_ID,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createPolymarketDepositConfig,
|
|
4
4
|
createPredictionsGenerateActionParams
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-Y7ONHWCW.js";
|
|
6
6
|
import {
|
|
7
7
|
AMOUNT_PLACEHOLDER,
|
|
8
8
|
COLLATERAL_ONRAMP_ABI,
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
VAULT_DEPOSITOR_POLYGON,
|
|
16
16
|
createPerpsGenerateActionParams,
|
|
17
17
|
createPolymarketWithdrawalConfig
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-5NYKSTGH.js";
|
|
19
19
|
import "../chunk-TKEBGMVW.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-GTPMJGCF.js";
|
|
21
21
|
export {
|
|
22
22
|
AMOUNT_PLACEHOLDER,
|
|
23
23
|
COLLATERAL_ONRAMP_ABI,
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
VAULT_DEPOSITOR_POLYGON,
|
|
10
10
|
createPerpsGenerateActionParams,
|
|
11
11
|
createPolymarketWithdrawalConfig
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-5NYKSTGH.js";
|
|
13
13
|
import "../chunk-TKEBGMVW.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-GTPMJGCF.js";
|
|
15
15
|
export {
|
|
16
16
|
AMOUNT_PLACEHOLDER,
|
|
17
17
|
COLLATERAL_ONRAMP_ABI,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { buildSolanaTransfer, getSolanaTransferToken, SOLANA_USDC_MINT, } from '@funkit/connect-core/clients/solana-transfer';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/clients/solana-transfer.ts
|
|
4
|
+
import {
|
|
5
|
+
buildSolanaTransfer,
|
|
6
|
+
getSolanaTransferToken,
|
|
7
|
+
SOLANA_USDC_MINT
|
|
8
|
+
} from "@funkit/connect-core/clients/solana-transfer";
|
|
9
|
+
export {
|
|
10
|
+
SOLANA_USDC_MINT,
|
|
11
|
+
buildSolanaTransfer,
|
|
12
|
+
getSolanaTransferToken
|
|
13
|
+
};
|
|
@@ -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/domains/bridge.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - Bridge Bank Account: corresponds to a payment route for a user
|
|
7
7
|
* https://docs.google.com/document/d/1A0GVWMIe1aLHtblMYJZfFP3C-DybMo47l4vvoxcbpcs/edit?tab=t.0
|
|
8
8
|
*/
|
|
9
|
-
import { type BaseApiRequest, type BridgeCustomer, BridgeCustomerStatus,
|
|
9
|
+
import { type BaseApiRequest, type BridgeCustomer, BridgeCustomerStatus, type BridgeSubAccount, type BridgeVirtualBankAccount, type CreateBridgeBankAccountRequest, type FunAddress } from '@funkit/api-base';
|
|
10
10
|
/** Bridge only supports a handful of chains so we need to normalize other chains to the supported chain*/
|
|
11
11
|
export declare const findBridgeSupportedChain: (chainId: string) => CreateBridgeBankAccountRequest["chainName"];
|
|
12
12
|
export interface AllFiatAccounts {
|
|
@@ -17,7 +17,6 @@ export declare function fetchFrogAccounts(walletAddress: string, params: BaseApi
|
|
|
17
17
|
export declare function fetchAllFiatAccounts(bridgeSubAccount: BridgeSubAccount | undefined, params: BaseApiRequest): Promise<AllFiatAccounts>;
|
|
18
18
|
export declare function getMatchingBankAccount(accounts: AllFiatAccounts, targetChain: string, targetAddress: FunAddress): BridgeVirtualBankAccount | undefined;
|
|
19
19
|
export declare const getFiatAccountLabel: (defaultLabel: string, account?: BridgeVirtualBankAccount) => string;
|
|
20
|
-
export declare const mapBridgeCustomerStatusToKycStatus: (customerStatus?: BridgeCustomerStatus) => BridgeKycStatus | undefined;
|
|
21
20
|
export declare function isKycUninitialized(customerStatus: BridgeCustomerStatus): customerStatus is BridgeCustomerStatus.AWAITING_QUESTIONNAIRE | BridgeCustomerStatus.AWAITING_UBO | BridgeCustomerStatus.INCOMPLETE | BridgeCustomerStatus.NOT_STARTED;
|
|
22
21
|
/**
|
|
23
22
|
* When KYC is in the initial state (passed KYC that has to be retried doesn't have a special customer state) but we already get some rejection reasons from bridge
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
darkTheme
|
|
4
|
-
} from "./chunk-53FF4ZHH.js";
|
|
5
2
|
import {
|
|
6
3
|
lightTheme
|
|
7
4
|
} from "./chunk-2RND3WWH.js";
|
|
5
|
+
import {
|
|
6
|
+
darkTheme
|
|
7
|
+
} from "./chunk-53FF4ZHH.js";
|
|
8
8
|
import {
|
|
9
9
|
systemFontStack
|
|
10
10
|
} from "./chunk-DH3DS4FX.js";
|
|
@@ -113,7 +113,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
113
113
|
localStorage.setItem(storageKey, version);
|
|
114
114
|
}
|
|
115
115
|
function getCurrentSdkVersion() {
|
|
116
|
-
return "12.
|
|
116
|
+
return "12.19.0";
|
|
117
117
|
}
|
|
118
118
|
function useFingerprint() {
|
|
119
119
|
const fingerprint = useCallback(() => {
|
|
@@ -159,7 +159,7 @@ var DatadogBrowserLogsTransport = class {
|
|
|
159
159
|
datadogLogs.logger.debug(title, context);
|
|
160
160
|
break;
|
|
161
161
|
case "warn":
|
|
162
|
-
datadogLogs.logger.warn(title, context);
|
|
162
|
+
datadogLogs.logger.warn(title, context, error);
|
|
163
163
|
break;
|
|
164
164
|
case "error":
|
|
165
165
|
datadogLogs.logger.error(title, context, error);
|
|
@@ -18782,9 +18782,14 @@ var useScrollDivider = () => {
|
|
|
18782
18782
|
setIsAtBottom(scrollTop + clientHeight >= scrollHeight - 1);
|
|
18783
18783
|
setIsScrollable(scrollHeight > clientHeight + 2);
|
|
18784
18784
|
};
|
|
18785
|
+
const pendingTimeouts = /* @__PURE__ */ new Set();
|
|
18785
18786
|
const handleContentChange = () => {
|
|
18786
18787
|
handleScrollPositionChange();
|
|
18787
|
-
setTimeout(
|
|
18788
|
+
const timeoutId = setTimeout(() => {
|
|
18789
|
+
pendingTimeouts.delete(timeoutId);
|
|
18790
|
+
handleScrollPositionChange();
|
|
18791
|
+
}, 500);
|
|
18792
|
+
pendingTimeouts.add(timeoutId);
|
|
18788
18793
|
};
|
|
18789
18794
|
const onScrollChange = () => {
|
|
18790
18795
|
handleScrollPositionChange();
|
|
@@ -18808,6 +18813,7 @@ var useScrollDivider = () => {
|
|
|
18808
18813
|
content2.removeEventListener("scrollend", onScrollEnd);
|
|
18809
18814
|
resizeObserver.unobserve(content2);
|
|
18810
18815
|
mutationObserver.disconnect();
|
|
18816
|
+
pendingTimeouts.forEach(clearTimeout);
|
|
18811
18817
|
};
|
|
18812
18818
|
}, [refElement]);
|
|
18813
18819
|
return {
|
|
@@ -21446,10 +21452,9 @@ function translateAppFeeLabel(appFeeLabel, t) {
|
|
|
21446
21452
|
};
|
|
21447
21453
|
return feeLabelMap[appFeeLabel] ?? t("fees.funxyzFee");
|
|
21448
21454
|
}
|
|
21449
|
-
function computeDigest(relayQuoteMetadata,
|
|
21450
|
-
const showTransactionDigest = uiCustomizations.confirmationScreen.showTransactionDigest;
|
|
21455
|
+
function computeDigest(relayQuoteMetadata, isPaymentFeePreviewEnabled, totalPriceImpactPercent, gasUsd) {
|
|
21451
21456
|
const details = relayQuoteMetadata.relayQuote.details;
|
|
21452
|
-
if (
|
|
21457
|
+
if (!isPaymentFeePreviewEnabled) {
|
|
21453
21458
|
return {
|
|
21454
21459
|
isMainnet: false,
|
|
21455
21460
|
value: void 0
|
|
@@ -21470,6 +21475,7 @@ function renderRelayFee({
|
|
|
21470
21475
|
uiCustomizations,
|
|
21471
21476
|
checkoutConfig,
|
|
21472
21477
|
extraSourceChainGasUsd,
|
|
21478
|
+
isPaymentFeePreviewEnabled,
|
|
21473
21479
|
t
|
|
21474
21480
|
}) {
|
|
21475
21481
|
const {
|
|
@@ -21524,7 +21530,7 @@ function renderRelayFee({
|
|
|
21524
21530
|
const translatedAppFeeLabel = translateAppFeeLabel(appFeeLabel, t);
|
|
21525
21531
|
const { isMainnet, value: collapsedValue } = computeDigest(
|
|
21526
21532
|
relayQuoteMetadata,
|
|
21527
|
-
|
|
21533
|
+
isPaymentFeePreviewEnabled,
|
|
21528
21534
|
totalPriceImpactPercent,
|
|
21529
21535
|
totalNetworkCostUsd
|
|
21530
21536
|
);
|
|
@@ -21657,6 +21663,7 @@ var extractFeeItems = ({
|
|
|
21657
21663
|
uiCustomizations,
|
|
21658
21664
|
checkoutConfig,
|
|
21659
21665
|
extraSourceChainGasUsd,
|
|
21666
|
+
isPaymentFeePreviewEnabled,
|
|
21660
21667
|
t
|
|
21661
21668
|
}) => {
|
|
21662
21669
|
if (relayQuoteMetadata) {
|
|
@@ -21668,6 +21675,7 @@ var extractFeeItems = ({
|
|
|
21668
21675
|
uiCustomizations,
|
|
21669
21676
|
checkoutConfig,
|
|
21670
21677
|
extraSourceChainGasUsd,
|
|
21678
|
+
isPaymentFeePreviewEnabled,
|
|
21671
21679
|
t
|
|
21672
21680
|
});
|
|
21673
21681
|
}
|
|
@@ -21734,7 +21742,8 @@ function PaymentFeesSummary({
|
|
|
21734
21742
|
valuesNotAvailable = false,
|
|
21735
21743
|
extraSourceChainGasUsd = 0,
|
|
21736
21744
|
step,
|
|
21737
|
-
extraFeeItems
|
|
21745
|
+
extraFeeItems,
|
|
21746
|
+
isFeePreviewEnabled
|
|
21738
21747
|
}) {
|
|
21739
21748
|
const { t } = useFunkitTranslation();
|
|
21740
21749
|
const controls = useAnimationControls2();
|
|
@@ -21745,6 +21754,7 @@ function PaymentFeesSummary({
|
|
|
21745
21754
|
const logEventV2 = useTrackV2();
|
|
21746
21755
|
const { connectorId } = useGeneralWallet();
|
|
21747
21756
|
const isExpandingRef = useRef19(false);
|
|
21757
|
+
const isPaymentFeePreviewEnabled = isFeePreviewEnabled ?? uiCustomizations.confirmationScreen.showTransactionDigest === "chainDependent";
|
|
21748
21758
|
const toggleIsExpanded = async () => {
|
|
21749
21759
|
if (valuesNotAvailable || isExpandingRef.current) {
|
|
21750
21760
|
return;
|
|
@@ -21808,6 +21818,7 @@ function PaymentFeesSummary({
|
|
|
21808
21818
|
uiCustomizations,
|
|
21809
21819
|
checkoutConfig: checkoutItem?.initSettings.config,
|
|
21810
21820
|
extraSourceChainGasUsd,
|
|
21821
|
+
isPaymentFeePreviewEnabled,
|
|
21811
21822
|
t
|
|
21812
21823
|
});
|
|
21813
21824
|
}, [
|
|
@@ -21816,6 +21827,7 @@ function PaymentFeesSummary({
|
|
|
21816
21827
|
uiCustomizations,
|
|
21817
21828
|
checkoutItem,
|
|
21818
21829
|
extraSourceChainGasUsd,
|
|
21830
|
+
isPaymentFeePreviewEnabled,
|
|
21819
21831
|
t
|
|
21820
21832
|
]);
|
|
21821
21833
|
const isExpandable = expandedItems.length > 0 && !isLoading && !valuesNotAvailable;
|
|
@@ -23215,7 +23227,6 @@ import React117, { useEffect as useEffect43 } from "react";
|
|
|
23215
23227
|
// src/domains/bridge.ts
|
|
23216
23228
|
import {
|
|
23217
23229
|
BridgeCustomerStatus,
|
|
23218
|
-
BridgeKycStatus,
|
|
23219
23230
|
BridgeVirtualBankAccountStatus,
|
|
23220
23231
|
createBridgeBankAccountRequestChainNames,
|
|
23221
23232
|
getBridgeBankAccounts,
|
|
@@ -35506,9 +35517,6 @@ var DEFAULT_HEIGHT = 525;
|
|
|
35506
35517
|
var mapHeightToCheckoutStep = {
|
|
35507
35518
|
["source_change" /* SOURCE_CHANGE */]: 825,
|
|
35508
35519
|
["perps_transfer" /* PERPS_TRANSFER */]: 825,
|
|
35509
|
-
["convert" /* CONVERT */]: 825,
|
|
35510
|
-
["convert_select_source" /* CONVERT_SELECT_SOURCE */]: 825,
|
|
35511
|
-
["convert_select_destination" /* CONVERT_SELECT_DESTINATION */]: 825,
|
|
35512
35520
|
["transfer_token" /* TRANSFER_TOKEN */]: 825,
|
|
35513
35521
|
["lightning_invoice" /* LIGHTNING_INVOICE */]: 825,
|
|
35514
35522
|
["fiat_account_detail" /* FIAT_ACCOUNT_DETAIL */]: 825,
|
|
@@ -46452,6 +46460,9 @@ function FunAssetLoading({ count = 3 }) {
|
|
|
46452
46460
|
// src/modals/CheckoutModal/Convert/ConvertAssetRow.tsx
|
|
46453
46461
|
import { formatCurrencyAndStringify as formatCurrencyAndStringify12 } from "@funkit/utils";
|
|
46454
46462
|
import React244 from "react";
|
|
46463
|
+
function compareConvertAssetOptions(a, b) {
|
|
46464
|
+
return Number(a.isDisabled) - Number(b.isDisabled) || (b.usdAmount ?? -1) - (a.usdAmount ?? -1);
|
|
46465
|
+
}
|
|
46455
46466
|
function toAssetHoldingsItem({
|
|
46456
46467
|
asset,
|
|
46457
46468
|
key,
|
|
@@ -46616,7 +46627,7 @@ function getConvertDestinationOptions({
|
|
|
46616
46627
|
sourceKey,
|
|
46617
46628
|
recipientAddresses
|
|
46618
46629
|
}) {
|
|
46619
|
-
|
|
46630
|
+
const options = assets.flatMap((asset) => {
|
|
46620
46631
|
const key = convertAssetKey(asset.chainId, asset.address);
|
|
46621
46632
|
if (asset.chainId !== chainId2 || key === sourceKey) {
|
|
46622
46633
|
return [];
|
|
@@ -46631,6 +46642,7 @@ function getConvertDestinationOptions({
|
|
|
46631
46642
|
}
|
|
46632
46643
|
];
|
|
46633
46644
|
});
|
|
46645
|
+
return options.sort(compareConvertAssetOptions);
|
|
46634
46646
|
}
|
|
46635
46647
|
function ConvertSelectDestinationStep({
|
|
46636
46648
|
onNext
|
|
@@ -46711,9 +46723,7 @@ function getConvertSourceOptions({
|
|
|
46711
46723
|
}
|
|
46712
46724
|
];
|
|
46713
46725
|
});
|
|
46714
|
-
return options.sort(
|
|
46715
|
-
(a, b) => Number(a.isDisabled) - Number(b.isDisabled) || (b.usdAmount ?? -1) - (a.usdAmount ?? -1)
|
|
46716
|
-
);
|
|
46726
|
+
return options.sort(compareConvertAssetOptions);
|
|
46717
46727
|
}
|
|
46718
46728
|
function ConvertSelectSourceStep({
|
|
46719
46729
|
onNext
|
|
@@ -47649,7 +47659,8 @@ function ConvertStep({
|
|
|
47649
47659
|
isLoading: view.isQuoteLoading,
|
|
47650
47660
|
quote: quote?.checkoutQuote,
|
|
47651
47661
|
isWithdrawal: false,
|
|
47652
|
-
step: "convert" /* CONVERT
|
|
47662
|
+
step: "convert" /* CONVERT */,
|
|
47663
|
+
isFeePreviewEnabled: true
|
|
47653
47664
|
}
|
|
47654
47665
|
), titleCountdownRef && createPortal12(countdown, titleCountdownRef), bottomSectionRef && createPortal12(
|
|
47655
47666
|
/* @__PURE__ */ React256.createElement(
|
|
@@ -13,6 +13,11 @@ export interface ConvertAssetOption {
|
|
|
13
13
|
/** Worth less than the minimum Convert quotes, so it can't be a source. */
|
|
14
14
|
isBelowMinimum?: boolean;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Pickable rows first, then by USD value. An unknown value sorts last, and the
|
|
18
|
+
* stable sort keeps the host's order among equal values.
|
|
19
|
+
*/
|
|
20
|
+
export declare function compareConvertAssetOptions(a: ConvertAssetOption, b: ConvertAssetOption): number;
|
|
16
21
|
/** A Convert asset, drawn as a row of the checkout's wallet asset list. */
|
|
17
22
|
export declare function ConvertAssetRow({ option, isSelected, onSelect, }: {
|
|
18
23
|
option: ConvertAssetOption;
|
|
@@ -3,7 +3,7 @@ import type { ConvertRecipientAddresses, ConvertResolvedAsset } from '../../../d
|
|
|
3
3
|
import { FunCheckoutStep } from '../FunCheckoutStep';
|
|
4
4
|
import type { ModalStepInfo } from '../stepTransition';
|
|
5
5
|
import { type CheckoutModalCommonState } from '../stepTransition.shared';
|
|
6
|
-
import type
|
|
6
|
+
import { type ConvertAssetOption } from './ConvertAssetRow';
|
|
7
7
|
export type ConvertSelectDestinationState = CheckoutModalCommonState;
|
|
8
8
|
export type ConvertSelectDestinationNext = Record<never, never>;
|
|
9
9
|
/** Destination chains in the host's order, without a chain whose only token is the source. */
|
|
@@ -19,7 +19,10 @@ export declare function getInitialDestinationChainId({ chainIds, destinationAsse
|
|
|
19
19
|
chainIds: string[];
|
|
20
20
|
destinationAsset: ConvertResolvedAsset | undefined;
|
|
21
21
|
}): string | undefined;
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* One chain's destination rows without the source: held tokens by USD value,
|
|
24
|
+
* then the rest in the host's order.
|
|
25
|
+
*/
|
|
23
26
|
export declare function getConvertDestinationOptions({ assets, balances, chainId, sourceKey, recipientAddresses, }: {
|
|
24
27
|
assets: ConvertResolvedAsset[];
|
|
25
28
|
balances: ConvertBalances | undefined;
|
|
@@ -3,7 +3,7 @@ import type { ConvertResolvedAsset } from '../../../domains/convert/types';
|
|
|
3
3
|
import { FunCheckoutStep } from '../FunCheckoutStep';
|
|
4
4
|
import type { ModalStepInfo } from '../stepTransition';
|
|
5
5
|
import { type CheckoutModalCommonState } from '../stepTransition.shared';
|
|
6
|
-
import type
|
|
6
|
+
import { type ConvertAssetOption } from './ConvertAssetRow';
|
|
7
7
|
export type ConvertSelectSourceState = CheckoutModalCommonState;
|
|
8
8
|
export type ConvertSelectSourceNext = Record<never, never>;
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bifrostWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-AALSJCUR.js";
|
|
4
|
+
} from "../chunk-TM7UBV3Q.js";
|
|
6
5
|
import "../chunk-EYWGX5LT.js";
|
|
6
|
+
import "../chunk-AALSJCUR.js";
|
|
7
7
|
import "../chunk-B454LLKJ.js";
|
|
8
8
|
export {
|
|
9
9
|
bifrostWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bitgetWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-AALSJCUR.js";
|
|
4
|
+
} from "../chunk-USLZMUJ3.js";
|
|
6
5
|
import "../chunk-EYWGX5LT.js";
|
|
6
|
+
import "../chunk-AALSJCUR.js";
|
|
7
7
|
import "../chunk-B454LLKJ.js";
|
|
8
8
|
export {
|
|
9
9
|
bitgetWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bybitWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-AALSJCUR.js";
|
|
4
|
+
} from "../chunk-IWPW26AL.js";
|
|
6
5
|
import "../chunk-EYWGX5LT.js";
|
|
6
|
+
import "../chunk-AALSJCUR.js";
|
|
7
7
|
import "../chunk-B454LLKJ.js";
|
|
8
8
|
export {
|
|
9
9
|
bybitWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
coin98Wallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-AALSJCUR.js";
|
|
4
|
+
} from "../chunk-RQYEGJKL.js";
|
|
6
5
|
import "../chunk-EYWGX5LT.js";
|
|
6
|
+
import "../chunk-AALSJCUR.js";
|
|
7
7
|
import "../chunk-B454LLKJ.js";
|
|
8
8
|
export {
|
|
9
9
|
coin98Wallet
|