@funkit/connect 1.2.1 → 1.2.3
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 +19 -0
- package/dist/components/ProfileDetails/FunProfileViews/Settings/Settings.d.ts +1 -2
- package/dist/config/getDefaultConfig.d.ts +32 -0
- package/dist/index.js +194 -198
- package/dist/klaytn-TJOHMGUS.js +6 -0
- package/dist/manta-JIF2AIAW.js +6 -0
- package/dist/mantle-RXIQTLNV.js +6 -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/{chunk-JRABHUUZ.js → chunk-MD5OPFAT.js} +1 -1
- 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 +70 -70
- 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/tokenaryWallet/tokenaryWallet.js +1 -1
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -45,7 +45,7 @@ function touchablePrimaryStyles({
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// src/hooks/useConnectionStatus.ts
|
|
48
|
-
import { useAccount as
|
|
48
|
+
import { useAccount as useAccount12 } from "wagmi";
|
|
49
49
|
|
|
50
50
|
// src/components/FunkitProvider/AuthenticationContext.tsx
|
|
51
51
|
import React, {
|
|
@@ -139,7 +139,7 @@ import React143, {
|
|
|
139
139
|
useMemo as useMemo34,
|
|
140
140
|
useState as useState40
|
|
141
141
|
} from "react";
|
|
142
|
-
import { useConnect as useConnect2, useDisconnect as useDisconnect3 } from "wagmi";
|
|
142
|
+
import { useConfig as useConfig5, useConnect as useConnect2, useDisconnect as useDisconnect3 } from "wagmi";
|
|
143
143
|
|
|
144
144
|
// src/consts/funkit.ts
|
|
145
145
|
import {
|
|
@@ -660,10 +660,22 @@ var hardhatIcon = {
|
|
|
660
660
|
iconBackground: "#f9f7ec",
|
|
661
661
|
iconUrl: async () => (await import("./hardhat-KHA6XAVO.js")).default
|
|
662
662
|
};
|
|
663
|
+
var klaytnIcon = {
|
|
664
|
+
iconBackground: "transparent",
|
|
665
|
+
iconUrl: async () => (await import("./klaytn-TJOHMGUS.js")).default
|
|
666
|
+
};
|
|
663
667
|
var optimismIcon = {
|
|
664
668
|
iconBackground: "#ff5a57",
|
|
665
669
|
iconUrl: async () => (await import("./optimism-D4AW5EQB.js")).default
|
|
666
670
|
};
|
|
671
|
+
var mantaIcon = {
|
|
672
|
+
iconBackground: "#ffffff",
|
|
673
|
+
iconUrl: async () => (await import("./manta-JIF2AIAW.js")).default
|
|
674
|
+
};
|
|
675
|
+
var mantleIcon = {
|
|
676
|
+
iconBackground: "#000000",
|
|
677
|
+
iconUrl: async () => (await import("./mantle-RXIQTLNV.js")).default
|
|
678
|
+
};
|
|
667
679
|
var polygonIcon = {
|
|
668
680
|
iconBackground: "#9f71ec",
|
|
669
681
|
iconUrl: async () => (await import("./polygon-ODE634XZ.js")).default
|
|
@@ -707,8 +719,15 @@ var chainMetadataByName = {
|
|
|
707
719
|
hardhat: { chainId: 31337, ...hardhatIcon },
|
|
708
720
|
holesky: { chainId: 17e3, ...ethereumIcon },
|
|
709
721
|
kovan: { chainId: 42, ...ethereumIcon },
|
|
722
|
+
klaytn: { chainId: 8217, name: "Klaytn", ...klaytnIcon },
|
|
723
|
+
klaytnBaobab: { chainId: 1001, name: "Klaytn Baobab", ...klaytnIcon },
|
|
710
724
|
localhost: { chainId: 1337, ...ethereumIcon },
|
|
711
725
|
mainnet: { chainId: 1, name: "Ethereum", ...ethereumIcon },
|
|
726
|
+
manta: { chainId: 169, name: "Manta", ...mantaIcon },
|
|
727
|
+
mantaSepolia: { chainId: 3441006, ...mantaIcon },
|
|
728
|
+
mantaTestnet: { chainId: 3441005, ...mantaIcon },
|
|
729
|
+
mantle: { chainId: 5e3, ...mantleIcon },
|
|
730
|
+
mantleTestnet: { chainId: 5001, ...mantleIcon },
|
|
712
731
|
optimism: { chainId: 10, name: "Optimism", ...optimismIcon },
|
|
713
732
|
optimismGoerli: { chainId: 420, ...optimismIcon },
|
|
714
733
|
optimismKovan: { chainId: 69, ...optimismIcon },
|
|
@@ -798,7 +817,7 @@ import React142, {
|
|
|
798
817
|
useMemo as useMemo33,
|
|
799
818
|
useState as useState39
|
|
800
819
|
} from "react";
|
|
801
|
-
import { useAccount as
|
|
820
|
+
import { useAccount as useAccount11, useAccountEffect as useAccountEffect2, useConfig as useConfig4 } from "wagmi";
|
|
802
821
|
|
|
803
822
|
// src/utils/checkoutHistory.ts
|
|
804
823
|
var combineDepositAddressAndInitialPage = ({
|
|
@@ -1404,6 +1423,8 @@ function DialogContent({
|
|
|
1404
1423
|
import { getAllWalletTokens } from "@funkit/api-base";
|
|
1405
1424
|
import {
|
|
1406
1425
|
Auth,
|
|
1426
|
+
Chain,
|
|
1427
|
+
configureEnvironment as configureEnvironment2,
|
|
1407
1428
|
FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO2,
|
|
1408
1429
|
FunWallet
|
|
1409
1430
|
} from "@funkit/core";
|
|
@@ -1670,6 +1691,9 @@ function GeneralWalletProvider({ children }) {
|
|
|
1670
1691
|
const provider = await ((_c = connector == null ? void 0 : connector.getProvider) == null ? void 0 : _c.call(connector));
|
|
1671
1692
|
if (!provider)
|
|
1672
1693
|
return;
|
|
1694
|
+
await configureEnvironment2({
|
|
1695
|
+
chain: await Chain.getChain({ chainIdentifier: activeChain == null ? void 0 : activeChain.id })
|
|
1696
|
+
});
|
|
1673
1697
|
newFunWalletAuth = new Auth({ provider });
|
|
1674
1698
|
newFunWallet = new FunWallet({
|
|
1675
1699
|
users: [{ userId: await newFunWalletAuth.getAddress() }],
|
|
@@ -1909,7 +1933,7 @@ import {
|
|
|
1909
1933
|
} from "@funkit/api-base";
|
|
1910
1934
|
import {
|
|
1911
1935
|
addOwnerTxParams,
|
|
1912
|
-
Chain,
|
|
1936
|
+
Chain as Chain2,
|
|
1913
1937
|
ContractInterface,
|
|
1914
1938
|
FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO5,
|
|
1915
1939
|
getDecimals,
|
|
@@ -1934,7 +1958,7 @@ import {
|
|
|
1934
1958
|
formatEther,
|
|
1935
1959
|
pad
|
|
1936
1960
|
} from "viem";
|
|
1937
|
-
import { useConfig as useConfig2 } from "wagmi";
|
|
1961
|
+
import { useAccount as useAccount3, useConfig as useConfig2 } from "wagmi";
|
|
1938
1962
|
|
|
1939
1963
|
// src/consts/checkout.ts
|
|
1940
1964
|
var CHECKOUT_STEP_MESSAGE_GENERATOR = {
|
|
@@ -2575,6 +2599,7 @@ var ONE_MINUTE_MS = 6e4;
|
|
|
2575
2599
|
function FunkitCheckoutProvider({ children }) {
|
|
2576
2600
|
const funkitConfig = useFunkitConfig();
|
|
2577
2601
|
const wagmiConfig = useConfig2();
|
|
2602
|
+
const { connector } = useAccount3();
|
|
2578
2603
|
const {
|
|
2579
2604
|
walletAddress,
|
|
2580
2605
|
accountBalancePaymentDefaultInfo,
|
|
@@ -2585,6 +2610,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
2585
2610
|
isWeb3Login,
|
|
2586
2611
|
isUserLoggedIn
|
|
2587
2612
|
} = useGeneralWallet();
|
|
2613
|
+
const { switchChainAsync } = useFunkitSwitchChains({});
|
|
2588
2614
|
const [activeCheckouts, setActiveCheckouts] = useState10({});
|
|
2589
2615
|
const [checkoutHistoryList, setCheckoutHistoryList] = useState10([]);
|
|
2590
2616
|
const {
|
|
@@ -3141,7 +3167,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
3141
3167
|
});
|
|
3142
3168
|
logger.log("originalTxParamsList", { txParamsList });
|
|
3143
3169
|
if (isWeb3Login) {
|
|
3144
|
-
const funChainItem = await
|
|
3170
|
+
const funChainItem = await Chain2.getChain({
|
|
3145
3171
|
chainIdentifier: assetChainId
|
|
3146
3172
|
});
|
|
3147
3173
|
const [funWalletAddress, isFunWalletInited, funRbacContractAddr] = await Promise.all([
|
|
@@ -3229,7 +3255,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
3229
3255
|
);
|
|
3230
3256
|
const _confirmCheckout = useCallback7(
|
|
3231
3257
|
async (checkoutId, shouldbatchOpBypassInit, stepMessageSetter) => {
|
|
3232
|
-
var _a, _b, _c;
|
|
3258
|
+
var _a, _b, _c, _d, _e;
|
|
3233
3259
|
if (!(funkitConfig == null ? void 0 : funkitConfig.apiKey)) {
|
|
3234
3260
|
throw new Error(
|
|
3235
3261
|
`Funkit Internal Error: Unable to detect funkit api key`
|
|
@@ -3246,6 +3272,12 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
3246
3272
|
const { isCheckoutPostActionRequired } = getCheckoutType(checkoutItem);
|
|
3247
3273
|
logger.log("beforeSignatureChecks", { isCheckoutPostActionRequired });
|
|
3248
3274
|
if (isCheckoutPostActionRequired) {
|
|
3275
|
+
const currentChainId = await ((_b = connector == null ? void 0 : connector.getChainId()) == null ? void 0 : _b.toString());
|
|
3276
|
+
if (!FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO5[checkoutItem.initSettings.config.targetChain].isStandardEvmAddress || currentChainId && !((_c = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO5[currentChainId]) == null ? void 0 : _c.isStandardEvmAddress)) {
|
|
3277
|
+
await switchChainAsync({
|
|
3278
|
+
chainId: parseInt(checkoutItem.initSettings.config.targetChain)
|
|
3279
|
+
});
|
|
3280
|
+
}
|
|
3249
3281
|
const signedBatchOperation = await _generateSignedBatchOperation(
|
|
3250
3282
|
checkoutItem.initSettings.config.actionsParams,
|
|
3251
3283
|
checkoutItem.initSettings.config.targetChain,
|
|
@@ -3269,7 +3301,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
3269
3301
|
}),
|
|
3270
3302
|
clientMetadata: _generateClientMetadataForBackend(checkoutId)
|
|
3271
3303
|
});
|
|
3272
|
-
(
|
|
3304
|
+
(_e = (_d = checkoutItem == null ? void 0 : checkoutItem.initSettings) == null ? void 0 : _d.onConfirmation) == null ? void 0 : _e.call(_d);
|
|
3273
3305
|
logger.log("checkoutConfirmed", { depositAddress });
|
|
3274
3306
|
setActiveCheckouts({
|
|
3275
3307
|
...activeCheckouts,
|
|
@@ -3461,6 +3493,7 @@ var useFunkitCheckout = (props) => {
|
|
|
3461
3493
|
const [pendingCheckoutConfig, setPendingCheckoutConfig] = useState10();
|
|
3462
3494
|
const beginCheckout = useCallback7(
|
|
3463
3495
|
async (inputConfig) => {
|
|
3496
|
+
var _a, _b;
|
|
3464
3497
|
const combinedConfig = {
|
|
3465
3498
|
...propsConfig || {},
|
|
3466
3499
|
...inputConfig || {}
|
|
@@ -3479,7 +3512,7 @@ var useFunkitCheckout = (props) => {
|
|
|
3479
3512
|
if (isUserLoggedIn || !!finalConfig.customRecipient) {
|
|
3480
3513
|
setPendingCheckoutConfig(void 0);
|
|
3481
3514
|
if (isUserLoggedIn) {
|
|
3482
|
-
if (!FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO5[finalConfig.targetChain].isMainnet) {
|
|
3515
|
+
if (!((_b = (_a = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO5) == null ? void 0 : _a[finalConfig.targetChain]) == null ? void 0 : _b.isMainnet)) {
|
|
3483
3516
|
onErrorWrapper == null ? void 0 : onErrorWrapper({
|
|
3484
3517
|
type: "error",
|
|
3485
3518
|
message: "Unable to begin a new checkout: Insufficient funds on testnet account",
|
|
@@ -3881,7 +3914,8 @@ var ASSET_LOGO_SRCS = {
|
|
|
3881
3914
|
TYBG: "https://assets.coingecko.com/coins/images/34563/large/tybg.png?1705400778",
|
|
3882
3915
|
LUCK: "https://pbs.twimg.com/profile_images/1798811045005516800/6UGU4Mjm_400x400.jpg",
|
|
3883
3916
|
WSTETH: "https://assets.coingecko.com/coins/images/18834/large/wstETH.png?1696518295",
|
|
3884
|
-
WETH: "https://www.cryptocompare.com/media/38553079/weth.png"
|
|
3917
|
+
WETH: "https://www.cryptocompare.com/media/38553079/weth.png",
|
|
3918
|
+
MNT: "https://img.cryptorank.io/coins/mantle1681720399218.png"
|
|
3885
3919
|
};
|
|
3886
3920
|
|
|
3887
3921
|
// src/components/AsyncImage/AsyncImage.tsx
|
|
@@ -4441,7 +4475,7 @@ import {
|
|
|
4441
4475
|
getTokenInfo as getTokenInfo2
|
|
4442
4476
|
} from "@funkit/core";
|
|
4443
4477
|
import React84, { useCallback as useCallback20, useEffect as useEffect21, useMemo as useMemo22, useState as useState25 } from "react";
|
|
4444
|
-
import { arbitrum, mainnet as mainnet3, zkSync } from "viem/chains";
|
|
4478
|
+
import { arbitrum, mainnet as mainnet3, mantle, zkSync } from "viem/chains";
|
|
4445
4479
|
|
|
4446
4480
|
// src/hooks/useCheckoutAccountBalanceTransfer.ts
|
|
4447
4481
|
import { useCallback as useCallback9 } from "react";
|
|
@@ -4523,7 +4557,7 @@ function useCheckoutQuoteNotification(checkoutId) {
|
|
|
4523
4557
|
|
|
4524
4558
|
// src/hooks/useMesh.tsx
|
|
4525
4559
|
import React46, { useCallback as useCallback11, useMemo as useMemo9, useRef as useRef5, useState as useState12 } from "react";
|
|
4526
|
-
import { useAccount as
|
|
4560
|
+
import { useAccount as useAccount4 } from "wagmi";
|
|
4527
4561
|
|
|
4528
4562
|
// src/components/FunDot/FunDot.tsx
|
|
4529
4563
|
import React34 from "react";
|
|
@@ -5233,7 +5267,7 @@ var useMeshNetworkInfo = (exchange) => {
|
|
|
5233
5267
|
};
|
|
5234
5268
|
};
|
|
5235
5269
|
var useMeshActiveNetworkInfo = (exchange) => {
|
|
5236
|
-
const { chain: activeChain } =
|
|
5270
|
+
const { chain: activeChain } = useAccount4();
|
|
5237
5271
|
const [meshNetworkId, setMeshNetworkId] = useState12(null);
|
|
5238
5272
|
const [meshSupportedTokens, setMeshSupportedTokens] = useState12([]);
|
|
5239
5273
|
const networkandExchange = useRef5(`${exchange}${meshNetworkId}`);
|
|
@@ -6812,7 +6846,7 @@ import {
|
|
|
6812
6846
|
isAddress as isAddress3
|
|
6813
6847
|
} from "@funkit/core";
|
|
6814
6848
|
import React78, { useCallback as useCallback17, useMemo as useMemo19, useState as useState22 } from "react";
|
|
6815
|
-
import { useAccount as
|
|
6849
|
+
import { useAccount as useAccount5, useSendTransaction, useWriteContract } from "wagmi";
|
|
6816
6850
|
|
|
6817
6851
|
// src/utils/deposit.ts
|
|
6818
6852
|
var MINIMUM_MOONPAY_DEPOSIT_AMOUNT_USD = 35;
|
|
@@ -7685,7 +7719,7 @@ function ChainLineItem({
|
|
|
7685
7719
|
testId: `chain-option-${chainId}-icon`
|
|
7686
7720
|
})), /* @__PURE__ */ React74.createElement("div", null, chainItem.name));
|
|
7687
7721
|
}
|
|
7688
|
-
var
|
|
7722
|
+
var Chain3 = ({
|
|
7689
7723
|
chainId,
|
|
7690
7724
|
currentChainId,
|
|
7691
7725
|
switchChain,
|
|
@@ -7747,7 +7781,7 @@ var Chain2 = ({
|
|
|
7747
7781
|
marginX: "8"
|
|
7748
7782
|
}));
|
|
7749
7783
|
};
|
|
7750
|
-
var Chain_default =
|
|
7784
|
+
var Chain_default = Chain3;
|
|
7751
7785
|
|
|
7752
7786
|
// src/components/FunTransactionSummary/FunTxSummaryComponents.tsx
|
|
7753
7787
|
import React76 from "react";
|
|
@@ -8201,7 +8235,7 @@ function FunCheckoutConfirmationStep({
|
|
|
8201
8235
|
generateCheckoutTransferOpItems
|
|
8202
8236
|
]
|
|
8203
8237
|
);
|
|
8204
|
-
const {
|
|
8238
|
+
const { connector } = useAccount5();
|
|
8205
8239
|
const { switchChainAsync } = useFunkitSwitchChains({});
|
|
8206
8240
|
const handleWeb3AccountBalancePostCheckout = useCallback17(
|
|
8207
8241
|
async (depositAddress) => {
|
|
@@ -8213,10 +8247,11 @@ function FunCheckoutConfirmationStep({
|
|
|
8213
8247
|
const sourceAssetAmountBaseUnit = BigInt(
|
|
8214
8248
|
checkoutItem.latestQuote.baseQuote.estTotalFromAmountBaseUnit
|
|
8215
8249
|
);
|
|
8216
|
-
|
|
8250
|
+
const latestChainId = await (connector == null ? void 0 : connector.getChainId());
|
|
8251
|
+
if (parseInt(sourceAssetChainId) !== latestChainId) {
|
|
8217
8252
|
logger.log("handleWeb3AccountBalancePostCheckout_needToSwitchChhain", {
|
|
8218
8253
|
sourceAssetChainId,
|
|
8219
|
-
currentChain:
|
|
8254
|
+
currentChain: latestChainId
|
|
8220
8255
|
});
|
|
8221
8256
|
const chainName = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO6[sourceAssetChainId].chainInfo.name;
|
|
8222
8257
|
setPostCheckoutStepMessage(
|
|
@@ -8257,7 +8292,6 @@ function FunCheckoutConfirmationStep({
|
|
|
8257
8292
|
checkoutItem == null ? void 0 : checkoutItem.selectedSourceAssetInfo.chainId,
|
|
8258
8293
|
(_n = checkoutItem == null ? void 0 : checkoutItem.selectedSourceAssetInfo) == null ? void 0 : _n.address,
|
|
8259
8294
|
checkoutItem == null ? void 0 : checkoutItem.selectedSourceAssetInfo.symbol,
|
|
8260
|
-
chain,
|
|
8261
8295
|
switchChainAsync,
|
|
8262
8296
|
sendTransactionAsync,
|
|
8263
8297
|
writeContractAsync
|
|
@@ -8851,11 +8885,12 @@ function MeshOrAccountSelectAsset({
|
|
|
8851
8885
|
manualFetchNetworkInfo
|
|
8852
8886
|
]);
|
|
8853
8887
|
const generateAccountHoldingsMapForBalance = useCallback19(async () => {
|
|
8888
|
+
var _a2, _b2;
|
|
8854
8889
|
const itemMap = {};
|
|
8855
8890
|
const checkoutTargetChainId = checkoutItem == null ? void 0 : checkoutItem.initSettings.config.targetChain;
|
|
8856
|
-
const isCheckoutOnMainnet = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO7[checkoutTargetChainId || ""].isMainnet;
|
|
8891
|
+
const isCheckoutOnMainnet = (_b2 = (_a2 = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO7) == null ? void 0 : _a2[checkoutTargetChainId || ""]) == null ? void 0 : _b2.isMainnet;
|
|
8857
8892
|
Object.values(walletAssets || {}).forEach((fwAsset) => {
|
|
8858
|
-
var
|
|
8893
|
+
var _a3, _b3, _c2, _d2;
|
|
8859
8894
|
if (!fwAsset.symbol || !fwAsset.contractAddress)
|
|
8860
8895
|
return;
|
|
8861
8896
|
const isAssetOnMainnet = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO7[fwAsset.chainId].isMainnet;
|
|
@@ -8864,7 +8899,7 @@ function MeshOrAccountSelectAsset({
|
|
|
8864
8899
|
if (!isCheckoutOnMainnet && checkoutTargetChainId !== fwAsset.chainId)
|
|
8865
8900
|
return;
|
|
8866
8901
|
let normalizedTokenAddress = fwAsset.contractAddress;
|
|
8867
|
-
if (((_d2 = (_c2 = (
|
|
8902
|
+
if (((_d2 = (_c2 = (_b3 = (_a3 = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO7) == null ? void 0 : _a3[fwAsset.chainId]) == null ? void 0 : _b3.nativeCurrency) == null ? void 0 : _c2.symbol) == null ? void 0 : _d2.toUpperCase()) === fwAsset.symbol.toUpperCase()) {
|
|
8868
8903
|
normalizedTokenAddress = FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS3;
|
|
8869
8904
|
}
|
|
8870
8905
|
const chainSymbol = combineChainSymbolOrAddress2({
|
|
@@ -9382,7 +9417,10 @@ function FunCheckoutModal({
|
|
|
9382
9417
|
const isNyOrTxOrVi = userIpInfo ? userIpInfo.alpha2 === "US" && ["NY", "TX", "VI"].includes(userIpInfo.state) : false;
|
|
9383
9418
|
const isCanada = userIpInfo ? userIpInfo.alpha2 === "CA" : false;
|
|
9384
9419
|
const originalTargetChainId = checkoutItem == null ? void 0 : checkoutItem.initSettings.config.targetChain.toString();
|
|
9385
|
-
const moonpayChainId =
|
|
9420
|
+
const moonpayChainId = [
|
|
9421
|
+
zkSync.id.toString(),
|
|
9422
|
+
mantle.id.toString()
|
|
9423
|
+
].includes(originalTargetChainId) ? arbitrum.id.toString() : originalTargetChainId;
|
|
9386
9424
|
const wethAddrOnTargetChain = (await getTokenInfo2("weth", moonpayChainId)).toLowerCase();
|
|
9387
9425
|
const isTargetAssetEthOrWeth = [NATIVE_TOKEN, wethAddrOnTargetChain].includes(
|
|
9388
9426
|
(_a2 = checkoutItem == null ? void 0 : checkoutItem.initSettings) == null ? void 0 : _a2.config.targetAsset
|
|
@@ -10732,8 +10770,8 @@ function ActivityHistory({
|
|
|
10732
10770
|
}
|
|
10733
10771
|
|
|
10734
10772
|
// src/components/ProfileDetails/FunProfileViews/Home/index.tsx
|
|
10735
|
-
import
|
|
10736
|
-
import { useAccount as
|
|
10773
|
+
import React106, { useMemo as useMemo30, useState as useState31 } from "react";
|
|
10774
|
+
import { useAccount as useAccount6 } from "wagmi";
|
|
10737
10775
|
|
|
10738
10776
|
// src/components/Avatar/Avatar.tsx
|
|
10739
10777
|
import React99, { useContext as useContext15 } from "react";
|
|
@@ -10869,22 +10907,41 @@ function Avatar({ address, imageUrl, loading, size }) {
|
|
|
10869
10907
|
})));
|
|
10870
10908
|
}
|
|
10871
10909
|
|
|
10872
|
-
// src/components/Icons/
|
|
10910
|
+
// src/components/Icons/LogoutIcon.tsx
|
|
10873
10911
|
import React100 from "react";
|
|
10874
|
-
var
|
|
10912
|
+
var LogoutIcon = () => {
|
|
10875
10913
|
return /* @__PURE__ */ React100.createElement("svg", {
|
|
10914
|
+
width: "16",
|
|
10915
|
+
height: "16",
|
|
10916
|
+
viewBox: "0 0 16 16",
|
|
10917
|
+
fill: "none",
|
|
10918
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10919
|
+
}, /* @__PURE__ */ React100.createElement("path", {
|
|
10920
|
+
d: "M9.33463 13.3337H4.0013C3.26492 13.3337 2.66797 12.7367 2.66797 12.0003V4.00033C2.66797 3.26395 3.26492 2.66699 4.0013 2.66699H9.33463M6.66797 8.00033H14.0013M14.0013 8.00033L12.0013 10.0003M14.0013 8.00033L12.0013 6.00033",
|
|
10921
|
+
stroke: "currentColor",
|
|
10922
|
+
strokeWidth: "1.33333",
|
|
10923
|
+
strokeLinecap: "round",
|
|
10924
|
+
strokeLinejoin: "round",
|
|
10925
|
+
color: "currentColor"
|
|
10926
|
+
}));
|
|
10927
|
+
};
|
|
10928
|
+
|
|
10929
|
+
// src/components/Icons/PlusIcon.tsx
|
|
10930
|
+
import React101 from "react";
|
|
10931
|
+
var PlusIcon = () => {
|
|
10932
|
+
return /* @__PURE__ */ React101.createElement("svg", {
|
|
10876
10933
|
width: "14",
|
|
10877
10934
|
height: "14",
|
|
10878
10935
|
viewBox: "0 0 14 14",
|
|
10879
10936
|
fill: "none",
|
|
10880
10937
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10881
|
-
}, /* @__PURE__ */
|
|
10938
|
+
}, /* @__PURE__ */ React101.createElement("path", {
|
|
10882
10939
|
d: "M7 13V1",
|
|
10883
10940
|
stroke: "currentColor",
|
|
10884
10941
|
strokeWidth: "2",
|
|
10885
10942
|
strokeLinecap: "round",
|
|
10886
10943
|
strokeLinejoin: "round"
|
|
10887
|
-
}), /* @__PURE__ */
|
|
10944
|
+
}), /* @__PURE__ */ React101.createElement("path", {
|
|
10888
10945
|
d: "M1 7H13",
|
|
10889
10946
|
stroke: "currentColor",
|
|
10890
10947
|
strokeWidth: "2",
|
|
@@ -10894,45 +10951,45 @@ var PlusIcon = () => {
|
|
|
10894
10951
|
};
|
|
10895
10952
|
|
|
10896
10953
|
// src/components/Icons/ReceiptIcon.tsx
|
|
10897
|
-
import
|
|
10954
|
+
import React102 from "react";
|
|
10898
10955
|
var ReceiptIcon = () => {
|
|
10899
|
-
return /* @__PURE__ */
|
|
10956
|
+
return /* @__PURE__ */ React102.createElement("svg", {
|
|
10900
10957
|
width: "16",
|
|
10901
10958
|
height: "16",
|
|
10902
10959
|
viewBox: "0 0 16 16",
|
|
10903
10960
|
fill: "none",
|
|
10904
10961
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10905
|
-
}, /* @__PURE__ */
|
|
10962
|
+
}, /* @__PURE__ */ React102.createElement("g", {
|
|
10906
10963
|
clipPath: "url(#clip0_3891_6630)"
|
|
10907
|
-
}, /* @__PURE__ */
|
|
10964
|
+
}, /* @__PURE__ */ React102.createElement("path", {
|
|
10908
10965
|
d: "M14.666 4.00065V5.61398C14.666 6.66732 13.9993 7.33398 12.946 7.33398H10.666V2.67398C10.666 1.93398 11.2727 1.33398 12.0127 1.33398C12.7393 1.34065 13.406 1.63398 13.886 2.11398C14.366 2.60065 14.666 3.26732 14.666 4.00065Z",
|
|
10909
10966
|
stroke: "currentColor",
|
|
10910
10967
|
strokeWidth: "1",
|
|
10911
10968
|
strokeMiterlimit: "10",
|
|
10912
10969
|
strokeLinecap: "round",
|
|
10913
10970
|
strokeLinejoin: "round"
|
|
10914
|
-
}), /* @__PURE__ */
|
|
10971
|
+
}), /* @__PURE__ */ React102.createElement("path", {
|
|
10915
10972
|
d: "M1.33398 4.66732V14.0006C1.33398 14.554 1.96064 14.8673 2.40064 14.534L3.54065 13.6806C3.80732 13.4806 4.18065 13.5073 4.42065 13.7473L5.5273 14.8606C5.7873 15.1206 6.214 15.1206 6.474 14.8606L7.59398 13.7406C7.82732 13.5073 8.20065 13.4806 8.46065 13.6806L9.60065 14.534C10.0407 14.8606 10.6673 14.5473 10.6673 14.0006V2.66732C10.6673 1.93398 11.2673 1.33398 12.0007 1.33398H4.66732H4.00065C2.00065 1.33398 1.33398 2.52732 1.33398 4.00065V4.66732Z",
|
|
10916
10973
|
stroke: "currentColor",
|
|
10917
10974
|
strokeWidth: "1",
|
|
10918
10975
|
strokeMiterlimit: "10",
|
|
10919
10976
|
strokeLinecap: "round",
|
|
10920
10977
|
strokeLinejoin: "round"
|
|
10921
|
-
}), /* @__PURE__ */
|
|
10978
|
+
}), /* @__PURE__ */ React102.createElement("path", {
|
|
10922
10979
|
d: "M4 6H8",
|
|
10923
10980
|
stroke: "currentColor",
|
|
10924
10981
|
strokeWidth: "1",
|
|
10925
10982
|
strokeLinecap: "round",
|
|
10926
10983
|
strokeLinejoin: "round"
|
|
10927
|
-
}), /* @__PURE__ */
|
|
10984
|
+
}), /* @__PURE__ */ React102.createElement("path", {
|
|
10928
10985
|
d: "M4.5 8.66602H7.5",
|
|
10929
10986
|
stroke: "currentColor",
|
|
10930
10987
|
strokeWidth: "1",
|
|
10931
10988
|
strokeLinecap: "round",
|
|
10932
10989
|
strokeLinejoin: "round"
|
|
10933
|
-
})), /* @__PURE__ */
|
|
10990
|
+
})), /* @__PURE__ */ React102.createElement("defs", null, /* @__PURE__ */ React102.createElement("clipPath", {
|
|
10934
10991
|
id: "clip0_3891_6630"
|
|
10935
|
-
}, /* @__PURE__ */
|
|
10992
|
+
}, /* @__PURE__ */ React102.createElement("rect", {
|
|
10936
10993
|
width: "16",
|
|
10937
10994
|
height: "16",
|
|
10938
10995
|
fill: "white"
|
|
@@ -10940,18 +10997,18 @@ var ReceiptIcon = () => {
|
|
|
10940
10997
|
};
|
|
10941
10998
|
|
|
10942
10999
|
// src/components/Icons/SettingsIcon.tsx
|
|
10943
|
-
import
|
|
11000
|
+
import React103 from "react";
|
|
10944
11001
|
var SettingsIcon = () => {
|
|
10945
|
-
return /* @__PURE__ */
|
|
11002
|
+
return /* @__PURE__ */ React103.createElement("svg", {
|
|
10946
11003
|
width: "17",
|
|
10947
11004
|
height: "17",
|
|
10948
11005
|
viewBox: "0 0 17 17",
|
|
10949
11006
|
fill: "none",
|
|
10950
11007
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10951
|
-
}, /* @__PURE__ */
|
|
11008
|
+
}, /* @__PURE__ */ React103.createElement("path", {
|
|
10952
11009
|
d: "M8.75 10.167C9.85457 10.167 10.75 9.27156 10.75 8.16699C10.75 7.06242 9.85457 6.16699 8.75 6.16699C7.64543 6.16699 6.75 7.06242 6.75 8.16699C6.75 9.27156 7.64543 10.167 8.75 10.167Z",
|
|
10953
11010
|
stroke: "currentColor"
|
|
10954
|
-
}), /* @__PURE__ */
|
|
11011
|
+
}), /* @__PURE__ */ React103.createElement("path", {
|
|
10955
11012
|
d: "M9.92726 1.60149C9.68219 1.5 9.37159 1.5 8.75032 1.5C8.12906 1.5 7.81846 1.5 7.57339 1.60149C7.2467 1.73682 6.98714 1.99639 6.85181 2.32309C6.79004 2.47223 6.76586 2.64567 6.7564 2.89866C6.7425 3.27045 6.55183 3.61459 6.22962 3.80062C5.90742 3.98664 5.51405 3.97969 5.18512 3.80584C4.96129 3.68753 4.799 3.62175 4.63895 3.60068C4.28835 3.55452 3.93378 3.64953 3.65323 3.8648C3.44282 4.02625 3.2875 4.29527 2.97688 4.83329C2.66625 5.37131 2.51094 5.64032 2.47632 5.90327C2.43016 6.25387 2.52517 6.60844 2.74044 6.889C2.8387 7.01707 2.97679 7.12467 3.19112 7.25933C3.50619 7.45733 3.70892 7.7946 3.7089 8.16667C3.70888 8.53873 3.50616 8.87593 3.19111 9.07387C2.97676 9.2086 2.83864 9.31627 2.74038 9.44433C2.5251 9.72487 2.4301 10.0794 2.47626 10.43C2.51087 10.6929 2.66618 10.962 2.97681 11.5C3.28744 12.038 3.44276 12.3071 3.65316 12.4685C3.93371 12.6837 4.28828 12.7787 4.63888 12.7326C4.79892 12.7115 4.9612 12.6457 5.18502 12.5275C5.51397 12.3536 5.90736 12.3467 6.22959 12.5327C6.55182 12.7187 6.7425 13.0629 6.7564 13.4347C6.76586 13.6877 6.79004 13.8611 6.85181 14.0103C6.98714 14.3369 7.2467 14.5965 7.57339 14.7319C7.81846 14.8333 8.12906 14.8333 8.75032 14.8333C9.37159 14.8333 9.68219 14.8333 9.92726 14.7319C10.2539 14.5965 10.5135 14.3369 10.6488 14.0103C10.7106 13.8611 10.7348 13.6877 10.7443 13.4347C10.7581 13.0629 10.9488 12.7187 11.271 12.5327C11.5932 12.3466 11.9866 12.3536 12.3156 12.5275C12.5394 12.6457 12.7017 12.7115 12.8617 12.7325C13.2123 12.7787 13.5669 12.6837 13.8474 12.4685C14.0578 12.307 14.2131 12.038 14.5237 11.4999C14.8344 10.9619 14.9897 10.6929 15.0243 10.43C15.0705 10.0794 14.9755 9.7248 14.7602 9.44427C14.6619 9.3162 14.5238 9.20853 14.3095 9.07387C13.9945 8.87593 13.7917 8.53867 13.7917 8.1666C13.7917 7.79453 13.9945 7.4574 14.3095 7.25947C14.5239 7.12473 14.662 7.01713 14.7603 6.889C14.9755 6.60849 15.0705 6.25391 15.0244 5.90331C14.9898 5.64037 14.8345 5.37135 14.5238 4.83333C14.2132 4.29531 14.0579 4.0263 13.8475 3.86485C13.5669 3.64957 13.2123 3.55457 12.8617 3.60073C12.7017 3.62179 12.5395 3.68757 12.3156 3.80587C11.9867 3.97973 11.5933 3.98668 11.2711 3.80064C10.9488 3.61461 10.7581 3.27044 10.7443 2.89863C10.7348 2.64565 10.7106 2.47222 10.6488 2.32309C10.5135 1.99639 10.2539 1.73682 9.92726 1.60149Z",
|
|
10956
11013
|
stroke: "currentColor"
|
|
10957
11014
|
}));
|
|
@@ -10966,7 +11023,7 @@ var animateTitleInClass2 = "_1x1d6jx6";
|
|
|
10966
11023
|
var animateTitleOutClass2 = "_1x1d6jx7";
|
|
10967
11024
|
|
|
10968
11025
|
// src/components/ProfileDetails/FunProfileViews/Home/HomeCheckoutSection.tsx
|
|
10969
|
-
import
|
|
11026
|
+
import React104, { Fragment as Fragment3, useMemo as useMemo29 } from "react";
|
|
10970
11027
|
var MAX_LATEST_CHECKOUTS = 1;
|
|
10971
11028
|
function HomeCheckoutSection({
|
|
10972
11029
|
onSelectActivity
|
|
@@ -10984,16 +11041,16 @@ function HomeCheckoutSection({
|
|
|
10984
11041
|
remainingCount: remaining
|
|
10985
11042
|
};
|
|
10986
11043
|
}, [checkoutHistoryStateMap]);
|
|
10987
|
-
return latestCheckoutHistories.length > 0 ? /* @__PURE__ */
|
|
11044
|
+
return latestCheckoutHistories.length > 0 ? /* @__PURE__ */ React104.createElement(Fragment3, null, /* @__PURE__ */ React104.createElement(FunDivider, {
|
|
10988
11045
|
marginTop: "0",
|
|
10989
11046
|
marginBottom: "16"
|
|
10990
|
-
}), /* @__PURE__ */
|
|
11047
|
+
}), /* @__PURE__ */ React104.createElement(Box, {
|
|
10991
11048
|
display: "flex",
|
|
10992
11049
|
flexDirection: "column",
|
|
10993
11050
|
gap: "24",
|
|
10994
11051
|
paddingTop: "8",
|
|
10995
11052
|
paddingBottom: "24"
|
|
10996
|
-
}, latestCheckoutHistories.map((item) => /* @__PURE__ */
|
|
11053
|
+
}, latestCheckoutHistories.map((item) => /* @__PURE__ */ React104.createElement(FunCheckoutNotification, {
|
|
10997
11054
|
key: item.depositAddr,
|
|
10998
11055
|
checkoutHistoryItem: item,
|
|
10999
11056
|
onSelect: onSelectActivity
|
|
@@ -11001,45 +11058,45 @@ function HomeCheckoutSection({
|
|
|
11001
11058
|
}
|
|
11002
11059
|
|
|
11003
11060
|
// src/components/ProfileDetails/FunProfileViews/Home/HomeTokenDisplayRow.tsx
|
|
11004
|
-
import
|
|
11061
|
+
import React105 from "react";
|
|
11005
11062
|
var HomeTokenBalanceDisplayRow = ({ asset }) => {
|
|
11006
11063
|
const normalizedAmount = getNormalizedTokenBalance(
|
|
11007
11064
|
asset.tokenBalance,
|
|
11008
11065
|
asset.decimals
|
|
11009
11066
|
);
|
|
11010
|
-
return /* @__PURE__ */
|
|
11067
|
+
return /* @__PURE__ */ React105.createElement(Box, {
|
|
11011
11068
|
display: "flex",
|
|
11012
11069
|
justifyContent: "space-between",
|
|
11013
11070
|
alignItems: "center"
|
|
11014
|
-
}, /* @__PURE__ */
|
|
11071
|
+
}, /* @__PURE__ */ React105.createElement(Box, {
|
|
11015
11072
|
display: "flex",
|
|
11016
11073
|
flexDirection: "row",
|
|
11017
11074
|
gap: "8",
|
|
11018
11075
|
alignItems: "flex-start",
|
|
11019
11076
|
height: "full"
|
|
11020
|
-
}, /* @__PURE__ */
|
|
11077
|
+
}, /* @__PURE__ */ React105.createElement(FunAssetAvatar, {
|
|
11021
11078
|
assetSrc: asset.logo,
|
|
11022
11079
|
assetName: asset.name,
|
|
11023
11080
|
assetTicker: asset.symbol,
|
|
11024
11081
|
chainId: asset.chainId,
|
|
11025
11082
|
chainIconSize: "14"
|
|
11026
|
-
}), /* @__PURE__ */
|
|
11083
|
+
}), /* @__PURE__ */ React105.createElement(Box, {
|
|
11027
11084
|
display: "flex",
|
|
11028
11085
|
flexDirection: "column",
|
|
11029
11086
|
justifyContent: "space-between"
|
|
11030
|
-
}, /* @__PURE__ */
|
|
11087
|
+
}, /* @__PURE__ */ React105.createElement(Text, {
|
|
11031
11088
|
color: "modalText",
|
|
11032
11089
|
size: "18",
|
|
11033
11090
|
weight: "semibold"
|
|
11034
|
-
}, asset.name), /* @__PURE__ */
|
|
11091
|
+
}, asset.name), /* @__PURE__ */ React105.createElement(Text, {
|
|
11035
11092
|
color: "modalTextSecondary",
|
|
11036
11093
|
size: "14",
|
|
11037
11094
|
weight: "medium"
|
|
11038
|
-
}, formatCryptoAndStringify(normalizedAmount, asset.symbol)))), /* @__PURE__ */
|
|
11095
|
+
}, formatCryptoAndStringify(normalizedAmount, asset.symbol)))), /* @__PURE__ */ React105.createElement(Box, {
|
|
11039
11096
|
display: "flex",
|
|
11040
11097
|
alignSelf: "flex-start",
|
|
11041
11098
|
height: "full"
|
|
11042
|
-
}, /* @__PURE__ */
|
|
11099
|
+
}, /* @__PURE__ */ React105.createElement(Text, {
|
|
11043
11100
|
color: "modalText",
|
|
11044
11101
|
size: "18",
|
|
11045
11102
|
weight: "semibold"
|
|
@@ -11053,48 +11110,53 @@ var ProfileTitleSection = ({
|
|
|
11053
11110
|
userInfo,
|
|
11054
11111
|
setAnimateOut,
|
|
11055
11112
|
onChangeView,
|
|
11113
|
+
onLogout,
|
|
11056
11114
|
onClose
|
|
11057
11115
|
}) => {
|
|
11058
|
-
return /* @__PURE__ */
|
|
11116
|
+
return /* @__PURE__ */ React106.createElement(Box, {
|
|
11059
11117
|
display: "flex",
|
|
11060
11118
|
alignItems: "center",
|
|
11061
11119
|
justifyContent: "space-between",
|
|
11062
11120
|
width: "full"
|
|
11063
|
-
}, /* @__PURE__ */
|
|
11121
|
+
}, /* @__PURE__ */ React106.createElement(Box, {
|
|
11064
11122
|
display: "flex",
|
|
11065
11123
|
alignItems: "center",
|
|
11066
11124
|
flexDirection: "row",
|
|
11067
11125
|
gap: "8"
|
|
11068
|
-
}, /* @__PURE__ */
|
|
11126
|
+
}, /* @__PURE__ */ React106.createElement(Box, {
|
|
11069
11127
|
className: animateOut ? animateAvatarOutClass : animateAvatarInClass
|
|
11070
|
-
}, /* @__PURE__ */
|
|
11128
|
+
}, /* @__PURE__ */ React106.createElement(Avatar, {
|
|
11071
11129
|
address: account.address,
|
|
11072
11130
|
imageUrl: account.ensAvatar || userInfo.accountPicSrc,
|
|
11073
11131
|
loading: account.hasPendingTransactions,
|
|
11074
11132
|
size: 24
|
|
11075
|
-
})), /* @__PURE__ */
|
|
11133
|
+
})), /* @__PURE__ */ React106.createElement(Text, {
|
|
11076
11134
|
color: "modalText",
|
|
11077
11135
|
size: "16",
|
|
11078
11136
|
weight: "semibold",
|
|
11079
11137
|
className: animateOut ? animateTitleOutClass2 : animateTitleInClass2
|
|
11080
|
-
}, userInfo.accountNameDisplay)), /* @__PURE__ */
|
|
11138
|
+
}, userInfo.accountNameDisplay)), /* @__PURE__ */ React106.createElement(Box, {
|
|
11081
11139
|
display: "flex",
|
|
11082
11140
|
alignItems: "center",
|
|
11083
11141
|
flexDirection: "row",
|
|
11084
11142
|
gap: "8"
|
|
11085
|
-
}, /* @__PURE__ */
|
|
11086
|
-
icon: /* @__PURE__ */
|
|
11143
|
+
}, /* @__PURE__ */ React106.createElement(FunIconButton, {
|
|
11144
|
+
icon: /* @__PURE__ */ React106.createElement(SettingsIcon, null),
|
|
11087
11145
|
onClick: () => {
|
|
11088
11146
|
setAnimateOut(true);
|
|
11089
11147
|
setTimeout(() => onChangeView(1 /* SETTINGS */), 200);
|
|
11090
11148
|
},
|
|
11091
11149
|
size: "24"
|
|
11092
|
-
}), /* @__PURE__ */
|
|
11093
|
-
icon: /* @__PURE__ */
|
|
11150
|
+
}), /* @__PURE__ */ React106.createElement(FunIconButton, {
|
|
11151
|
+
icon: /* @__PURE__ */ React106.createElement(ReceiptIcon, null),
|
|
11094
11152
|
onClick: () => onChangeView(2 /* ACTIVITY */),
|
|
11095
11153
|
size: "24"
|
|
11096
|
-
}), /* @__PURE__ */
|
|
11097
|
-
icon: /* @__PURE__ */
|
|
11154
|
+
}), /* @__PURE__ */ React106.createElement(FunIconButton, {
|
|
11155
|
+
icon: /* @__PURE__ */ React106.createElement(LogoutIcon, null),
|
|
11156
|
+
onClick: onLogout,
|
|
11157
|
+
size: "24"
|
|
11158
|
+
}), /* @__PURE__ */ React106.createElement(FunIconButton, {
|
|
11159
|
+
icon: /* @__PURE__ */ React106.createElement(CloseIcon, null),
|
|
11098
11160
|
onClick: onClose,
|
|
11099
11161
|
size: "24"
|
|
11100
11162
|
})));
|
|
@@ -11104,9 +11166,9 @@ function Home({
|
|
|
11104
11166
|
onChangeView,
|
|
11105
11167
|
onSelectActivity
|
|
11106
11168
|
}) {
|
|
11107
|
-
const account =
|
|
11169
|
+
const account = useAccount6();
|
|
11108
11170
|
const { accountModalConfig } = useFunkitConfig();
|
|
11109
|
-
const { userInfo } = useGeneralWallet();
|
|
11171
|
+
const { userInfo, handleLogout } = useGeneralWallet();
|
|
11110
11172
|
useWalletAssetsListener();
|
|
11111
11173
|
useCheckoutHistoryListener();
|
|
11112
11174
|
const { walletAssets } = useGeneralWallet();
|
|
@@ -11114,14 +11176,14 @@ function Home({
|
|
|
11114
11176
|
const [balance, setBalance] = useState31("0.00");
|
|
11115
11177
|
const AssetsList = useMemo30(() => {
|
|
11116
11178
|
if (walletAssets == null) {
|
|
11117
|
-
return [/* @__PURE__ */
|
|
11179
|
+
return [/* @__PURE__ */ React106.createElement(SkeletalLoader, {
|
|
11118
11180
|
key: "skeletal-loader-1"
|
|
11119
11181
|
})];
|
|
11120
11182
|
}
|
|
11121
11183
|
const tokenKeys = Object.keys(walletAssets || {});
|
|
11122
11184
|
if (tokenKeys.length === 0) {
|
|
11123
11185
|
return [
|
|
11124
|
-
/* @__PURE__ */
|
|
11186
|
+
/* @__PURE__ */ React106.createElement(Box, {
|
|
11125
11187
|
display: "flex",
|
|
11126
11188
|
flexDirection: "column",
|
|
11127
11189
|
justifyContent: "center",
|
|
@@ -11129,7 +11191,7 @@ function Home({
|
|
|
11129
11191
|
gap: "12",
|
|
11130
11192
|
key: "no-assets",
|
|
11131
11193
|
color: "modalText"
|
|
11132
|
-
}, /* @__PURE__ */
|
|
11194
|
+
}, /* @__PURE__ */ React106.createElement(NotFoundIcon, null), /* @__PURE__ */ React106.createElement(Text, {
|
|
11133
11195
|
color: "modalText",
|
|
11134
11196
|
size: "18",
|
|
11135
11197
|
weight: "semibold"
|
|
@@ -11142,7 +11204,7 @@ function Home({
|
|
|
11142
11204
|
).map((assetKey) => {
|
|
11143
11205
|
const asset = walletAssets == null ? void 0 : walletAssets[assetKey];
|
|
11144
11206
|
newBalance = newBalance + asset.totalUsdValue;
|
|
11145
|
-
return /* @__PURE__ */
|
|
11207
|
+
return /* @__PURE__ */ React106.createElement(HomeTokenBalanceDisplayRow, {
|
|
11146
11208
|
asset,
|
|
11147
11209
|
key: assetKey
|
|
11148
11210
|
});
|
|
@@ -11151,53 +11213,54 @@ function Home({
|
|
|
11151
11213
|
setBalance(nextBalance);
|
|
11152
11214
|
return outputRows;
|
|
11153
11215
|
}, [walletAssets]);
|
|
11154
|
-
return /* @__PURE__ */
|
|
11216
|
+
return /* @__PURE__ */ React106.createElement(Box, null, /* @__PURE__ */ React106.createElement(ProfileTitleSection, {
|
|
11155
11217
|
animateOut,
|
|
11156
11218
|
account,
|
|
11157
11219
|
userInfo,
|
|
11158
11220
|
setAnimateOut,
|
|
11159
11221
|
onChangeView,
|
|
11222
|
+
onLogout: handleLogout,
|
|
11160
11223
|
onClose
|
|
11161
|
-
}), /* @__PURE__ */
|
|
11224
|
+
}), /* @__PURE__ */ React106.createElement(Box, {
|
|
11162
11225
|
display: "flex",
|
|
11163
11226
|
flexDirection: "column",
|
|
11164
11227
|
paddingTop: "24",
|
|
11165
11228
|
paddingBottom: "0",
|
|
11166
11229
|
className: animateOut ? animateContentOutClass2 : animateContentInClass2
|
|
11167
|
-
}, /* @__PURE__ */
|
|
11230
|
+
}, /* @__PURE__ */ React106.createElement(Box, {
|
|
11168
11231
|
display: "flex",
|
|
11169
11232
|
flexDirection: "column",
|
|
11170
11233
|
gap: "16"
|
|
11171
|
-
}, /* @__PURE__ */
|
|
11234
|
+
}, /* @__PURE__ */ React106.createElement(Box, {
|
|
11172
11235
|
display: "flex",
|
|
11173
11236
|
justifyContent: "center",
|
|
11174
11237
|
alignItems: "center"
|
|
11175
|
-
}, /* @__PURE__ */
|
|
11238
|
+
}, /* @__PURE__ */ React106.createElement(Text, {
|
|
11176
11239
|
as: "h1",
|
|
11177
11240
|
color: "modalText",
|
|
11178
11241
|
weight: "heavy",
|
|
11179
11242
|
style: { fontSize: "56px", lineHeight: "68px" }
|
|
11180
|
-
}, formatCurrencyAndStringify(parseFloat(balance.toString())))), (accountModalConfig == null ? void 0 : accountModalConfig.allowDepositing) ? /* @__PURE__ */
|
|
11243
|
+
}, formatCurrencyAndStringify(parseFloat(balance.toString())))), (accountModalConfig == null ? void 0 : accountModalConfig.allowDepositing) ? /* @__PURE__ */ React106.createElement(Box, {
|
|
11181
11244
|
id: "button-row",
|
|
11182
11245
|
display: "flex",
|
|
11183
11246
|
flexDirection: "row",
|
|
11184
11247
|
gap: "12"
|
|
11185
|
-
}, /* @__PURE__ */
|
|
11248
|
+
}, /* @__PURE__ */ React106.createElement(FunButton, {
|
|
11186
11249
|
title: "Deposit",
|
|
11187
|
-
titlePrefix: /* @__PURE__ */
|
|
11250
|
+
titlePrefix: /* @__PURE__ */ React106.createElement(Box, {
|
|
11188
11251
|
display: "flex",
|
|
11189
11252
|
alignItems: "center",
|
|
11190
11253
|
color: "buttonTextSecondary"
|
|
11191
|
-
}, /* @__PURE__ */
|
|
11254
|
+
}, /* @__PURE__ */ React106.createElement(PlusIcon, null)),
|
|
11192
11255
|
type: "secondary",
|
|
11193
11256
|
titleWeight: "semibold",
|
|
11194
11257
|
onClick: () => {
|
|
11195
11258
|
}
|
|
11196
|
-
})) : null), /* @__PURE__ */
|
|
11259
|
+
})) : null), /* @__PURE__ */ React106.createElement(FunDivider, {
|
|
11197
11260
|
marginTop: "16",
|
|
11198
11261
|
marginBottom: "0",
|
|
11199
11262
|
transparent: walletAssets != null && Object.keys(walletAssets || {}).length === 0
|
|
11200
|
-
}), /* @__PURE__ */
|
|
11263
|
+
}), /* @__PURE__ */ React106.createElement(Box, {
|
|
11201
11264
|
id: "token-list",
|
|
11202
11265
|
display: "flex",
|
|
11203
11266
|
flexDirection: "column",
|
|
@@ -11206,7 +11269,7 @@ function Home({
|
|
|
11206
11269
|
paddingTop: "16",
|
|
11207
11270
|
paddingBottom: "16",
|
|
11208
11271
|
style: { maxHeight: 300, overflow: "auto" }
|
|
11209
|
-
}, AssetsList.map((component) => component)), /* @__PURE__ */
|
|
11272
|
+
}, AssetsList.map((component) => component)), /* @__PURE__ */ React106.createElement(HomeCheckoutSection, {
|
|
11210
11273
|
onSelectActivity: (depositAddress, initialPage) => {
|
|
11211
11274
|
onSelectActivity({
|
|
11212
11275
|
depositAddress,
|
|
@@ -11219,28 +11282,7 @@ function Home({
|
|
|
11219
11282
|
|
|
11220
11283
|
// src/components/ProfileDetails/FunProfileViews/Settings/Settings.tsx
|
|
11221
11284
|
import React107, { useCallback as useCallback23, useState as useState32 } from "react";
|
|
11222
|
-
import { useAccount as
|
|
11223
|
-
|
|
11224
|
-
// src/components/Icons/LogoutIcon.tsx
|
|
11225
|
-
import React106 from "react";
|
|
11226
|
-
var LogoutIcon = () => {
|
|
11227
|
-
return /* @__PURE__ */ React106.createElement("svg", {
|
|
11228
|
-
width: "16",
|
|
11229
|
-
height: "16",
|
|
11230
|
-
viewBox: "0 0 16 16",
|
|
11231
|
-
fill: "none",
|
|
11232
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
11233
|
-
}, /* @__PURE__ */ React106.createElement("path", {
|
|
11234
|
-
d: "M9.33463 13.3337H4.0013C3.26492 13.3337 2.66797 12.7367 2.66797 12.0003V4.00033C2.66797 3.26395 3.26492 2.66699 4.0013 2.66699H9.33463M6.66797 8.00033H14.0013M14.0013 8.00033L12.0013 10.0003M14.0013 8.00033L12.0013 6.00033",
|
|
11235
|
-
stroke: "currentColor",
|
|
11236
|
-
strokeWidth: "1.33333",
|
|
11237
|
-
strokeLinecap: "round",
|
|
11238
|
-
strokeLinejoin: "round",
|
|
11239
|
-
color: "currentColor"
|
|
11240
|
-
}));
|
|
11241
|
-
};
|
|
11242
|
-
|
|
11243
|
-
// src/components/ProfileDetails/FunProfileViews/Settings/Settings.tsx
|
|
11285
|
+
import { useAccount as useAccount7 } from "wagmi";
|
|
11244
11286
|
function LineItem({
|
|
11245
11287
|
label,
|
|
11246
11288
|
value,
|
|
@@ -11271,64 +11313,23 @@ function LineItem({
|
|
|
11271
11313
|
}
|
|
11272
11314
|
function Settings({
|
|
11273
11315
|
onClose,
|
|
11274
|
-
onBack
|
|
11275
|
-
onDisconnect
|
|
11316
|
+
onBack
|
|
11276
11317
|
}) {
|
|
11277
|
-
const { chain: activeChain } =
|
|
11278
|
-
const { walletAddress, isWeb3Login, userInfo } = useGeneralWallet();
|
|
11318
|
+
const { chain: activeChain } = useAccount7();
|
|
11319
|
+
const { walletAddress, isWeb3Login, userInfo, handleLogout } = useGeneralWallet();
|
|
11279
11320
|
const [animateOut, setAnimateOut] = useState32(false);
|
|
11280
|
-
const [logoutConfirmationOpen, setLogoutConfirmationOpen] = useState32(false);
|
|
11281
11321
|
const handleBack = useCallback23(() => {
|
|
11282
11322
|
setAnimateOut(true);
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
setLogoutConfirmationOpen(false);
|
|
11286
|
-
setAnimateOut(false);
|
|
11287
|
-
}, 150);
|
|
11288
|
-
} else {
|
|
11289
|
-
setTimeout(onBack, 150);
|
|
11290
|
-
}
|
|
11291
|
-
}, [logoutConfirmationOpen, onBack]);
|
|
11323
|
+
setTimeout(onBack, 150);
|
|
11324
|
+
}, [onBack]);
|
|
11292
11325
|
return /* @__PURE__ */ React107.createElement(Box, null, /* @__PURE__ */ React107.createElement(FunModalTitleSection, {
|
|
11293
11326
|
hasBackButton: true,
|
|
11294
11327
|
onBack: handleBack,
|
|
11295
11328
|
backAnimation: true,
|
|
11296
|
-
title:
|
|
11329
|
+
title: "Settings",
|
|
11297
11330
|
hasCloseButton: true,
|
|
11298
11331
|
onClose
|
|
11299
|
-
}),
|
|
11300
|
-
paddingTop: "16",
|
|
11301
|
-
paddingBottom: "28",
|
|
11302
|
-
className: animateOut ? animateContentOutClass : animateContentInClass
|
|
11303
|
-
}, /* @__PURE__ */ React107.createElement(Box, {
|
|
11304
|
-
paddingTop: "10",
|
|
11305
|
-
paddingBottom: "24"
|
|
11306
|
-
}, /* @__PURE__ */ React107.createElement(Text, {
|
|
11307
|
-
color: "modalTextSecondary",
|
|
11308
|
-
size: "14",
|
|
11309
|
-
weight: "medium"
|
|
11310
|
-
}, "Are you sure you want to logout?")), /* @__PURE__ */ React107.createElement(Box, {
|
|
11311
|
-
display: "flex",
|
|
11312
|
-
flexDirection: "column",
|
|
11313
|
-
gap: "5"
|
|
11314
|
-
}, /* @__PURE__ */ React107.createElement(FunButton, {
|
|
11315
|
-
type: "warning",
|
|
11316
|
-
onClick: () => {
|
|
11317
|
-
onDisconnect();
|
|
11318
|
-
onClose();
|
|
11319
|
-
},
|
|
11320
|
-
title: "Logout"
|
|
11321
|
-
}), /* @__PURE__ */ React107.createElement(FunButton, {
|
|
11322
|
-
type: "secondary",
|
|
11323
|
-
onClick: () => {
|
|
11324
|
-
setAnimateOut(true);
|
|
11325
|
-
setTimeout(() => {
|
|
11326
|
-
setAnimateOut(false);
|
|
11327
|
-
setLogoutConfirmationOpen(false);
|
|
11328
|
-
}, 150);
|
|
11329
|
-
},
|
|
11330
|
-
title: "Cancel"
|
|
11331
|
-
}))) : /* @__PURE__ */ React107.createElement(Box, {
|
|
11332
|
+
}), /* @__PURE__ */ React107.createElement(Box, {
|
|
11332
11333
|
display: "flex",
|
|
11333
11334
|
flexDirection: "column",
|
|
11334
11335
|
gap: "24",
|
|
@@ -11362,13 +11363,7 @@ function Settings({
|
|
|
11362
11363
|
}), /* @__PURE__ */ React107.createElement(FunButton, {
|
|
11363
11364
|
titlePrefix: /* @__PURE__ */ React107.createElement(LogoutIcon, null),
|
|
11364
11365
|
title: "Logout",
|
|
11365
|
-
onClick:
|
|
11366
|
-
setAnimateOut(true);
|
|
11367
|
-
setTimeout(() => {
|
|
11368
|
-
setAnimateOut(false);
|
|
11369
|
-
setLogoutConfirmationOpen(true);
|
|
11370
|
-
}, 150);
|
|
11371
|
-
},
|
|
11366
|
+
onClick: handleLogout,
|
|
11372
11367
|
type: "secondary"
|
|
11373
11368
|
})));
|
|
11374
11369
|
}
|
|
@@ -11416,8 +11411,7 @@ function ProfileDetails({ onClose, onDisconnect }) {
|
|
|
11416
11411
|
onSelectActivity: onSelectActivityWrapper
|
|
11417
11412
|
}) : view === 1 /* SETTINGS */ ? /* @__PURE__ */ React108.createElement(Settings, {
|
|
11418
11413
|
onClose,
|
|
11419
|
-
onBack: onBackToHome
|
|
11420
|
-
onDisconnect
|
|
11414
|
+
onBack: onBackToHome
|
|
11421
11415
|
}) : view === 2 /* ACTIVITY */ ? /* @__PURE__ */ React108.createElement(ActivityHistory, {
|
|
11422
11416
|
onClose,
|
|
11423
11417
|
onBack: onBackToHome,
|
|
@@ -11453,7 +11447,7 @@ function AccountModal({ onClose, open }) {
|
|
|
11453
11447
|
|
|
11454
11448
|
// src/components/ChainModal/ChainModal.tsx
|
|
11455
11449
|
import React111, { useContext as useContext16 } from "react";
|
|
11456
|
-
import { useAccount as
|
|
11450
|
+
import { useAccount as useAccount8, useConfig as useConfig3 } from "wagmi";
|
|
11457
11451
|
|
|
11458
11452
|
// src/components/Icons/DisconnectSq.tsx
|
|
11459
11453
|
import React110 from "react";
|
|
@@ -11474,7 +11468,7 @@ var MobileScrollClassName = "_1107ixc1";
|
|
|
11474
11468
|
|
|
11475
11469
|
// src/components/ChainModal/ChainModal.tsx
|
|
11476
11470
|
function ChainModal({ onClose, open }) {
|
|
11477
|
-
const { chainId } =
|
|
11471
|
+
const { chainId } = useAccount8();
|
|
11478
11472
|
const { chains } = useConfig3();
|
|
11479
11473
|
const { switchChain, pendingChainId } = useFunkitSwitchChains({
|
|
11480
11474
|
onSettled: () => onClose()
|
|
@@ -11584,7 +11578,7 @@ function ChainModal({ onClose, open }) {
|
|
|
11584
11578
|
|
|
11585
11579
|
// src/components/ConnectModal/ConnectModal.tsx
|
|
11586
11580
|
import React139 from "react";
|
|
11587
|
-
import { useAccount as
|
|
11581
|
+
import { useAccount as useAccount10, useDisconnect as useDisconnect2 } from "wagmi";
|
|
11588
11582
|
|
|
11589
11583
|
// src/components/FunConnectOptions/FunConnectOptions.tsx
|
|
11590
11584
|
import React137, { useCallback as useCallback28, useState as useState38 } from "react";
|
|
@@ -11630,27 +11624,27 @@ import React113, { useCallback as useCallback25, useEffect as useEffect25, useMe
|
|
|
11630
11624
|
|
|
11631
11625
|
// src/utils/browsers.ts
|
|
11632
11626
|
function isSafari() {
|
|
11633
|
-
return typeof navigator !== "undefined" && /Version\/([0-9._]+).*Safari/.test(navigator.userAgent);
|
|
11627
|
+
return typeof navigator !== "undefined" && typeof navigator.userAgent !== "undefined" && /Version\/([0-9._]+).*Safari/.test(navigator.userAgent);
|
|
11634
11628
|
}
|
|
11635
11629
|
function isArc() {
|
|
11636
11630
|
return typeof document !== "undefined" && getComputedStyle(document.body).getPropertyValue("--arc-palette-focus") !== "";
|
|
11637
11631
|
}
|
|
11638
11632
|
function getBrowser() {
|
|
11639
|
-
var _a;
|
|
11640
|
-
if (typeof navigator === "undefined")
|
|
11633
|
+
var _a, _b;
|
|
11634
|
+
if (typeof navigator === "undefined" || Object.keys(navigator).length === 0)
|
|
11641
11635
|
return "Browser" /* Browser */;
|
|
11642
|
-
const ua2 = navigator.userAgent.toLowerCase();
|
|
11643
|
-
if ((
|
|
11636
|
+
const ua2 = (_a = navigator.userAgent) == null ? void 0 : _a.toLowerCase();
|
|
11637
|
+
if ((_b = navigator.brave) == null ? void 0 : _b.isBrave)
|
|
11644
11638
|
return "Brave" /* Brave */;
|
|
11645
|
-
if (ua2.indexOf("edg/") > -1)
|
|
11639
|
+
if ((ua2 == null ? void 0 : ua2.indexOf("edg/")) > -1)
|
|
11646
11640
|
return "Edge" /* Edge */;
|
|
11647
|
-
if (ua2.indexOf("op") > -1)
|
|
11641
|
+
if ((ua2 == null ? void 0 : ua2.indexOf("op")) > -1)
|
|
11648
11642
|
return "Opera" /* Opera */;
|
|
11649
11643
|
if (isArc())
|
|
11650
11644
|
return "Arc" /* Arc */;
|
|
11651
|
-
if (ua2.indexOf("chrome") > -1)
|
|
11645
|
+
if ((ua2 == null ? void 0 : ua2.indexOf("chrome")) > -1)
|
|
11652
11646
|
return "Chrome" /* Chrome */;
|
|
11653
|
-
if (ua2.indexOf("firefox") > -1)
|
|
11647
|
+
if ((ua2 == null ? void 0 : ua2.indexOf("firefox")) > -1)
|
|
11654
11648
|
return "Firefox" /* Firefox */;
|
|
11655
11649
|
if (isSafari())
|
|
11656
11650
|
return "Safari" /* Safari */;
|
|
@@ -14389,7 +14383,7 @@ function FunConnectOptions({ onClose }) {
|
|
|
14389
14383
|
// src/components/SignIn/SignIn.tsx
|
|
14390
14384
|
import React138, { useCallback as useCallback29, useContext as useContext23, useRef as useRef11 } from "react";
|
|
14391
14385
|
import { UserRejectedRequestError } from "viem";
|
|
14392
|
-
import { useAccount as
|
|
14386
|
+
import { useAccount as useAccount9, useSignMessage } from "wagmi";
|
|
14393
14387
|
var signInIcon = async () => (await import("./sign-FZVB2CS6.js")).default;
|
|
14394
14388
|
function SignIn({
|
|
14395
14389
|
onClose,
|
|
@@ -14418,7 +14412,7 @@ function SignIn({
|
|
|
14418
14412
|
getNonce();
|
|
14419
14413
|
}, [getNonce]);
|
|
14420
14414
|
const mobile = isMobile();
|
|
14421
|
-
const { address, chain: activeChain } =
|
|
14415
|
+
const { address, chain: activeChain } = useAccount9();
|
|
14422
14416
|
const { signMessageAsync } = useSignMessage();
|
|
14423
14417
|
const signIn = async () => {
|
|
14424
14418
|
try {
|
|
@@ -14566,7 +14560,7 @@ function ConnectModal({ onClose, open }) {
|
|
|
14566
14560
|
const titleId = "rk_connect_title";
|
|
14567
14561
|
const connectionStatus = useConnectionStatus();
|
|
14568
14562
|
const { disconnect } = useDisconnect2();
|
|
14569
|
-
const { isConnecting } =
|
|
14563
|
+
const { isConnecting } = useAccount10();
|
|
14570
14564
|
const onAuthCancel = React139.useCallback(() => {
|
|
14571
14565
|
onClose();
|
|
14572
14566
|
disconnect();
|
|
@@ -14721,7 +14715,7 @@ function ModalProvider({ children }) {
|
|
|
14721
14715
|
openModal: openFunDevTestModal
|
|
14722
14716
|
} = useModalStateValue();
|
|
14723
14717
|
const connectionStatus = useConnectionStatus();
|
|
14724
|
-
const { chainId } =
|
|
14718
|
+
const { chainId } = useAccount11();
|
|
14725
14719
|
const { chains } = useConfig4();
|
|
14726
14720
|
const isCurrentChainSupported = chains.some((chain) => chain.id === chainId);
|
|
14727
14721
|
function closeModals({
|
|
@@ -15117,6 +15111,7 @@ var FunkitWeb2Provider = ({
|
|
|
15117
15111
|
}) => {
|
|
15118
15112
|
const funkitConfig = useFunkitConfig();
|
|
15119
15113
|
const { connectAsync } = useConnect2();
|
|
15114
|
+
const { chains } = useConfig5();
|
|
15120
15115
|
const { connectors, disconnectAsync } = useDisconnect3();
|
|
15121
15116
|
const [privy, setPrivy] = useState40(null);
|
|
15122
15117
|
const [privyIframeUrl, setPrivyIframeUrl] = useState40();
|
|
@@ -15145,7 +15140,8 @@ var FunkitWeb2Provider = ({
|
|
|
15145
15140
|
useEffect31(() => {
|
|
15146
15141
|
const newPrivy = new PrivyJS({
|
|
15147
15142
|
appId: funkitConfig.privyAppId,
|
|
15148
|
-
storage: new LocalStorage()
|
|
15143
|
+
storage: new LocalStorage(),
|
|
15144
|
+
supportedChains: chains
|
|
15149
15145
|
});
|
|
15150
15146
|
setPrivyIframeUrl(newPrivy.embeddedWallet.getURL());
|
|
15151
15147
|
setPrivy(newPrivy);
|
|
@@ -15552,7 +15548,7 @@ var useFunkitWeb2Login = () => useContext25(FunkitWeb2Context);
|
|
|
15552
15548
|
// src/hooks/useConnectionStatus.ts
|
|
15553
15549
|
function useConnectionStatus() {
|
|
15554
15550
|
const authenticationStatus = useAuthenticationStatus();
|
|
15555
|
-
const { isConnected } =
|
|
15551
|
+
const { isConnected } = useAccount12();
|
|
15556
15552
|
const { isLoggingIn: isWeb2Connecting } = useFunkitWeb2Login();
|
|
15557
15553
|
if (isWeb2Connecting) {
|
|
15558
15554
|
return "loading";
|
|
@@ -15601,7 +15597,7 @@ var DropdownIcon = () => /* @__PURE__ */ React145.createElement("svg", {
|
|
|
15601
15597
|
|
|
15602
15598
|
// src/components/ConnectButton/ConnectButtonRenderer.tsx
|
|
15603
15599
|
import React147, { useContext as useContext28 } from "react";
|
|
15604
|
-
import { useAccount as
|
|
15600
|
+
import { useAccount as useAccount16, useBalance, useConfig as useConfig6 } from "wagmi";
|
|
15605
15601
|
|
|
15606
15602
|
// src/hooks/useIsMounted.ts
|
|
15607
15603
|
import { useCallback as useCallback32, useEffect as useEffect32, useState as useState42 } from "react";
|
|
@@ -15634,19 +15630,19 @@ function useMainnetEnsAvatar(name) {
|
|
|
15634
15630
|
|
|
15635
15631
|
// src/transactions/useRecentTransactions.ts
|
|
15636
15632
|
import { useEffect as useEffect34, useState as useState44 } from "react";
|
|
15637
|
-
import { useAccount as
|
|
15633
|
+
import { useAccount as useAccount15 } from "wagmi";
|
|
15638
15634
|
|
|
15639
15635
|
// src/hooks/useChainId.ts
|
|
15640
|
-
import { useAccount as
|
|
15636
|
+
import { useAccount as useAccount13 } from "wagmi";
|
|
15641
15637
|
function useChainId() {
|
|
15642
15638
|
var _a;
|
|
15643
|
-
const { chain: activeChain } =
|
|
15639
|
+
const { chain: activeChain } = useAccount13();
|
|
15644
15640
|
return (_a = activeChain == null ? void 0 : activeChain.id) != null ? _a : null;
|
|
15645
15641
|
}
|
|
15646
15642
|
|
|
15647
15643
|
// src/transactions/TransactionStoreContext.tsx
|
|
15648
15644
|
import React146, { createContext as createContext21, useContext as useContext27, useEffect as useEffect33, useState as useState43 } from "react";
|
|
15649
|
-
import { useAccount as
|
|
15645
|
+
import { useAccount as useAccount14, usePublicClient } from "wagmi";
|
|
15650
15646
|
|
|
15651
15647
|
// src/transactions/transactionStore.ts
|
|
15652
15648
|
var storageKey5 = "rk-transactions";
|
|
@@ -15793,7 +15789,7 @@ function TransactionStoreProvider({
|
|
|
15793
15789
|
children
|
|
15794
15790
|
}) {
|
|
15795
15791
|
const provider = usePublicClient();
|
|
15796
|
-
const { address } =
|
|
15792
|
+
const { address } = useAccount14();
|
|
15797
15793
|
const chainId = useChainId();
|
|
15798
15794
|
const [store] = useState43(
|
|
15799
15795
|
() => storeSingleton != null ? storeSingleton : storeSingleton = createTransactionStore({ provider })
|
|
@@ -15821,7 +15817,7 @@ function useTransactionStore() {
|
|
|
15821
15817
|
// src/transactions/useRecentTransactions.ts
|
|
15822
15818
|
function useRecentTransactions() {
|
|
15823
15819
|
const store = useTransactionStore();
|
|
15824
|
-
const { address } =
|
|
15820
|
+
const { address } = useAccount15();
|
|
15825
15821
|
const chainId = useChainId();
|
|
15826
15822
|
const [transactions, setTransactions] = useState44(
|
|
15827
15823
|
() => store && address && chainId ? store.getTransactions(address, chainId) : []
|
|
@@ -15874,11 +15870,11 @@ function ConnectButtonRenderer({
|
|
|
15874
15870
|
}) {
|
|
15875
15871
|
var _a, _b, _c, _d;
|
|
15876
15872
|
const isMounted = useIsMounted();
|
|
15877
|
-
const { address } =
|
|
15873
|
+
const { address } = useAccount16();
|
|
15878
15874
|
const ensName = useMainnetEnsName(address);
|
|
15879
15875
|
const ensAvatar = useMainnetEnsAvatar(ensName);
|
|
15880
|
-
const { chainId } =
|
|
15881
|
-
const { chains: wagmiChains } =
|
|
15876
|
+
const { chainId } = useAccount16();
|
|
15877
|
+
const { chains: wagmiChains } = useConfig6();
|
|
15882
15878
|
const isCurrentChainSupported = wagmiChains.some(
|
|
15883
15879
|
(chain) => chain.id === chainId
|
|
15884
15880
|
);
|
|
@@ -16986,7 +16982,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
16986
16982
|
localStorage.setItem(storageKey6, version);
|
|
16987
16983
|
}
|
|
16988
16984
|
function getCurrentSdkVersion() {
|
|
16989
|
-
return "1.2.
|
|
16985
|
+
return "1.2.3";
|
|
16990
16986
|
}
|
|
16991
16987
|
function useFingerprint() {
|
|
16992
16988
|
const fingerprint = useCallback33(() => {
|
|
@@ -17146,7 +17142,7 @@ import React150, {
|
|
|
17146
17142
|
useMemo as useMemo35,
|
|
17147
17143
|
useState as useState46
|
|
17148
17144
|
} from "react";
|
|
17149
|
-
import { useAccount as
|
|
17145
|
+
import { useAccount as useAccount17, useAccountEffect as useAccountEffect4 } from "wagmi";
|
|
17150
17146
|
function WalletButtonRenderer({
|
|
17151
17147
|
wallet = "rainbow",
|
|
17152
17148
|
children
|
|
@@ -17167,7 +17163,7 @@ function WalletButtonRenderer({
|
|
|
17167
17163
|
if (!connectModalOpen && connector)
|
|
17168
17164
|
setConnector(null);
|
|
17169
17165
|
}, [connectModalOpen, connector, setConnector]);
|
|
17170
|
-
const { isConnected, isConnecting } =
|
|
17166
|
+
const { isConnected, isConnecting } = useAccount17();
|
|
17171
17167
|
useAccountEffect4({
|
|
17172
17168
|
onConnect: () => {
|
|
17173
17169
|
if (isError)
|
|
@@ -17985,10 +17981,10 @@ function FunkitPaymentsIconLine({
|
|
|
17985
17981
|
|
|
17986
17982
|
// src/transactions/useAddRecentTransaction.ts
|
|
17987
17983
|
import { useCallback as useCallback36 } from "react";
|
|
17988
|
-
import { useAccount as
|
|
17984
|
+
import { useAccount as useAccount18 } from "wagmi";
|
|
17989
17985
|
function useAddRecentTransaction() {
|
|
17990
17986
|
const store = useTransactionStore();
|
|
17991
|
-
const { address } =
|
|
17987
|
+
const { address } = useAccount18();
|
|
17992
17988
|
const chainId = useChainId();
|
|
17993
17989
|
return useCallback36(
|
|
17994
17990
|
(transaction) => {
|