@funkit/connect 12.10.0 → 12.10.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,20 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 12.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e06ae58: Skip wallet holdings with a malformed balance instead of crashing the checkout modal.
|
|
8
|
+
- 28803f9: Show the clear button on the withdrawal recipient address input when both an EVM and a Solana wallet are connected.
|
|
9
|
+
- Updated dependencies [bd9d5e8]
|
|
10
|
+
- Updated dependencies [e06ae58]
|
|
11
|
+
- Updated dependencies [48aae63]
|
|
12
|
+
- @funkit/api-base@8.5.1
|
|
13
|
+
- @funkit/connect-core@8.4.0
|
|
14
|
+
- @funkit/chains@2.4.1
|
|
15
|
+
- @funkit/fun-relay@3.1.1
|
|
16
|
+
- @funkit/utils@5.0.1
|
|
17
|
+
|
|
3
18
|
## 12.10.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { ChainAssetBalanceInfo } from '@funkit/api-base';
|
|
1
2
|
import { type AssetHoldingsMap } from '../utils/assets';
|
|
3
|
+
import { type IsStablecoinFn } from './useIsStablecoin';
|
|
4
|
+
export declare const processWalletAssets: (walletAssets: ChainAssetBalanceInfo | undefined, targetChain: string, isStablecoin: IsStablecoinFn) => AssetHoldingsMap<import("../domains/wallet").AssetHoldingsItem> | undefined;
|
|
2
5
|
interface UseWalletAssetHoldingsResponse {
|
|
3
6
|
data: AssetHoldingsMap | undefined;
|
|
4
7
|
isLoading: boolean;
|
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.10.
|
|
116
|
+
return "12.10.1";
|
|
117
117
|
}
|
|
118
118
|
function useFingerprint() {
|
|
119
119
|
const fingerprint = useCallback(() => {
|
|
@@ -17253,8 +17253,11 @@ var FunInput = forwardRef4(function FunInputWithRef({
|
|
|
17253
17253
|
paddingLeft: "4",
|
|
17254
17254
|
paddingRight: "10",
|
|
17255
17255
|
...allowMultiline ? {
|
|
17256
|
+
display: "flex",
|
|
17257
|
+
alignItems: "center",
|
|
17256
17258
|
style: {
|
|
17257
|
-
|
|
17259
|
+
marginTop: themeVars.spacing.inputPaddingY,
|
|
17260
|
+
height: themeVars.fontSize.inputValue.lineHeight
|
|
17258
17261
|
}
|
|
17259
17262
|
} : {}
|
|
17260
17263
|
},
|
|
@@ -20127,6 +20130,7 @@ import {
|
|
|
20127
20130
|
FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS as FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS4,
|
|
20128
20131
|
FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO7
|
|
20129
20132
|
} from "@funkit/chains";
|
|
20133
|
+
import { parseBigInt } from "@funkit/connect-core";
|
|
20130
20134
|
import * as dnum5 from "dnum";
|
|
20131
20135
|
import { useMemo as useMemo31 } from "react";
|
|
20132
20136
|
|
|
@@ -20470,6 +20474,17 @@ var processWalletAssets = (walletAssets, targetChain, isStablecoin) => {
|
|
|
20470
20474
|
if (!asset.symbol || !asset.contractAddress) {
|
|
20471
20475
|
return result;
|
|
20472
20476
|
}
|
|
20477
|
+
const tokenBalanceBaseUnit = parseBigInt(asset.tokenBalance);
|
|
20478
|
+
if (tokenBalanceBaseUnit === void 0 || tokenBalanceBaseUnit < 0n) {
|
|
20479
|
+
logger.warn("walletAssetsSkipped:malformedBalance", {
|
|
20480
|
+
chainId: asset.chainId,
|
|
20481
|
+
contractAddress: asset.contractAddress,
|
|
20482
|
+
symbol: asset.symbol,
|
|
20483
|
+
decimals: asset.decimals,
|
|
20484
|
+
tokenBalance: asset.tokenBalance
|
|
20485
|
+
});
|
|
20486
|
+
return result;
|
|
20487
|
+
}
|
|
20473
20488
|
const assetChainInfo = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO7[asset.chainId];
|
|
20474
20489
|
const isAssetOnMainnet = assetChainInfo?.isMainnet;
|
|
20475
20490
|
if (isCheckoutOnMainnet && !isAssetOnMainnet) {
|
|
@@ -20487,13 +20502,13 @@ var processWalletAssets = (walletAssets, targetChain, isStablecoin) => {
|
|
|
20487
20502
|
});
|
|
20488
20503
|
const normalizedTokenAddress = assetChainInfo?.nativeCurrency.symbol.toUpperCase() === asset.symbol.toUpperCase() ? FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS4 : asset.contractAddress;
|
|
20489
20504
|
const normalizeAmount = getNormalizedTokenBalance(
|
|
20490
|
-
|
|
20505
|
+
tokenBalanceBaseUnit,
|
|
20491
20506
|
asset.decimals
|
|
20492
20507
|
);
|
|
20493
20508
|
const unitPriceUsd = asset.price != null && isStablecoin(asset.symbol) ? 1 : asset.price;
|
|
20494
20509
|
const usdAmount = unitPriceUsd != null ? toDisplayNumber(
|
|
20495
20510
|
mulByPriceRoundedDown(
|
|
20496
|
-
dnum5.from([
|
|
20511
|
+
dnum5.from([tokenBalanceBaseUnit, asset.decimals]),
|
|
20497
20512
|
unitPriceUsd,
|
|
20498
20513
|
2
|
|
20499
20514
|
)
|
|
@@ -26134,6 +26149,7 @@ function useConnectedWalletShortcut({
|
|
|
26134
26149
|
]);
|
|
26135
26150
|
return {
|
|
26136
26151
|
showUseConnected,
|
|
26152
|
+
hasMultipleWalletsConnected,
|
|
26137
26153
|
connectedWalletAddress,
|
|
26138
26154
|
connectedWalletIconUrl
|
|
26139
26155
|
};
|
|
@@ -26163,7 +26179,12 @@ function WithdrawRecipientAddress({
|
|
|
26163
26179
|
const addressAtFocusRef = useRef21(recipientAddress);
|
|
26164
26180
|
const { updateCustomRecipient } = useCheckoutContext();
|
|
26165
26181
|
const showCheckAddressAlert = false;
|
|
26166
|
-
const {
|
|
26182
|
+
const {
|
|
26183
|
+
showUseConnected,
|
|
26184
|
+
hasMultipleWalletsConnected,
|
|
26185
|
+
connectedWalletAddress,
|
|
26186
|
+
connectedWalletIconUrl
|
|
26187
|
+
} = useConnectedWalletShortcut({ config });
|
|
26167
26188
|
const isPrefillConnectedAddressEnabled = useFeatureGate(
|
|
26168
26189
|
"enable-prefill-withdrawal-connected-address"
|
|
26169
26190
|
);
|
|
@@ -26171,6 +26192,7 @@ function WithdrawRecipientAddress({
|
|
|
26171
26192
|
firstAddress: recipientAddress,
|
|
26172
26193
|
secondAddress: connectedWalletAddress
|
|
26173
26194
|
});
|
|
26195
|
+
const showClearButton = isShowingConnectedAddress || hasMultipleWalletsConnected && recipientAddress !== "";
|
|
26174
26196
|
const inputRef = useRef21(null);
|
|
26175
26197
|
const { fontSize: connectedAddressFontSize } = useFittedText({
|
|
26176
26198
|
enabled: isShowingConnectedAddress,
|
|
@@ -26286,7 +26308,7 @@ function WithdrawRecipientAddress({
|
|
|
26286
26308
|
}
|
|
26287
26309
|
)
|
|
26288
26310
|
)) : void 0,
|
|
26289
|
-
suffix:
|
|
26311
|
+
suffix: showClearButton ? /* @__PURE__ */ React146.createElement(
|
|
26290
26312
|
FunIconButton,
|
|
26291
26313
|
{
|
|
26292
26314
|
icon: /* @__PURE__ */ React146.createElement(CloseIcon, { size: 8 }),
|
|
@@ -14,51 +14,54 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
tahoWallet
|
|
16
16
|
} from "./chunk-U74RFZOL.js";
|
|
17
|
-
import {
|
|
18
|
-
talismanWallet
|
|
19
|
-
} from "./chunk-IAYYWCVB.js";
|
|
20
17
|
import {
|
|
21
18
|
tokenPocketWallet
|
|
22
19
|
} from "./chunk-NXWG6FG2.js";
|
|
23
20
|
import {
|
|
24
|
-
|
|
25
|
-
} from "./chunk-
|
|
21
|
+
talismanWallet
|
|
22
|
+
} from "./chunk-IAYYWCVB.js";
|
|
23
|
+
import {
|
|
24
|
+
trustWallet
|
|
25
|
+
} from "./chunk-SR5CZR3L.js";
|
|
26
26
|
import {
|
|
27
27
|
uniswapWallet
|
|
28
28
|
} from "./chunk-UNDWHCDH.js";
|
|
29
29
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
30
|
+
tokenaryWallet
|
|
31
|
+
} from "./chunk-TPM5PUJD.js";
|
|
32
32
|
import {
|
|
33
33
|
walletConnectWallet
|
|
34
34
|
} from "./chunk-DUX4XCDV.js";
|
|
35
|
-
import {
|
|
36
|
-
rabbyWallet
|
|
37
|
-
} from "./chunk-RQ2GXOJL.js";
|
|
38
35
|
import {
|
|
39
36
|
phantomWallet
|
|
40
37
|
} from "./chunk-Q27YVDDH.js";
|
|
41
38
|
import {
|
|
42
|
-
|
|
43
|
-
} from "./chunk-
|
|
39
|
+
rabbyWallet
|
|
40
|
+
} from "./chunk-RQ2GXOJL.js";
|
|
44
41
|
import {
|
|
45
42
|
ramperWallet
|
|
46
43
|
} from "./chunk-GPXIBTWN.js";
|
|
44
|
+
import {
|
|
45
|
+
rainbowWallet
|
|
46
|
+
} from "./chunk-ZSSSLFQF.js";
|
|
47
47
|
import {
|
|
48
48
|
roninWallet
|
|
49
49
|
} from "./chunk-IA5432IR.js";
|
|
50
50
|
import {
|
|
51
51
|
safeheronWallet
|
|
52
52
|
} from "./chunk-UN3ONVNC.js";
|
|
53
|
-
import {
|
|
54
|
-
safepalWallet
|
|
55
|
-
} from "./chunk-BBB2J3US.js";
|
|
56
53
|
import {
|
|
57
54
|
safeWallet
|
|
58
55
|
} from "./chunk-IR3PJMVM.js";
|
|
56
|
+
import {
|
|
57
|
+
safepalWallet
|
|
58
|
+
} from "./chunk-BBB2J3US.js";
|
|
59
59
|
import {
|
|
60
60
|
ledgerWallet
|
|
61
61
|
} from "./chunk-BL4OC2EJ.js";
|
|
62
|
+
import {
|
|
63
|
+
metaMaskWallet
|
|
64
|
+
} from "./chunk-RXRYHMRI.js";
|
|
62
65
|
import {
|
|
63
66
|
mewWallet
|
|
64
67
|
} from "./chunk-DSPQXAB2.js";
|
|
@@ -68,9 +71,6 @@ import {
|
|
|
68
71
|
import {
|
|
69
72
|
okxWallet
|
|
70
73
|
} from "./chunk-CU5J53XR.js";
|
|
71
|
-
import {
|
|
72
|
-
metaMaskWallet
|
|
73
|
-
} from "./chunk-RXRYHMRI.js";
|
|
74
74
|
import {
|
|
75
75
|
omniWallet
|
|
76
76
|
} from "./chunk-2TAUCVX7.js";
|
|
@@ -80,15 +80,15 @@ import {
|
|
|
80
80
|
import {
|
|
81
81
|
oneKeyWallet
|
|
82
82
|
} from "./chunk-KN32ITJ7.js";
|
|
83
|
+
import {
|
|
84
|
+
enkryptWallet
|
|
85
|
+
} from "./chunk-Z6LDN2AN.js";
|
|
83
86
|
import {
|
|
84
87
|
foxWallet
|
|
85
88
|
} from "./chunk-U52QO5HF.js";
|
|
86
89
|
import {
|
|
87
90
|
frameWallet
|
|
88
91
|
} from "./chunk-B572YIAQ.js";
|
|
89
|
-
import {
|
|
90
|
-
enkryptWallet
|
|
91
|
-
} from "./chunk-Z6LDN2AN.js";
|
|
92
92
|
import {
|
|
93
93
|
frontierWallet
|
|
94
94
|
} from "./chunk-IWOMSW64.js";
|
|
@@ -107,9 +107,6 @@ import {
|
|
|
107
107
|
import {
|
|
108
108
|
bybitWallet
|
|
109
109
|
} from "./chunk-BBDNB5TQ.js";
|
|
110
|
-
import {
|
|
111
|
-
clvWallet
|
|
112
|
-
} from "./chunk-4FHNLTR3.js";
|
|
113
110
|
import {
|
|
114
111
|
coin98Wallet
|
|
115
112
|
} from "./chunk-RFCZYLNR.js";
|
|
@@ -117,39 +114,42 @@ import {
|
|
|
117
114
|
coinbaseWallet
|
|
118
115
|
} from "./chunk-SM2A3OSG.js";
|
|
119
116
|
import {
|
|
120
|
-
|
|
121
|
-
} from "./chunk-
|
|
117
|
+
bitverseWallet
|
|
118
|
+
} from "./chunk-5AEWIKRA.js";
|
|
119
|
+
import {
|
|
120
|
+
coreWallet
|
|
121
|
+
} from "./chunk-TRZDAXCQ.js";
|
|
122
122
|
import {
|
|
123
123
|
dawnWallet
|
|
124
124
|
} from "./chunk-LV6YV3DE.js";
|
|
125
125
|
import {
|
|
126
|
-
|
|
127
|
-
} from "./chunk-
|
|
126
|
+
customWallet
|
|
127
|
+
} from "./chunk-VKM5M5UK.js";
|
|
128
128
|
import {
|
|
129
129
|
desigWallet
|
|
130
130
|
} from "./chunk-DFHP75HV.js";
|
|
131
131
|
import {
|
|
132
132
|
argentWallet
|
|
133
133
|
} from "./chunk-XSDTNMQY.js";
|
|
134
|
+
import {
|
|
135
|
+
bitskiWallet
|
|
136
|
+
} from "./chunk-NPITCCJE.js";
|
|
134
137
|
import {
|
|
135
138
|
bifrostWallet
|
|
136
139
|
} from "./chunk-ALGPGI6V.js";
|
|
137
140
|
import {
|
|
138
141
|
bitgetWallet
|
|
139
142
|
} from "./chunk-HOCKAU5H.js";
|
|
140
|
-
import {
|
|
141
|
-
bitskiWallet
|
|
142
|
-
} from "./chunk-NPITCCJE.js";
|
|
143
|
-
import {
|
|
144
|
-
bitverseWallet
|
|
145
|
-
} from "./chunk-5AEWIKRA.js";
|
|
146
143
|
import {
|
|
147
144
|
bloomWallet
|
|
148
145
|
} from "./chunk-PNHDOC77.js";
|
|
149
|
-
import "./chunk-AALSJCUR.js";
|
|
150
146
|
import {
|
|
151
147
|
braveWallet
|
|
152
148
|
} from "./chunk-U2XXV45G.js";
|
|
149
|
+
import {
|
|
150
|
+
clvWallet
|
|
151
|
+
} from "./chunk-4FHNLTR3.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.10.
|
|
3
|
+
"version": "12.10.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": "8.5.
|
|
123
|
-
"@funkit/
|
|
124
|
-
"@funkit/
|
|
125
|
-
"@funkit/fun-relay": "3.1.
|
|
126
|
-
"@funkit/
|
|
122
|
+
"@funkit/api-base": "8.5.1",
|
|
123
|
+
"@funkit/connect-core": "8.4.0",
|
|
124
|
+
"@funkit/utils": "5.0.1",
|
|
125
|
+
"@funkit/fun-relay": "3.1.1",
|
|
126
|
+
"@funkit/chains": "2.4.1"
|
|
127
127
|
},
|
|
128
128
|
"repository": {
|
|
129
129
|
"type": "git",
|