@funkit/connect 10.2.1 → 10.4.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 +46 -0
- package/dist/{chunk-36KVHK22.js → chunk-L67HP4HQ.js} +1 -1
- package/dist/clients/chunk-2YWQL3AO.js +46 -0
- package/dist/clients/chunk-APQYFP6X.js +207 -0
- package/dist/clients/chunk-BNMZM23Q.js +42 -0
- package/dist/clients/chunk-HOORQPSY.js +4660 -0
- package/dist/clients/chunk-II5CZTBC.js +18 -0
- package/dist/clients/chunk-KNHO756P.js +28 -0
- package/dist/clients/chunk-L2KSNS7H.js +112 -0
- package/dist/clients/{chunk-ZAXSDMDU.js → chunk-M6C7MBQN.js} +2 -2
- package/dist/clients/chunk-OZ3KD24N.js +107 -0
- package/dist/clients/{chunk-E3USJY7A.js → chunk-RCMAGKMG.js} +35 -4
- package/dist/clients/fanatics.js +1 -1
- package/dist/clients/internal/nado/consts.d.ts +16 -0
- package/dist/clients/internal/nado/consts.js +13 -0
- package/dist/clients/internal/nado/encoding.d.ts +22 -0
- package/dist/clients/internal/nado/encoding.js +32 -0
- package/dist/clients/internal/nado/errors.d.ts +55 -0
- package/dist/clients/internal/nado/errors.js +15 -0
- package/dist/clients/internal/nado/fetch.d.ts +15 -0
- package/dist/clients/internal/nado/fetch.js +9 -0
- package/dist/clients/internal/nado/gateway.d.ts +83 -0
- package/dist/clients/internal/nado/gateway.js +23 -0
- package/dist/clients/internal/nado/hooks.d.ts +360 -0
- package/dist/clients/internal/nado/hooks.js +132 -0
- package/dist/clients/internal/nado/indexer.d.ts +43 -0
- package/dist/clients/internal/nado/indexer.js +13 -0
- package/dist/clients/internal/nado/products.d.ts +36 -0
- package/dist/clients/internal/nado/products.js +19 -0
- package/dist/clients/internal/nado/typedData.d.ts +80 -0
- package/dist/clients/internal/nado/typedData.js +43 -0
- package/dist/clients/lighter.css +12 -1
- package/dist/clients/lighter.js +118 -42
- package/dist/clients/mallard.js +9 -24
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +12 -1
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +3 -3
- package/dist/clients/polymarket/index.css +12 -1
- package/dist/clients/polymarket/index.js +3 -3
- package/dist/components/ChainIcon/ChainIcon.d.ts +16 -0
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/hooks.d.ts +1 -2
- package/dist/components/FreeUsdcBanner/FreeUsdcBanner.d.ts +1 -1
- package/dist/components/FunAssetAvatar/FunAssetAvatar.d.ts +1 -2
- package/dist/components/FunInput/FunInput.d.ts +2 -0
- package/dist/components/FunkitTrans.d.ts +14 -0
- package/dist/hooks/useChainMetadata.d.ts +11 -0
- package/dist/hooks/useFunkitTranslation.d.ts +3 -1
- package/dist/hooks/usePaymentMethodTabs.d.ts +10 -1
- package/dist/hooks/useSwappedIframeLifecycle.d.ts +5 -2
- package/dist/hooks/useSwappedPreload.d.ts +8 -3
- package/dist/hooks/useUserIpInfo.d.ts +1 -19
- package/dist/index.css +12 -1
- package/dist/index.js +15902 -15844
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.css.d.ts +1 -0
- package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +6 -2
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +29 -0
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframe.d.ts +4 -1
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframeController.d.ts +3 -0
- package/dist/modals/CheckoutModal/Withdrawal/WithdrawalComplete.d.ts +15 -1
- package/dist/modals/CheckoutModal/Withdrawal/WithdrawalEnterAmount.d.ts +12 -1
- package/dist/modals/CheckoutModal/isWithdrawalStep.d.ts +25 -0
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +15 -1
- package/dist/modals/WithdrawalModal/WithdrawalMethodSelect.d.ts +5 -1
- package/dist/providers/FunkitCheckoutContext/index.d.ts +15 -1
- package/dist/providers/FunkitCheckoutContext/types.d.ts +34 -5
- package/dist/providers/FunkitConfigContext.d.ts +4 -0
- package/dist/providers/FunkitI18nProvider.d.ts +6 -2
- package/dist/providers/SwappedProvider.d.ts +5 -3
- package/dist/themes/darkTheme.js +1 -1
- package/dist/utils/tokenIconUrl.d.ts +5 -0
- 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 +59 -59
- 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 +7 -5
- package/dist/clients/chunk-STLOQEN7.js +0 -11
- package/dist/components/FunInput/FunTextAreaInput.css.d.ts +0 -1
- package/dist/components/FunInput/FunTextAreaInput.d.ts +0 -3
- package/dist/components/Icons/AcornsIcon.d.ts +0 -4
- package/dist/components/Icons/AlpacaIcon.d.ts +0 -4
- package/dist/components/Icons/BitFlyerIcon.d.ts +0 -4
- package/dist/components/Icons/BitfinexIcon.d.ts +0 -4
- package/dist/components/Icons/BitstampIcon.d.ts +0 -4
- package/dist/components/Icons/BrokerageIcon.d.ts +0 -4
- package/dist/components/Icons/CexloIcon.d.ts +0 -4
- package/dist/components/Icons/CoinlistIcon.d.ts +0 -4
- package/dist/components/Icons/CryptoComIcon.d.ts +0 -4
- package/dist/components/Icons/CryptoIcon.d.ts +0 -2
- package/dist/components/Icons/DeviceConfirmationIcon.d.ts +0 -2
- package/dist/components/Icons/EmailConfirmationIcon.d.ts +0 -2
- package/dist/components/Icons/EtoroIcon.d.ts +0 -4
- package/dist/components/Icons/EtradeIcon.d.ts +0 -4
- package/dist/components/Icons/HuobiIcon.d.ts +0 -4
- package/dist/components/Icons/KucoinIcon.d.ts +0 -4
- package/dist/components/Icons/LightningBoltIcon.d.ts +0 -4
- package/dist/components/Icons/LockIcon.d.ts +0 -4
- package/dist/components/Icons/MailIcon.d.ts +0 -6
- package/dist/components/Icons/New/LinkExternalIcon.d.ts +0 -4
- package/dist/components/Icons/New/MessageIcon.d.ts +0 -2
- package/dist/components/Icons/OkcoinIcon.d.ts +0 -4
- package/dist/components/Icons/OkxIcon.d.ts +0 -4
- package/dist/components/Icons/PublicIcon.d.ts +0 -4
- package/dist/components/Icons/RobinhoodIcon.d.ts +0 -4
- package/dist/components/Icons/SocialMediaIcons.d.ts +0 -13
- package/dist/components/Icons/SocialsIcon.d.ts +0 -2
- package/dist/components/Icons/StashIcon.d.ts +0 -4
- package/dist/components/Icons/WeBullIcon.d.ts +0 -4
- package/dist/components/Icons/WhitelistIcon.d.ts +0 -2
- package/dist/hooks/useIsUsUser.d.ts +0 -1
- package/dist/utils/privyHelper.d.ts +0 -3
- package/dist/utils/safeJSON.d.ts +0 -5
- package/dist/utils/tokenTransfer/disabledList.d.ts +0 -1
- package/dist/wallets/walletConnectors/{chunk-RB3HR4R2.js → chunk-4NV5BYRP.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-YEZM4CK4.js → chunk-AVDUNQUW.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-MIQTHJ6X.js → chunk-GUQM4QSL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-4T6ZSRJF.js → chunk-IULPZP2Q.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-HNRB7KJU.js → chunk-JPN6TWIT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ZNX4EMPB.js → chunk-KCRO2AGO.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-STVVP43G.js → chunk-KI5Y2BBF.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-X6CGV36L.js → chunk-NR2OGDHQ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-UK7C2JXW.js → chunk-OEEGYENV.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-F5XEEVG6.js → chunk-OX37G4YT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RVOY537T.js → chunk-SWFF3TWJ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-CPI4TD43.js → chunk-TKB2OY6G.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-2VP2F6EK.js → chunk-W2LCLDPX.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-6BW3HLBG.js → chunk-WAHGI5L7.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-HTHAK6XB.js → chunk-WKNQMP4A.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-VTM6EECM.js → chunk-XCNHV3HS.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-CCQV2ZET.js → chunk-YO2K4MBH.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-VAPGUPHO.js → chunk-YQFGVZGR.js} +3 -3
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
INK_CHAIN_ID,
|
|
4
|
+
NADO_EIP712_VERIFYING_CONTRACT_ADDRESS
|
|
5
|
+
} from "../../chunk-II5CZTBC.js";
|
|
6
|
+
|
|
7
|
+
// src/clients/internal/nado/typedData.ts
|
|
8
|
+
var WITHDRAW_COLLATERAL_V2_TYPES = {
|
|
9
|
+
WithdrawCollateralV2: [
|
|
10
|
+
{ name: "sender", type: "bytes32" },
|
|
11
|
+
{ name: "productId", type: "uint32" },
|
|
12
|
+
{ name: "amount", type: "uint128" },
|
|
13
|
+
{ name: "nonce", type: "uint64" },
|
|
14
|
+
{ name: "sendTo", type: "address" },
|
|
15
|
+
// Reserved by Nado — must be signed as 0
|
|
16
|
+
{ name: "appendix", type: "uint128" }
|
|
17
|
+
]
|
|
18
|
+
};
|
|
19
|
+
function buildWithdrawCollateralV2TypedData(params) {
|
|
20
|
+
return {
|
|
21
|
+
domain: {
|
|
22
|
+
name: "Nado",
|
|
23
|
+
version: "0.0.1",
|
|
24
|
+
chainId: INK_CHAIN_ID,
|
|
25
|
+
verifyingContract: NADO_EIP712_VERIFYING_CONTRACT_ADDRESS
|
|
26
|
+
},
|
|
27
|
+
types: WITHDRAW_COLLATERAL_V2_TYPES,
|
|
28
|
+
primaryType: "WithdrawCollateralV2",
|
|
29
|
+
message: {
|
|
30
|
+
sender: params.sender,
|
|
31
|
+
productId: params.productId,
|
|
32
|
+
amount: params.amount,
|
|
33
|
+
nonce: params.nonce,
|
|
34
|
+
sendTo: params.sendTo,
|
|
35
|
+
appendix: 0n
|
|
36
|
+
// set to 0, Nado reserved
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
WITHDRAW_COLLATERAL_V2_TYPES,
|
|
42
|
+
buildWithdrawCollateralV2TypedData
|
|
43
|
+
};
|
package/dist/clients/lighter.css
CHANGED
|
@@ -16154,7 +16154,7 @@
|
|
|
16154
16154
|
flex: 0 0 auto;
|
|
16155
16155
|
}
|
|
16156
16156
|
|
|
16157
|
-
/* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#
|
|
16157
|
+
/* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#H4sIAAAAAAAAA7VXyW7bMBC95ytY5BIDZSAvyqIARdF7b70XY3IssaZIgaJsp0X-vdBiRRTlROxySaDhvHnDWenb78vip92s1kvy64qQHE40Q5FmNiHxKi5OT53wKLjNErKMosOxlnXfmziqdV6ubns7SQblzXWpK8OQsgxUirSAFBcewUNL4IOt3qOi1oAqd2hC0bI-V0KlVKiDFiyYfifAUo4WhAyFMq12wuRghVbh2LyQaIPdPQqbcQNHkPQfmNhJfQy7sEJmKZ7aVP8Zaa55472yqGyAifIIRYGcip2BHBcfydsKVGrgQqU-Q-wxrFodoc6lv36I2nZwvweQdThkEw6JG0gBvL4JNa3_0dNAJnHXigao-zGRUMIKkAMqBpLdNA1OKFlHxWnxNM5DVB4y12xIw0Y12JU9xhcszm7iEKMzGnuWucf3g9kPSjcpqy67o_SdxRPBJmSrDUdDrS4aI9QAF1WZkAOYG0rNvhGItoe-6q2QuBjBGpZA3FZbq3OXMfLPXdMTCl08mhN9QFPPl4RkgnNUT10Uz1d2S_YxYJN4hfkYVJgX0POL8IKBOQV3ATpnk1zGvr0GLuECNskMExc2yRsXfm-TeFAIH5-sgZwrkZ6GtdhLnxMCldW1rGRGS7kFQ9PKWjQJKS1sJbpnHV2lSrQuXZLQI273wtJeu_GAi7KQ8Nxjepfv2gtsge1ToyvFKdNSm0HfNt9l27hferXFu7zUZlW-bdi7Hn1rJCzmeWHRWAHm-Rue7BwXDLB968LfXZC_c8H_ZT3J6iqZyVEi04pPRgfdKthJbNJe_6dcGGR14yeEaVnlTXGeu6DeLG4X7EJN-TXdF6FX0korHPfGa8d0Sm2zDFxKnUdK_yCZerc4e3XUpuEGPhEuDt3fyflBPoi80MaCsiPoNcuQ7XVlKRcgdXp-j0554ljxnRod-_E-T5epiTPaiG0iE7IkSz_OQ6_bR3S3ds9jJjSCWYNqFqZoy0YXwIR9JtHtqiQIJVKhqK7c6AkPBlKS6DYeQdyErOJuWvsPg4HtH14iO5RPt-noOq4ps59z5ALqlCAqAoqTm8H-uL97KE7t5nn9KdF8jn_yEvIyVFp1SlO7aLyNRtC1D92sxtBe4kA3E9DYg046DBNQz-HNq8MvvwEP3cWjKhAAAA */
|
|
16158
16158
|
[data-rk] ._1pzt4231 {
|
|
16159
16159
|
max-height: 525px;
|
|
16160
16160
|
max-width: 100vw;
|
|
@@ -16178,6 +16178,9 @@
|
|
|
16178
16178
|
[data-rk] ._1pzt4231:has(#complete-page) {
|
|
16179
16179
|
max-height: 825px;
|
|
16180
16180
|
}
|
|
16181
|
+
[data-rk] ._1pzt4231:has(#withdrawal-complete-page) {
|
|
16182
|
+
max-height: 825px;
|
|
16183
|
+
}
|
|
16181
16184
|
[data-rk] ._1pzt4231:has(#withdrawal-flow) {
|
|
16182
16185
|
max-height: 825px;
|
|
16183
16186
|
}
|
|
@@ -16256,6 +16259,9 @@
|
|
|
16256
16259
|
[data-rk] ._1pzt4239:has(#complete-page) {
|
|
16257
16260
|
max-height: 80svh;
|
|
16258
16261
|
}
|
|
16262
|
+
[data-rk] ._1pzt4239:has(#withdrawal-complete-page) {
|
|
16263
|
+
max-height: 80svh;
|
|
16264
|
+
}
|
|
16259
16265
|
[data-rk] ._1pzt4239:has(#withdrawal-flow) {
|
|
16260
16266
|
max-height: 80svh;
|
|
16261
16267
|
}
|
|
@@ -17177,6 +17183,11 @@
|
|
|
17177
17183
|
var(--rk-colors-offBackground) 91.45%);
|
|
17178
17184
|
}
|
|
17179
17185
|
|
|
17186
|
+
/* vanilla-extract-css-ns:src/modals/CheckoutModal/InputAmount/InputAmount.css.ts.vanilla.css?source=LnJ2eGFwaDAgewogIGZvbnQtc2l6ZTogaW5oZXJpdCAhaW1wb3J0YW50Owp9 */
|
|
17187
|
+
[data-rk] .rvxaph0 {
|
|
17188
|
+
font-size: inherit !important;
|
|
17189
|
+
}
|
|
17190
|
+
|
|
17180
17191
|
/* vanilla-extract-css-ns:src/components/CopyAddress/CopyInputDisplayedAddress.css.ts.vanilla.css?source=#H4sIAAAAAAAAA81W247bNhB9368YBFjABkSBsiMnq7wEST8i7UtBUSObME0KJL22U-y_F6QuFiXHcVOgKAyY4m3mzJnhIT_v8VIbdkALf2b78juKlxr-egKgz6EBcIYpW2tzINqIrVAF5PQZ6POneLZoPyVz-PuCLsFoxxx-W9AKt0uwnElcZMt2k24YF-5SQOb7b08AWd67m89t6GyOpu9bS7WQDk0BpTyaxao5LweD9F8FsKHP1xDIehxEuplGQW9g2QxY3p4-zznedhwno8hv4_SB3ENKIqiPIPX0fJxzmj1M3c8g_cPsvz2lPS3r4FcfnRQKCddSmwJemVkQYvZt3xLGndDqq-_8JiwrJVbBcqlNhYaU2jl9IBJrRwyrxNEWwJnki8GOHxWEa6WQuy9H57RaAoGsS1lsx4jt7hcNBUqEB1sAkxKynB4s8GMpOCnxu0CzoOk6AZoATekmAc_QiI33gQ1C-A75ngiuFalQsksBaZbbT7M5ZndE17VFV_gczRa0c70NGiw0ukdoUDInXtGPnkTldgVkm-bsuzv0JFz7lbBNsLE1ogpWJONIhMOD5wiVQxNHUhQl1tpgiIhr5VC5At69iyGw0mp5dAGC000Bq9afz-XQ6bC9xNC6bpe7Pl2rfvRM7I5V-lSAUBYd0PDL0rw5Az8ag8qFgpqmbShwSFe5TVrn3XfruutEjsNYbKpnva2daUYn5UKcOAi1JfVR8RbHpGhWeSiZUDg5TSBLKV1OGWe1Q_M44aYlcqDMV_9_RzqXoiEN804aLS9brbyE-qMR5Khv_V_ijXTtpjkn_g824zMXKdaw72e57XTpf5C8PGRtJK4jPY-WecLCWuuM3mOQgF4B5mCv-hDYDLhHG5kxPsiMtmQnvYZ0S7oSWKX5lMiZc0jXM537QdQP0TwWrpiCzQ2JHMvg6oYMRvp3RyDTlY19RSLWS-Tal3MkksPI5Fx8aEdv3ZkLkn7IfSm37XLq93qUZ0XRkji-4UdbP1733Cz62WU0ShKdJWkC-o_FpGxfpgiHpd8WK9qcl3f2srD39m00XDdChXdBLfEcbS7D5mFZKTXfj6-x7vCfdsIhsQ3jWIDSJ8OawN0rmlp6mdqJqkIV4sWzI9cJlFI0VsT1wO9AbtDYBrnvBv-T1BPrLhILaAxaNK9I1lVkuooD6uIe4mJKHFg4MYodsD8w8WgCSitcxsujAzYZToDa6fKjYW1stBfF6-QvytzYRC2kJAddYQG1NidmKhsV8xRnNzF7KOEPC--R9_H9R-6d1wm9vk3oY7hD0f8NJKC0rHMNAAA */
|
|
17181
17192
|
@keyframes _1kbzei9f {
|
|
17182
17193
|
0% {
|
package/dist/clients/lighter.js
CHANGED
|
@@ -3,15 +3,17 @@ import {
|
|
|
3
3
|
AsyncImage
|
|
4
4
|
} from "./chunk-2NBYHUIW.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
chainMetadataById,
|
|
7
|
+
useFunkitConfig,
|
|
8
|
+
useFunkitConnectChainsById
|
|
9
|
+
} from "./chunk-RCMAGKMG.js";
|
|
8
10
|
import {
|
|
9
11
|
Box
|
|
10
12
|
} from "./chunk-LUHEVXPD.js";
|
|
11
13
|
import "./chunk-UPZNKPYU.js";
|
|
12
14
|
import {
|
|
13
15
|
useFunkitTranslation
|
|
14
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HOORQPSY.js";
|
|
15
17
|
import {
|
|
16
18
|
logger
|
|
17
19
|
} from "./chunk-AHYOV7AV.js";
|
|
@@ -25,16 +27,106 @@ import {
|
|
|
25
27
|
import { LIGHTER_CHAIN_ID, SOLANA_MAINNET_CHAIN_ID } from "@funkit/chains";
|
|
26
28
|
import { RELAY_LIGHTER_CHAIN_ID as RELAY_LIGHTER_CHAIN_ID2 } from "@funkit/fun-relay";
|
|
27
29
|
import { retry } from "@lifeomic/attempt";
|
|
28
|
-
import { useQuery as
|
|
30
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
29
31
|
import i18next from "i18next";
|
|
30
|
-
import
|
|
32
|
+
import React4, { useMemo as useMemo2 } from "react";
|
|
31
33
|
import { v4 as uuid } from "uuid";
|
|
32
34
|
import { pad, parseUnits, toHex } from "viem";
|
|
33
35
|
import { arbitrum, base, bsc, mainnet as mainnet3, optimism } from "viem/chains";
|
|
34
36
|
|
|
35
|
-
// src/components/
|
|
37
|
+
// src/components/ChainIcon/ChainIcon.tsx
|
|
36
38
|
import React from "react";
|
|
37
|
-
|
|
39
|
+
|
|
40
|
+
// src/consts/assets.ts
|
|
41
|
+
import {
|
|
42
|
+
ASSET_LOGO_SRCS,
|
|
43
|
+
FALLBACK_ASSET,
|
|
44
|
+
getAssetLogoSrc
|
|
45
|
+
} from "@funkit/fun-relay";
|
|
46
|
+
|
|
47
|
+
// src/hooks/useChainMetadata.ts
|
|
48
|
+
import { getChainIconUrl } from "@funkit/connect-core";
|
|
49
|
+
import { useCallback } from "react";
|
|
50
|
+
|
|
51
|
+
// src/hooks/useSupportedAssets.ts
|
|
52
|
+
import {
|
|
53
|
+
getSupportedAssets
|
|
54
|
+
} from "@funkit/api-base";
|
|
55
|
+
import { useQuery } from "@tanstack/react-query";
|
|
56
|
+
function useSupportedAssets(options) {
|
|
57
|
+
const { apiKey } = useFunkitConfig();
|
|
58
|
+
return useQuery({
|
|
59
|
+
queryKey: ["getSupportedAssets", apiKey],
|
|
60
|
+
queryFn: () => getSupportedAssets({ apiKey, logger }),
|
|
61
|
+
refetchOnMount: false,
|
|
62
|
+
refetchOnReconnect: false,
|
|
63
|
+
refetchOnWindowFocus: false,
|
|
64
|
+
staleTime: 5 * 60 * 1e3,
|
|
65
|
+
gcTime: Number.POSITIVE_INFINITY,
|
|
66
|
+
enabled: !!apiKey && (options?.enabled ?? true)
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// src/hooks/useChainMetadata.ts
|
|
71
|
+
function useChainMetadata() {
|
|
72
|
+
const { data: supportedAssets } = useSupportedAssets();
|
|
73
|
+
const enabledChainsById = useFunkitConnectChainsById();
|
|
74
|
+
return useCallback(
|
|
75
|
+
(chainId) => {
|
|
76
|
+
if (!Number.isFinite(chainId)) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
const chainMetadata = chainMetadataById[chainId];
|
|
80
|
+
const enabledChain = enabledChainsById[chainId];
|
|
81
|
+
const supportedAssetsChainName = Object.values(
|
|
82
|
+
supportedAssets?.[chainId] ?? {}
|
|
83
|
+
)[0]?.chainName;
|
|
84
|
+
const chainName = chainMetadata?.name ?? supportedAssetsChainName ?? enabledChain?.name;
|
|
85
|
+
if (!chainName) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
name: chainName,
|
|
90
|
+
iconUrl: chainMetadata?.iconUrl ?? enabledChain?.iconUrl ?? getChainIconUrl(chainName),
|
|
91
|
+
iconBackground: chainMetadata?.iconBackground ?? enabledChain?.iconBackground
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
[supportedAssets, enabledChainsById]
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// src/components/ChainIcon/ChainIcon.tsx
|
|
99
|
+
function ChainIcon({
|
|
100
|
+
chainId,
|
|
101
|
+
size,
|
|
102
|
+
borderColor,
|
|
103
|
+
withIconBackground = false,
|
|
104
|
+
testId
|
|
105
|
+
}) {
|
|
106
|
+
const getChainMetadata = useChainMetadata();
|
|
107
|
+
const chainMetadata = getChainMetadata(chainId);
|
|
108
|
+
if (!chainMetadata) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
return /* @__PURE__ */ React.createElement(
|
|
112
|
+
AsyncImage,
|
|
113
|
+
{
|
|
114
|
+
alt: chainMetadata.name,
|
|
115
|
+
background: withIconBackground ? chainMetadata.iconBackground : void 0,
|
|
116
|
+
borderColor,
|
|
117
|
+
borderRadius: "full",
|
|
118
|
+
fallbackSrc: FALLBACK_ASSET,
|
|
119
|
+
height: size,
|
|
120
|
+
src: chainMetadata.iconUrl,
|
|
121
|
+
testId,
|
|
122
|
+
width: size
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// src/components/Icons/EvmWallet.tsx
|
|
128
|
+
import React2 from "react";
|
|
129
|
+
var EvmWallet = ({ size = 20 }) => /* @__PURE__ */ React2.createElement(
|
|
38
130
|
"svg",
|
|
39
131
|
{
|
|
40
132
|
width: size,
|
|
@@ -43,7 +135,7 @@ var EvmWallet = ({ size = 20 }) => /* @__PURE__ */ React.createElement(
|
|
|
43
135
|
fill: "none",
|
|
44
136
|
xmlns: "http://www.w3.org/2000/svg"
|
|
45
137
|
},
|
|
46
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ React2.createElement(
|
|
47
139
|
"path",
|
|
48
140
|
{
|
|
49
141
|
d: "M13.3333 6.66628V3.75016C13.3333 3.05704 13.3333 2.71048 13.1873 2.49751C13.0598 2.31143 12.8622 2.18503 12.6398 2.14718C12.3852 2.10386 12.0706 2.24909 11.4413 2.53955L4.04918 5.95127C3.48792 6.21031 3.20729 6.33984 3.00175 6.54071C2.82005 6.71829 2.68135 6.93507 2.59625 7.17447C2.5 7.44527 2.5 7.75435 2.5 8.3725V12.4996M13.75 12.0829H13.7583M2.5 9.33295L2.5 14.8329C2.5 15.7664 2.5 16.2331 2.68166 16.5896C2.84144 16.9032 3.09641 17.1582 3.41002 17.318C3.76654 17.4996 4.23325 17.4996 5.16667 17.4996H14.8333C15.7668 17.4996 16.2335 17.4996 16.59 17.318C16.9036 17.1582 17.1586 16.9032 17.3183 16.5896C17.5 16.2331 17.5 15.7664 17.5 14.8329V9.33295C17.5 8.39953 17.5 7.93282 17.3183 7.5763C17.1586 7.26269 16.9036 7.00773 16.59 6.84794C16.2335 6.66628 15.7668 6.66628 14.8333 6.66628L5.16667 6.66628C4.23325 6.66628 3.76654 6.66628 3.41002 6.84793C3.09641 7.00772 2.84144 7.26269 2.68166 7.57629C2.5 7.93281 2.5 8.39952 2.5 9.33295ZM14.1667 12.0829C14.1667 12.3131 13.9801 12.4996 13.75 12.4996C13.5199 12.4996 13.3333 12.3131 13.3333 12.0829C13.3333 11.8528 13.5199 11.6663 13.75 11.6663C13.9801 11.6663 14.1667 11.8528 14.1667 12.0829Z",
|
|
@@ -59,14 +151,13 @@ var EvmWallet = ({ size = 20 }) => /* @__PURE__ */ React.createElement(
|
|
|
59
151
|
import { RELAY_LIGHTER_CHAIN_ID } from "@funkit/fun-relay";
|
|
60
152
|
import { formatAddress, formatCryptoAndStringify } from "@funkit/utils";
|
|
61
153
|
import * as dnum from "dnum";
|
|
62
|
-
import
|
|
154
|
+
import React3, { useEffect, useMemo } from "react";
|
|
63
155
|
import { createPortal } from "react-dom";
|
|
64
|
-
import { Trans } from "react-i18next";
|
|
65
156
|
import { mainnet as mainnet2 } from "viem/chains";
|
|
66
157
|
|
|
67
158
|
// src/utils/customer.ts
|
|
68
|
-
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
69
|
-
import { useCallback } from "react";
|
|
159
|
+
import { useQuery as useQuery2, useQueryClient } from "@tanstack/react-query";
|
|
160
|
+
import { useCallback as useCallback2 } from "react";
|
|
70
161
|
|
|
71
162
|
// src/consts/customers.ts
|
|
72
163
|
import {
|
|
@@ -114,7 +205,7 @@ function useLighterAccounts({
|
|
|
114
205
|
const { apiKey } = useFunkitConfig();
|
|
115
206
|
const isLighter = isLighterxyzCustomer(apiKey);
|
|
116
207
|
const enabled = !!address && address !== "0x" && isLighter;
|
|
117
|
-
const query =
|
|
208
|
+
const query = useQuery2({
|
|
118
209
|
queryKey: ["lighterAccounts", address],
|
|
119
210
|
queryFn: () => getLighterAccountsByL1Address(address),
|
|
120
211
|
enabled,
|
|
@@ -138,9 +229,6 @@ function useLighterAccounts({
|
|
|
138
229
|
};
|
|
139
230
|
}
|
|
140
231
|
|
|
141
|
-
// src/providers/provideFunkitConnectChains.ts
|
|
142
|
-
import { chainMetadataById } from "@funkit/chains";
|
|
143
|
-
|
|
144
232
|
// src/utils/timeFormat.ts
|
|
145
233
|
import { formatSecondsToReadableForm } from "@funkit/utils";
|
|
146
234
|
function formatSecondsTranslated(seconds, t, specifyUnderMinute = false, omitSeconds = false) {
|
|
@@ -191,7 +279,7 @@ async function getLighterWithdrawalDelay() {
|
|
|
191
279
|
}
|
|
192
280
|
function useLighterSecureDelayText() {
|
|
193
281
|
const { t } = useFunkitTranslation();
|
|
194
|
-
const query =
|
|
282
|
+
const query = useQuery3({
|
|
195
283
|
queryKey: ["lighterWithdrawalDelay"],
|
|
196
284
|
queryFn: getLighterWithdrawalDelay,
|
|
197
285
|
staleTime: 6e4,
|
|
@@ -548,27 +636,15 @@ function buildLighterFastWalletWithdrawalConfig({
|
|
|
548
636
|
};
|
|
549
637
|
}
|
|
550
638
|
function ChainIconStack({ chainIds }) {
|
|
551
|
-
return /* @__PURE__ */
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
/* @__PURE__ */ React3.createElement(
|
|
561
|
-
AsyncImage,
|
|
562
|
-
{
|
|
563
|
-
alt: metadata?.name ?? "",
|
|
564
|
-
borderRadius: "full",
|
|
565
|
-
src: metadata?.iconUrl ?? "",
|
|
566
|
-
height: 16,
|
|
567
|
-
width: 16
|
|
568
|
-
}
|
|
569
|
-
)
|
|
570
|
-
);
|
|
571
|
-
}));
|
|
639
|
+
return /* @__PURE__ */ React4.createElement(Box, { display: "flex", alignItems: "center", justifyContent: "flex-end" }, chainIds.map((chainId, index) => /* @__PURE__ */ React4.createElement(
|
|
640
|
+
Box,
|
|
641
|
+
{
|
|
642
|
+
key: chainId,
|
|
643
|
+
position: "relative",
|
|
644
|
+
style: { right: `${(chainIds.length - index - 1) * -2}px` }
|
|
645
|
+
},
|
|
646
|
+
/* @__PURE__ */ React4.createElement(ChainIcon, { chainId, size: 16 })
|
|
647
|
+
)));
|
|
572
648
|
}
|
|
573
649
|
var LIGHTER_FAST_PREVIEW_CHAIN_IDS = [
|
|
574
650
|
arbitrum.id,
|
|
@@ -614,8 +690,8 @@ function buildLighterMultiMethodConfig({
|
|
|
614
690
|
subtitleText: t(
|
|
615
691
|
isUnifiedTradingMode ? "withdrawal.fastDisclaimerUnified" : "withdrawal.fastDisclaimer"
|
|
616
692
|
),
|
|
617
|
-
icon: /* @__PURE__ */
|
|
618
|
-
valueIcon: /* @__PURE__ */
|
|
693
|
+
icon: /* @__PURE__ */ React4.createElement(EvmWallet, { size: 20 }),
|
|
694
|
+
valueIcon: /* @__PURE__ */ React4.createElement(ChainIconStack, { chainIds: LIGHTER_FAST_PREVIEW_CHAIN_IDS }),
|
|
619
695
|
config: fastConfig
|
|
620
696
|
};
|
|
621
697
|
const secure = {
|
|
@@ -627,8 +703,8 @@ function buildLighterMultiMethodConfig({
|
|
|
627
703
|
// so it doesn't bleed into live values, which are exact.
|
|
628
704
|
delay: secureDelayText ?? t("withdrawal.secureFallbackDelay")
|
|
629
705
|
}),
|
|
630
|
-
icon: /* @__PURE__ */
|
|
631
|
-
valueIcon: /* @__PURE__ */
|
|
706
|
+
icon: /* @__PURE__ */ React4.createElement(EvmWallet, { size: 20 }),
|
|
707
|
+
valueIcon: /* @__PURE__ */ React4.createElement(ChainIconStack, { chainIds: LIGHTER_SECURE_PREVIEW_CHAIN_IDS }),
|
|
632
708
|
config: secureConfig
|
|
633
709
|
};
|
|
634
710
|
return {
|
package/dist/clients/mallard.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getAccount,
|
|
4
|
+
sendTransaction,
|
|
5
|
+
switchChain,
|
|
6
|
+
waitForTransactionReceipt
|
|
7
|
+
} from "./chunk-KNHO756P.js";
|
|
2
8
|
import {
|
|
3
9
|
useAccount,
|
|
4
10
|
useConfig
|
|
5
11
|
} from "./chunk-UPZNKPYU.js";
|
|
6
12
|
import {
|
|
7
13
|
useFunkitTranslation
|
|
8
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HOORQPSY.js";
|
|
9
15
|
import {
|
|
10
16
|
logger
|
|
11
17
|
} from "./chunk-AHYOV7AV.js";
|
|
@@ -16,31 +22,10 @@ import { VAULT_DEPOSITOR_ABI } from "@funkit/fun-relay";
|
|
|
16
22
|
import { useMemo } from "react";
|
|
17
23
|
import {
|
|
18
24
|
encodeFunctionData,
|
|
19
|
-
erc20Abi
|
|
25
|
+
erc20Abi,
|
|
20
26
|
getAddress,
|
|
21
27
|
maxUint256
|
|
22
28
|
} from "viem";
|
|
23
|
-
|
|
24
|
-
// src/wagmi/actions.ts
|
|
25
|
-
import { erc20Abi, formatUnits } from "viem";
|
|
26
|
-
import {
|
|
27
|
-
getBalance as getBalanceCore,
|
|
28
|
-
multicall as multicallCore
|
|
29
|
-
} from "wagmi/actions";
|
|
30
|
-
import {
|
|
31
|
-
estimateGas,
|
|
32
|
-
getAccount,
|
|
33
|
-
getGasPrice,
|
|
34
|
-
getTransaction,
|
|
35
|
-
getWalletClient,
|
|
36
|
-
multicall,
|
|
37
|
-
readContract,
|
|
38
|
-
sendTransaction,
|
|
39
|
-
switchChain,
|
|
40
|
-
waitForTransactionReceipt
|
|
41
|
-
} from "wagmi/actions";
|
|
42
|
-
|
|
43
|
-
// src/clients/mallard.tsx
|
|
44
29
|
var MALLARD_DEPOSIT_ADDRESS = getAddress(
|
|
45
30
|
"0xD42c46c7BaD6A54b38395F846b09981CE75fb8e2"
|
|
46
31
|
);
|
|
@@ -95,7 +80,7 @@ function createMallardDepositActions(config) {
|
|
|
95
80
|
// that's only needed for USDT-style tokens that require zeroing allowance first; USDG
|
|
96
81
|
// is standard ERC-20.
|
|
97
82
|
{
|
|
98
|
-
contractAbi:
|
|
83
|
+
contractAbi: erc20Abi,
|
|
99
84
|
contractAddress: token,
|
|
100
85
|
functionName: "approve",
|
|
101
86
|
functionArgs: [vaultDepositorAddress, maxUint256]
|
|
@@ -16154,7 +16154,7 @@
|
|
|
16154
16154
|
flex: 0 0 auto;
|
|
16155
16155
|
}
|
|
16156
16156
|
|
|
16157
|
-
/* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#
|
|
16157
|
+
/* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#H4sIAAAAAAAAA7VXyW7bMBC95ytY5BIDZSAvyqIARdF7b70XY3IssaZIgaJsp0X-vdBiRRTlROxySaDhvHnDWenb78vip92s1kvy64qQHE40Q5FmNiHxKi5OT53wKLjNErKMosOxlnXfmziqdV6ubns7SQblzXWpK8OQsgxUirSAFBcewUNL4IOt3qOi1oAqd2hC0bI-V0KlVKiDFiyYfifAUo4WhAyFMq12wuRghVbh2LyQaIPdPQqbcQNHkPQfmNhJfQy7sEJmKZ7aVP8Zaa55472yqGyAifIIRYGcip2BHBcfydsKVGrgQqU-Q-wxrFodoc6lv36I2nZwvweQdThkEw6JG0gBvL4JNa3_0dNAJnHXigao-zGRUMIKkAMqBpLdNA1OKFlHxWnxNM5DVB4y12xIw0Y12JU9xhcszm7iEKMzGnuWucf3g9kPSjcpqy67o_SdxRPBJmSrDUdDrS4aI9QAF1WZkAOYG0rNvhGItoe-6q2QuBjBGpZA3FZbq3OXMfLPXdMTCl08mhN9QFPPl4RkgnNUT10Uz1d2S_YxYJN4hfkYVJgX0POL8IKBOQV3ATpnk1zGvr0GLuECNskMExc2yRsXfm-TeFAIH5-sgZwrkZ6GtdhLnxMCldW1rGRGS7kFQ9PKWjQJKS1sJbpnHV2lSrQuXZLQI273wtJeu_GAi7KQ8Nxjepfv2gtsge1ToyvFKdNSm0HfNt9l27hferXFu7zUZlW-bdi7Hn1rJCzmeWHRWAHm-Rue7BwXDLB968LfXZC_c8H_ZT3J6iqZyVEi04pPRgfdKthJbNJe_6dcGGR14yeEaVnlTXGeu6DeLG4X7EJN-TXdF6FX0korHPfGa8d0Sm2zDFxKnUdK_yCZerc4e3XUpuEGPhEuDt3fyflBPoi80MaCsiPoNcuQ7XVlKRcgdXp-j0554ljxnRod-_E-T5epiTPaiG0iE7IkSz_OQ6_bR3S3ds9jJjSCWYNqFqZoy0YXwIR9JtHtqiQIJVKhqK7c6AkPBlKS6DYeQdyErOJuWvsPg4HtH14iO5RPt-noOq4ps59z5ALqlCAqAoqTm8H-uL97KE7t5nn9KdF8jn_yEvIyVFp1SlO7aLyNRtC1D92sxtBe4kA3E9DYg046DBNQz-HNq8MvvwEP3cWjKhAAAA */
|
|
16158
16158
|
[data-rk] ._1pzt4231 {
|
|
16159
16159
|
max-height: 525px;
|
|
16160
16160
|
max-width: 100vw;
|
|
@@ -16178,6 +16178,9 @@
|
|
|
16178
16178
|
[data-rk] ._1pzt4231:has(#complete-page) {
|
|
16179
16179
|
max-height: 825px;
|
|
16180
16180
|
}
|
|
16181
|
+
[data-rk] ._1pzt4231:has(#withdrawal-complete-page) {
|
|
16182
|
+
max-height: 825px;
|
|
16183
|
+
}
|
|
16181
16184
|
[data-rk] ._1pzt4231:has(#withdrawal-flow) {
|
|
16182
16185
|
max-height: 825px;
|
|
16183
16186
|
}
|
|
@@ -16256,6 +16259,9 @@
|
|
|
16256
16259
|
[data-rk] ._1pzt4239:has(#complete-page) {
|
|
16257
16260
|
max-height: 80svh;
|
|
16258
16261
|
}
|
|
16262
|
+
[data-rk] ._1pzt4239:has(#withdrawal-complete-page) {
|
|
16263
|
+
max-height: 80svh;
|
|
16264
|
+
}
|
|
16259
16265
|
[data-rk] ._1pzt4239:has(#withdrawal-flow) {
|
|
16260
16266
|
max-height: 80svh;
|
|
16261
16267
|
}
|
|
@@ -17099,6 +17105,11 @@
|
|
|
17099
17105
|
var(--rk-colors-offBackground) 91.45%);
|
|
17100
17106
|
}
|
|
17101
17107
|
|
|
17108
|
+
/* vanilla-extract-css-ns:src/modals/CheckoutModal/InputAmount/InputAmount.css.ts.vanilla.css?source=LnJ2eGFwaDAgewogIGZvbnQtc2l6ZTogaW5oZXJpdCAhaW1wb3J0YW50Owp9 */
|
|
17109
|
+
[data-rk] .rvxaph0 {
|
|
17110
|
+
font-size: inherit !important;
|
|
17111
|
+
}
|
|
17112
|
+
|
|
17102
17113
|
/* vanilla-extract-css-ns:src/components/CopyAddress/CopyInputDisplayedAddress.css.ts.vanilla.css?source=#H4sIAAAAAAAAA81W247bNhB9368YBFjABkSBsiMnq7wEST8i7UtBUSObME0KJL22U-y_F6QuFiXHcVOgKAyY4m3mzJnhIT_v8VIbdkALf2b78juKlxr-egKgz6EBcIYpW2tzINqIrVAF5PQZ6POneLZoPyVz-PuCLsFoxxx-W9AKt0uwnElcZMt2k24YF-5SQOb7b08AWd67m89t6GyOpu9bS7WQDk0BpTyaxao5LweD9F8FsKHP1xDIehxEuplGQW9g2QxY3p4-zznedhwno8hv4_SB3ENKIqiPIPX0fJxzmj1M3c8g_cPsvz2lPS3r4FcfnRQKCddSmwJemVkQYvZt3xLGndDqq-_8JiwrJVbBcqlNhYaU2jl9IBJrRwyrxNEWwJnki8GOHxWEa6WQuy9H57RaAoGsS1lsx4jt7hcNBUqEB1sAkxKynB4s8GMpOCnxu0CzoOk6AZoATekmAc_QiI33gQ1C-A75ngiuFalQsksBaZbbT7M5ZndE17VFV_gczRa0c70NGiw0ukdoUDInXtGPnkTldgVkm-bsuzv0JFz7lbBNsLE1ogpWJONIhMOD5wiVQxNHUhQl1tpgiIhr5VC5At69iyGw0mp5dAGC000Bq9afz-XQ6bC9xNC6bpe7Pl2rfvRM7I5V-lSAUBYd0PDL0rw5Az8ag8qFgpqmbShwSFe5TVrn3XfruutEjsNYbKpnva2daUYn5UKcOAi1JfVR8RbHpGhWeSiZUDg5TSBLKV1OGWe1Q_M44aYlcqDMV_9_RzqXoiEN804aLS9brbyE-qMR5Khv_V_ijXTtpjkn_g824zMXKdaw72e57XTpf5C8PGRtJK4jPY-WecLCWuuM3mOQgF4B5mCv-hDYDLhHG5kxPsiMtmQnvYZ0S7oSWKX5lMiZc0jXM537QdQP0TwWrpiCzQ2JHMvg6oYMRvp3RyDTlY19RSLWS-Tal3MkksPI5Fx8aEdv3ZkLkn7IfSm37XLq93qUZ0XRkji-4UdbP1733Cz62WU0ShKdJWkC-o_FpGxfpgiHpd8WK9qcl3f2srD39m00XDdChXdBLfEcbS7D5mFZKTXfj6-x7vCfdsIhsQ3jWIDSJ8OawN0rmlp6mdqJqkIV4sWzI9cJlFI0VsT1wO9AbtDYBrnvBv-T1BPrLhILaAxaNK9I1lVkuooD6uIe4mJKHFg4MYodsD8w8WgCSitcxsujAzYZToDa6fKjYW1stBfF6-QvytzYRC2kJAddYQG1NidmKhsV8xRnNzF7KOEPC--R9_H9R-6d1wm9vk3oY7hD0f8NJKC0rHMNAAA */
|
|
17103
17114
|
@keyframes _1kbzei9f {
|
|
17104
17115
|
0% {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
PolymarketDepositAccountDropdown
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-M6C7MBQN.js";
|
|
5
|
+
import "../chunk-RCMAGKMG.js";
|
|
6
6
|
import "../chunk-LUHEVXPD.js";
|
|
7
7
|
import "../chunk-UPZNKPYU.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-HOORQPSY.js";
|
|
9
9
|
import "../chunk-YFHTV7DT.js";
|
|
10
10
|
import "../chunk-6PIIYPQK.js";
|
|
11
11
|
import "../chunk-AHYOV7AV.js";
|
|
@@ -16154,7 +16154,7 @@
|
|
|
16154
16154
|
flex: 0 0 auto;
|
|
16155
16155
|
}
|
|
16156
16156
|
|
|
16157
|
-
/* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#
|
|
16157
|
+
/* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#H4sIAAAAAAAAA7VXyW7bMBC95ytY5BIDZSAvyqIARdF7b70XY3IssaZIgaJsp0X-vdBiRRTlROxySaDhvHnDWenb78vip92s1kvy64qQHE40Q5FmNiHxKi5OT53wKLjNErKMosOxlnXfmziqdV6ubns7SQblzXWpK8OQsgxUirSAFBcewUNL4IOt3qOi1oAqd2hC0bI-V0KlVKiDFiyYfifAUo4WhAyFMq12wuRghVbh2LyQaIPdPQqbcQNHkPQfmNhJfQy7sEJmKZ7aVP8Zaa55472yqGyAifIIRYGcip2BHBcfydsKVGrgQqU-Q-wxrFodoc6lv36I2nZwvweQdThkEw6JG0gBvL4JNa3_0dNAJnHXigao-zGRUMIKkAMqBpLdNA1OKFlHxWnxNM5DVB4y12xIw0Y12JU9xhcszm7iEKMzGnuWucf3g9kPSjcpqy67o_SdxRPBJmSrDUdDrS4aI9QAF1WZkAOYG0rNvhGItoe-6q2QuBjBGpZA3FZbq3OXMfLPXdMTCl08mhN9QFPPl4RkgnNUT10Uz1d2S_YxYJN4hfkYVJgX0POL8IKBOQV3ATpnk1zGvr0GLuECNskMExc2yRsXfm-TeFAIH5-sgZwrkZ6GtdhLnxMCldW1rGRGS7kFQ9PKWjQJKS1sJbpnHV2lSrQuXZLQI273wtJeu_GAi7KQ8Nxjepfv2gtsge1ToyvFKdNSm0HfNt9l27hferXFu7zUZlW-bdi7Hn1rJCzmeWHRWAHm-Rue7BwXDLB968LfXZC_c8H_ZT3J6iqZyVEi04pPRgfdKthJbNJe_6dcGGR14yeEaVnlTXGeu6DeLG4X7EJN-TXdF6FX0korHPfGa8d0Sm2zDFxKnUdK_yCZerc4e3XUpuEGPhEuDt3fyflBPoi80MaCsiPoNcuQ7XVlKRcgdXp-j0554ljxnRod-_E-T5epiTPaiG0iE7IkSz_OQ6_bR3S3ds9jJjSCWYNqFqZoy0YXwIR9JtHtqiQIJVKhqK7c6AkPBlKS6DYeQdyErOJuWvsPg4HtH14iO5RPt-noOq4ps59z5ALqlCAqAoqTm8H-uL97KE7t5nn9KdF8jn_yEvIyVFp1SlO7aLyNRtC1D92sxtBe4kA3E9DYg046DBNQz-HNq8MvvwEP3cWjKhAAAA */
|
|
16158
16158
|
[data-rk] ._1pzt4231 {
|
|
16159
16159
|
max-height: 525px;
|
|
16160
16160
|
max-width: 100vw;
|
|
@@ -16178,6 +16178,9 @@
|
|
|
16178
16178
|
[data-rk] ._1pzt4231:has(#complete-page) {
|
|
16179
16179
|
max-height: 825px;
|
|
16180
16180
|
}
|
|
16181
|
+
[data-rk] ._1pzt4231:has(#withdrawal-complete-page) {
|
|
16182
|
+
max-height: 825px;
|
|
16183
|
+
}
|
|
16181
16184
|
[data-rk] ._1pzt4231:has(#withdrawal-flow) {
|
|
16182
16185
|
max-height: 825px;
|
|
16183
16186
|
}
|
|
@@ -16256,6 +16259,9 @@
|
|
|
16256
16259
|
[data-rk] ._1pzt4239:has(#complete-page) {
|
|
16257
16260
|
max-height: 80svh;
|
|
16258
16261
|
}
|
|
16262
|
+
[data-rk] ._1pzt4239:has(#withdrawal-complete-page) {
|
|
16263
|
+
max-height: 80svh;
|
|
16264
|
+
}
|
|
16259
16265
|
[data-rk] ._1pzt4239:has(#withdrawal-flow) {
|
|
16260
16266
|
max-height: 80svh;
|
|
16261
16267
|
}
|
|
@@ -17099,6 +17105,11 @@
|
|
|
17099
17105
|
var(--rk-colors-offBackground) 91.45%);
|
|
17100
17106
|
}
|
|
17101
17107
|
|
|
17108
|
+
/* vanilla-extract-css-ns:src/modals/CheckoutModal/InputAmount/InputAmount.css.ts.vanilla.css?source=LnJ2eGFwaDAgewogIGZvbnQtc2l6ZTogaW5oZXJpdCAhaW1wb3J0YW50Owp9 */
|
|
17109
|
+
[data-rk] .rvxaph0 {
|
|
17110
|
+
font-size: inherit !important;
|
|
17111
|
+
}
|
|
17112
|
+
|
|
17102
17113
|
/* vanilla-extract-css-ns:src/components/CopyAddress/CopyInputDisplayedAddress.css.ts.vanilla.css?source=#H4sIAAAAAAAAA81W247bNhB9368YBFjABkSBsiMnq7wEST8i7UtBUSObME0KJL22U-y_F6QuFiXHcVOgKAyY4m3mzJnhIT_v8VIbdkALf2b78juKlxr-egKgz6EBcIYpW2tzINqIrVAF5PQZ6POneLZoPyVz-PuCLsFoxxx-W9AKt0uwnElcZMt2k24YF-5SQOb7b08AWd67m89t6GyOpu9bS7WQDk0BpTyaxao5LweD9F8FsKHP1xDIehxEuplGQW9g2QxY3p4-zznedhwno8hv4_SB3ENKIqiPIPX0fJxzmj1M3c8g_cPsvz2lPS3r4FcfnRQKCddSmwJemVkQYvZt3xLGndDqq-_8JiwrJVbBcqlNhYaU2jl9IBJrRwyrxNEWwJnki8GOHxWEa6WQuy9H57RaAoGsS1lsx4jt7hcNBUqEB1sAkxKynB4s8GMpOCnxu0CzoOk6AZoATekmAc_QiI33gQ1C-A75ngiuFalQsksBaZbbT7M5ZndE17VFV_gczRa0c70NGiw0ukdoUDInXtGPnkTldgVkm-bsuzv0JFz7lbBNsLE1ogpWJONIhMOD5wiVQxNHUhQl1tpgiIhr5VC5At69iyGw0mp5dAGC000Bq9afz-XQ6bC9xNC6bpe7Pl2rfvRM7I5V-lSAUBYd0PDL0rw5Az8ag8qFgpqmbShwSFe5TVrn3XfruutEjsNYbKpnva2daUYn5UKcOAi1JfVR8RbHpGhWeSiZUDg5TSBLKV1OGWe1Q_M44aYlcqDMV_9_RzqXoiEN804aLS9brbyE-qMR5Khv_V_ijXTtpjkn_g824zMXKdaw72e57XTpf5C8PGRtJK4jPY-WecLCWuuM3mOQgF4B5mCv-hDYDLhHG5kxPsiMtmQnvYZ0S7oSWKX5lMiZc0jXM537QdQP0TwWrpiCzQ2JHMvg6oYMRvp3RyDTlY19RSLWS-Tal3MkksPI5Fx8aEdv3ZkLkn7IfSm37XLq93qUZ0XRkji-4UdbP1733Cz62WU0ShKdJWkC-o_FpGxfpgiHpd8WK9qcl3f2srD39m00XDdChXdBLfEcbS7D5mFZKTXfj6-x7vCfdsIhsQ3jWIDSJ8OawN0rmlp6mdqJqkIV4sWzI9cJlFI0VsT1wO9AbtDYBrnvBv-T1BPrLhILaAxaNK9I1lVkuooD6uIe4mJKHFg4MYodsD8w8WgCSitcxsujAzYZToDa6fKjYW1stBfF6-QvytzYRC2kJAddYQG1NidmKhsV8xRnNzF7KOEPC--R9_H9R-6d1wm9vk3oY7hD0f8NJKC0rHMNAAA */
|
|
17103
17114
|
@keyframes _1kbzei9f {
|
|
17104
17115
|
0% {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
PolymarketDepositAccountDropdown
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-M6C7MBQN.js";
|
|
5
|
+
import "../chunk-RCMAGKMG.js";
|
|
6
6
|
import "../chunk-LUHEVXPD.js";
|
|
7
7
|
import "../chunk-UPZNKPYU.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-HOORQPSY.js";
|
|
9
9
|
import {
|
|
10
10
|
POLYMARKET_PERPS_ROUTING_ID,
|
|
11
11
|
POLYMARKET_PREDICTIONS_ROUTING_ID,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BoxProps } from '../Box/Box';
|
|
3
|
+
interface ChainIconProps {
|
|
4
|
+
chainId: number;
|
|
5
|
+
size: (BoxProps['height'] & BoxProps['width']) | number;
|
|
6
|
+
borderColor?: BoxProps['borderColor'];
|
|
7
|
+
/** Renders the chain's brand background color behind transparent icons. */
|
|
8
|
+
withIconBackground?: boolean;
|
|
9
|
+
testId?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Round chain icon resolved via useChainMetadata, degrading to FALLBACK_ASSET on
|
|
13
|
+
* load failure. Renders nothing for chains unknown to every source.
|
|
14
|
+
*/
|
|
15
|
+
export declare function ChainIcon({ chainId, size, borderColor, withIconBackground, testId, }: ChainIconProps): React.JSX.Element | null;
|
|
16
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { type BoxProps } from '../Box/Box';
|
|
3
|
-
export { CHECKOUT_MODAL_TITLE_COUNTDOWN_ID, MODAL_BOTTOM_BAR_IDS, useBottomSectionRef, useTitleCountdownRef, } from './hooks';
|
|
3
|
+
export { CHECKOUT_MODAL_TITLE_COUNTDOWN_ID, MODAL_BOTTOM_BAR_IDS, type ModalBottomBarIdType, useBottomSectionRef, useTitleCountdownRef, } from './hooks';
|
|
4
4
|
interface DialogProps {
|
|
5
5
|
open: boolean;
|
|
6
6
|
onClose: () => void;
|
|
@@ -4,7 +4,7 @@ export declare const MODAL_BOTTOM_BAR_IDS: {
|
|
|
4
4
|
readonly withdrawal: "withdrawal-modal-bottom-bar";
|
|
5
5
|
readonly connectwallet: "connect-wallet-modal-bottom-bar";
|
|
6
6
|
};
|
|
7
|
-
type ModalBottomBarIdType = keyof typeof MODAL_BOTTOM_BAR_IDS;
|
|
7
|
+
export type ModalBottomBarIdType = keyof typeof MODAL_BOTTOM_BAR_IDS;
|
|
8
8
|
export declare function useBottomSectionRef(modalBottomBarIdType?: ModalBottomBarIdType): HTMLElement | null;
|
|
9
9
|
export declare const CHECKOUT_MODAL_TITLE_COUNTDOWN_ID = "checkout-modal-title-countdown";
|
|
10
10
|
export declare function useTitleCountdownRef(): HTMLElement | null;
|
|
@@ -18,4 +18,3 @@ export declare function useConnectWalletBottomBarElement(): HTMLElement | null;
|
|
|
18
18
|
* @param setHasNoChildren - Setter to update if the node has no children
|
|
19
19
|
*/
|
|
20
20
|
export declare function useBottomBarHasNoChildren(): boolean;
|
|
21
|
-
export {};
|
|
@@ -7,9 +7,8 @@ interface FunAssetAvatarProps {
|
|
|
7
7
|
assetIconSize?: BoxProps['height'] & BoxProps['width'];
|
|
8
8
|
chainId?: string | number;
|
|
9
9
|
prioritizeDefaults?: boolean;
|
|
10
|
-
hideIfUnknown?: boolean;
|
|
11
10
|
largeChainIcon?: boolean;
|
|
12
11
|
isChainIconHidden?: boolean;
|
|
13
12
|
}
|
|
14
|
-
export declare function FunAssetAvatar({ assetSrc, assetTicker, assetName, assetIconSize, chainId, prioritizeDefaults,
|
|
13
|
+
export declare function FunAssetAvatar({ assetSrc, assetTicker, assetName, assetIconSize, chainId, prioritizeDefaults, largeChainIcon, isChainIconHidden, }: FunAssetAvatarProps): React.JSX.Element;
|
|
15
14
|
export {};
|
|
@@ -15,6 +15,8 @@ export interface FunInputProps<T = HTMLInputElement | HTMLTextAreaElement> {
|
|
|
15
15
|
onFocus?: () => void;
|
|
16
16
|
onBlur?: () => void;
|
|
17
17
|
inputStyle?: React.CSSProperties;
|
|
18
|
+
/** Extra class applied to the inner input/textarea element. */
|
|
19
|
+
inputClassName?: string;
|
|
18
20
|
inputProps?: React.HTMLProps<T> & {
|
|
19
21
|
type?: HTMLInputTypeAttribute;
|
|
20
22
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Trans } from 'react-i18next';
|
|
3
|
+
type FunkitTransProps = Omit<React.ComponentProps<typeof Trans>, 'i18n'>;
|
|
4
|
+
/**
|
|
5
|
+
* funkit's <Trans>, explicitly bound to funkit's private i18next instance.
|
|
6
|
+
*
|
|
7
|
+
* Never use react-i18next's Trans directly: it resolves its instance as
|
|
8
|
+
* props.i18n > React context > getI18n() global, so a bare <Trans> reads the
|
|
9
|
+
* HOST app's i18n (wrong resources, no transSupportBasicHtmlNodes) or nothing
|
|
10
|
+
* at all. Passing only t={t} is not enough — Trans resolves i18n separately
|
|
11
|
+
* for react options and interpolation.
|
|
12
|
+
*/
|
|
13
|
+
export declare function FunkitTrans(props: FunkitTransProps): React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ChainMetadata {
|
|
2
|
+
name: string;
|
|
3
|
+
iconUrl: string | (() => Promise<string>);
|
|
4
|
+
iconBackground?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Resolves a chain's display name and icon. Name priority: curated metadata,
|
|
8
|
+
* then the supported-assets API, then customer-supplied chains.
|
|
9
|
+
* Returns null for chains unknown to every source.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useChainMetadata(): (chainId: number) => ChainMetadata | null;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Custom hook for accessing translations in Funkit components
|
|
3
|
-
* Wrapper around react-i18next's useTranslation hook
|
|
3
|
+
* Wrapper around react-i18next's useTranslation hook, explicitly bound to
|
|
4
|
+
* funkit's private i18next instance — never the host app's React context or
|
|
5
|
+
* getI18n() global (react-i18next resolves props.i18n > context > global)
|
|
4
6
|
*
|
|
5
7
|
* @example
|
|
6
8
|
* ```tsx
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { type PaymentMethodType } from '../hooks/usePaymentSources';
|
|
2
|
-
export declare function usePaymentMethodTabs(
|
|
2
|
+
export declare function usePaymentMethodTabs({ isCashier, }: {
|
|
3
|
+
/**
|
|
4
|
+
* Explicit cashier intent (`props.formFactor === 'cashier'`), which the props
|
|
5
|
+
* union guarantees carries a `withdrawalConfig`. Gated further by the
|
|
6
|
+
* `enablecashierformfactor` Statsig config so the cashier can roll out per
|
|
7
|
+
* customer on top of the integrator's opt-in.
|
|
8
|
+
*/
|
|
9
|
+
isCashier: boolean;
|
|
10
|
+
}): {
|
|
3
11
|
defaultTab: PaymentMethodType;
|
|
12
|
+
isWithdrawalTabEnabled: boolean;
|
|
4
13
|
tabOrder: PaymentMethodType[];
|
|
5
14
|
};
|