@vechain/vechain-kit 1.2.3 → 1.2.4
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/dist/index.cjs +286 -244
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +287 -245
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IVechainEnergyOracleV1__factory, IB3TR__factory, IVOT3__factory, GalaxyMember__factory, NodeManagement__factory, X2EarnApps__factory, XAllocationVoting__factory, XAllocationVotingGovernor__factory, XAllocationPool__factory, VoterRewards__factory, VeBetterPassport__factory, IERC20__factory, MockENS__factory, SubdomainClaimer__factory, IReverseRegistrar__factory, SimpleAccountFactory__factory, ERC20__factory, Emissions__factory, X2EarnRewardsPool__factory } from './chunk-LSKZXRAS.js';
|
|
2
2
|
import { getConfig, humanNumber, NodeStrengthLevelToImage, allNodeStrengthLevelToName, notFoundImage, convertUriToUrl, resolveMediaTypeFromMimeType, gmNfts, humanAddress, VECHAIN_PRIVY_APP_ID, getPicassoImage, compareAddresses, isValidAddress, TOKEN_LOGOS, humanDomain, randomTransactionUser } from './chunk-RAUWG27M.js';
|
|
3
3
|
export { getConfig } from './chunk-RAUWG27M.js';
|
|
4
|
-
import { SimpleAccountFactoryABI, VechainLogoHorizontal, VechainLogo,
|
|
4
|
+
import { SimpleAccountFactoryABI, VechainLogoHorizontal, VechainLogo, SimpleAccountABI, PrivyLogo } from './chunk-IGUWNKV2.js';
|
|
5
5
|
import './chunk-PZ5AY32C.js';
|
|
6
6
|
import React9, { createContext, useState, useEffect, useMemo, useCallback, useContext, useRef } from 'react';
|
|
7
7
|
import { useLoginWithOAuth, usePrivy, useLoginWithPasskey as useLoginWithPasskey$1, useLoginWithEmail, PrivyProvider } from '@privy-io/react-auth';
|
|
@@ -32,11 +32,11 @@ import { LuMail } from 'react-icons/lu';
|
|
|
32
32
|
import { MdOutlineNavigateNext, MdSwapHoriz, MdManageAccounts, MdOutlineErrorOutline, MdOutlineRefresh, MdEmail } from 'react-icons/md';
|
|
33
33
|
import { BiBell, BiArchive } from 'react-icons/bi';
|
|
34
34
|
import { RiLogoutBoxLine, RiTwitterXFill } from 'react-icons/ri';
|
|
35
|
-
import { PiLineVertical } from 'react-icons/pi';
|
|
36
35
|
import { VscRefresh, VscDebugDisconnect } from 'react-icons/vsc';
|
|
37
36
|
import { FaRegArrowAltCircleDown, FaRegAddressCard, FaExternalLinkAlt, FaTelegramPlane, FaGoogle, FaEnvelope, FaTwitter, FaPhone, FaSpotify, FaApple, FaInstagram, FaTiktok, FaGithub, FaLinkedin, FaTelegram, FaDiscord, FaPlus, FaWallet } from 'react-icons/fa';
|
|
38
37
|
import { FiSend, FiSlash, FiArrowDown } from 'react-icons/fi';
|
|
39
38
|
import { GiHouseKeys, GiConfirmed } from 'react-icons/gi';
|
|
39
|
+
import { PiLineVertical } from 'react-icons/pi';
|
|
40
40
|
import { QRCode } from 'react-qrcode-logo';
|
|
41
41
|
import { GoLinkExternal } from 'react-icons/go';
|
|
42
42
|
import { FaWhatsapp } from 'react-icons/fa6';
|
|
@@ -4709,7 +4709,7 @@ var AddressDisplay = ({ wallet, label, size = "lg" }) => {
|
|
|
4709
4709
|
// package.json
|
|
4710
4710
|
var package_default = {
|
|
4711
4711
|
name: "@vechain/vechain-kit",
|
|
4712
|
-
version: "1.2.
|
|
4712
|
+
version: "1.2.4",
|
|
4713
4713
|
private: false,
|
|
4714
4714
|
homepage: "https://github.com/vechain/vechain-kit",
|
|
4715
4715
|
repository: "github:vechain/vechain-kit",
|
|
@@ -6326,6 +6326,256 @@ var QuickActionsSection = ({ mt, setCurrentContent }) => {
|
|
|
6326
6326
|
)
|
|
6327
6327
|
] });
|
|
6328
6328
|
};
|
|
6329
|
+
var NetworkInfo = () => {
|
|
6330
|
+
const { t } = useTranslation();
|
|
6331
|
+
const { darkMode: isDark, network } = useVeChainKitConfig();
|
|
6332
|
+
const { connection, smartAccount } = useWallet();
|
|
6333
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6334
|
+
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6335
|
+
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
6336
|
+
t("Connection Type"),
|
|
6337
|
+
":"
|
|
6338
|
+
] }),
|
|
6339
|
+
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.source.type })
|
|
6340
|
+
] }),
|
|
6341
|
+
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6342
|
+
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
6343
|
+
t("Network"),
|
|
6344
|
+
":"
|
|
6345
|
+
] }),
|
|
6346
|
+
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.type })
|
|
6347
|
+
] }),
|
|
6348
|
+
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6349
|
+
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
6350
|
+
t("Node URL"),
|
|
6351
|
+
":"
|
|
6352
|
+
] }),
|
|
6353
|
+
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || getConfig(network.type).nodeUrl })
|
|
6354
|
+
] }),
|
|
6355
|
+
connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6356
|
+
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
6357
|
+
t("Smart Account"),
|
|
6358
|
+
":"
|
|
6359
|
+
] }),
|
|
6360
|
+
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
|
|
6361
|
+
] }) : smartAccount.isDeployed && /* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6362
|
+
/* @__PURE__ */ jsxs(
|
|
6363
|
+
Text,
|
|
6364
|
+
{
|
|
6365
|
+
fontSize: "sm",
|
|
6366
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6367
|
+
children: [
|
|
6368
|
+
t("Smart Account"),
|
|
6369
|
+
":"
|
|
6370
|
+
]
|
|
6371
|
+
}
|
|
6372
|
+
),
|
|
6373
|
+
/* @__PURE__ */ jsx(
|
|
6374
|
+
Text,
|
|
6375
|
+
{
|
|
6376
|
+
fontSize: "sm",
|
|
6377
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6378
|
+
children: smartAccount.version ? `v${smartAccount.version}` : "v1"
|
|
6379
|
+
}
|
|
6380
|
+
)
|
|
6381
|
+
] }),
|
|
6382
|
+
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6383
|
+
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
6384
|
+
t("VeChain Kit"),
|
|
6385
|
+
":"
|
|
6386
|
+
] }),
|
|
6387
|
+
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: package_default.version })
|
|
6388
|
+
] })
|
|
6389
|
+
] });
|
|
6390
|
+
};
|
|
6391
|
+
var CrossAppConnectionCard = ({ connectionCache }) => {
|
|
6392
|
+
const { t } = useTranslation();
|
|
6393
|
+
const { darkMode: isDark } = useVeChainKitConfig();
|
|
6394
|
+
return /* @__PURE__ */ jsx(Fragment, { children: connectionCache.ecosystemApp && /* @__PURE__ */ jsxs(
|
|
6395
|
+
VStack,
|
|
6396
|
+
{
|
|
6397
|
+
p: 4,
|
|
6398
|
+
bg: isDark ? "#1a1a1a" : "#f5f5f5",
|
|
6399
|
+
borderRadius: "xl",
|
|
6400
|
+
spacing: 4,
|
|
6401
|
+
w: "full",
|
|
6402
|
+
children: [
|
|
6403
|
+
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6404
|
+
/* @__PURE__ */ jsxs(
|
|
6405
|
+
Text,
|
|
6406
|
+
{
|
|
6407
|
+
fontSize: "sm",
|
|
6408
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6409
|
+
children: [
|
|
6410
|
+
t("Logged in with"),
|
|
6411
|
+
":"
|
|
6412
|
+
]
|
|
6413
|
+
}
|
|
6414
|
+
),
|
|
6415
|
+
/* @__PURE__ */ jsx(
|
|
6416
|
+
Text,
|
|
6417
|
+
{
|
|
6418
|
+
fontSize: "sm",
|
|
6419
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6420
|
+
children: connectionCache.ecosystemApp.name
|
|
6421
|
+
}
|
|
6422
|
+
)
|
|
6423
|
+
] }),
|
|
6424
|
+
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6425
|
+
/* @__PURE__ */ jsxs(
|
|
6426
|
+
Text,
|
|
6427
|
+
{
|
|
6428
|
+
fontSize: "sm",
|
|
6429
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6430
|
+
children: [
|
|
6431
|
+
t("Connected at"),
|
|
6432
|
+
":"
|
|
6433
|
+
]
|
|
6434
|
+
}
|
|
6435
|
+
),
|
|
6436
|
+
/* @__PURE__ */ jsx(
|
|
6437
|
+
Text,
|
|
6438
|
+
{
|
|
6439
|
+
fontSize: "sm",
|
|
6440
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6441
|
+
children: new Date(
|
|
6442
|
+
connectionCache.timestamp
|
|
6443
|
+
).toLocaleString()
|
|
6444
|
+
}
|
|
6445
|
+
)
|
|
6446
|
+
] }),
|
|
6447
|
+
/* @__PURE__ */ jsx(NetworkInfo, {})
|
|
6448
|
+
]
|
|
6449
|
+
}
|
|
6450
|
+
) });
|
|
6451
|
+
};
|
|
6452
|
+
var DappKitConnectionCard = () => {
|
|
6453
|
+
const { t } = useTranslation();
|
|
6454
|
+
const { source } = useWallet$1();
|
|
6455
|
+
const { darkMode: isDark } = useVeChainKitConfig();
|
|
6456
|
+
return /* @__PURE__ */ jsx(Fragment, { children: source && /* @__PURE__ */ jsxs(
|
|
6457
|
+
VStack,
|
|
6458
|
+
{
|
|
6459
|
+
p: 4,
|
|
6460
|
+
bg: isDark ? "#1a1a1a" : "#f5f5f5",
|
|
6461
|
+
borderRadius: "xl",
|
|
6462
|
+
spacing: 4,
|
|
6463
|
+
w: "full",
|
|
6464
|
+
justifyContent: "space-between",
|
|
6465
|
+
children: [
|
|
6466
|
+
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6467
|
+
/* @__PURE__ */ jsxs(
|
|
6468
|
+
Text,
|
|
6469
|
+
{
|
|
6470
|
+
fontSize: "sm",
|
|
6471
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6472
|
+
children: [
|
|
6473
|
+
t("Logged in with"),
|
|
6474
|
+
":"
|
|
6475
|
+
]
|
|
6476
|
+
}
|
|
6477
|
+
),
|
|
6478
|
+
/* @__PURE__ */ jsx(
|
|
6479
|
+
Text,
|
|
6480
|
+
{
|
|
6481
|
+
fontSize: "sm",
|
|
6482
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6483
|
+
children: source
|
|
6484
|
+
}
|
|
6485
|
+
)
|
|
6486
|
+
] }),
|
|
6487
|
+
/* @__PURE__ */ jsx(NetworkInfo, {})
|
|
6488
|
+
]
|
|
6489
|
+
}
|
|
6490
|
+
) });
|
|
6491
|
+
};
|
|
6492
|
+
var PrivyConnectionCard = () => {
|
|
6493
|
+
const { t } = useTranslation();
|
|
6494
|
+
const { privy, darkMode: isDark } = useVeChainKitConfig();
|
|
6495
|
+
const { data: appInfo, isLoading } = useFetchAppInfo(privy?.appId ?? "");
|
|
6496
|
+
if (isLoading)
|
|
6497
|
+
return /* @__PURE__ */ jsx(VStack, { w: "full", h: "full", justify: "center", align: "center", children: /* @__PURE__ */ jsx(Spinner, {}) });
|
|
6498
|
+
return /* @__PURE__ */ jsx(Fragment, { children: appInfo && /* @__PURE__ */ jsxs(
|
|
6499
|
+
VStack,
|
|
6500
|
+
{
|
|
6501
|
+
p: 4,
|
|
6502
|
+
bg: isDark ? "#1a1a1a" : "#f5f5f5",
|
|
6503
|
+
borderRadius: "xl",
|
|
6504
|
+
spacing: 4,
|
|
6505
|
+
w: "full",
|
|
6506
|
+
justifyContent: "space-between",
|
|
6507
|
+
children: [
|
|
6508
|
+
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6509
|
+
/* @__PURE__ */ jsxs(
|
|
6510
|
+
Text,
|
|
6511
|
+
{
|
|
6512
|
+
fontSize: "sm",
|
|
6513
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6514
|
+
children: [
|
|
6515
|
+
t("Logged in with"),
|
|
6516
|
+
":"
|
|
6517
|
+
]
|
|
6518
|
+
}
|
|
6519
|
+
),
|
|
6520
|
+
/* @__PURE__ */ jsx(
|
|
6521
|
+
Text,
|
|
6522
|
+
{
|
|
6523
|
+
fontSize: "sm",
|
|
6524
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6525
|
+
children: Object.values(appInfo)[0].name
|
|
6526
|
+
}
|
|
6527
|
+
)
|
|
6528
|
+
] }),
|
|
6529
|
+
/* @__PURE__ */ jsx(NetworkInfo, {})
|
|
6530
|
+
]
|
|
6531
|
+
}
|
|
6532
|
+
) });
|
|
6533
|
+
};
|
|
6534
|
+
var WalletSecuredBy = () => {
|
|
6535
|
+
const { connection } = useWallet();
|
|
6536
|
+
const { t } = useTranslation();
|
|
6537
|
+
const { darkMode: isDark, privy } = useVeChainKitConfig();
|
|
6538
|
+
const { getConnectionCache } = useCrossAppConnectionCache();
|
|
6539
|
+
const connectionCache = getConnectionCache();
|
|
6540
|
+
return /* @__PURE__ */ jsxs(
|
|
6541
|
+
VStack,
|
|
6542
|
+
{
|
|
6543
|
+
w: "full",
|
|
6544
|
+
align: "stretch",
|
|
6545
|
+
textAlign: "center",
|
|
6546
|
+
mt: 5,
|
|
6547
|
+
p: 3,
|
|
6548
|
+
borderRadius: "lg",
|
|
6549
|
+
bg: isDark ? "whiteAlpha.100" : "blackAlpha.50",
|
|
6550
|
+
shadow: "sm",
|
|
6551
|
+
children: [
|
|
6552
|
+
/* @__PURE__ */ jsx(Text, { fontSize: "xs", fontWeight: "800", children: t("Wallet secured by") }),
|
|
6553
|
+
/* @__PURE__ */ jsxs(HStack, { justify: "center", children: [
|
|
6554
|
+
/* @__PURE__ */ jsx(PrivyLogo, { isDark, w: "50px" }),
|
|
6555
|
+
/* @__PURE__ */ jsx(Icon, { as: PiLineVertical, ml: 2 }),
|
|
6556
|
+
connection.isConnectedWithVeChain ? /* @__PURE__ */ jsx(VechainLogoHorizontal, { isDark, w: "69px" }) : connection.isConnectedWithCrossApp && connectionCache && /* @__PURE__ */ jsx(
|
|
6557
|
+
Image,
|
|
6558
|
+
{
|
|
6559
|
+
src: connectionCache.ecosystemApp.logoUrl,
|
|
6560
|
+
alt: connectionCache.ecosystemApp.name,
|
|
6561
|
+
maxW: "40px",
|
|
6562
|
+
borderRadius: "md"
|
|
6563
|
+
}
|
|
6564
|
+
),
|
|
6565
|
+
connection.isConnectedWithSocialLogin && !connection.isConnectedWithVeChain && /* @__PURE__ */ jsx(
|
|
6566
|
+
Image,
|
|
6567
|
+
{
|
|
6568
|
+
src: privy?.appearance.logo,
|
|
6569
|
+
alt: privy?.appearance.logo,
|
|
6570
|
+
maxW: "40px",
|
|
6571
|
+
borderRadius: "md"
|
|
6572
|
+
}
|
|
6573
|
+
)
|
|
6574
|
+
] })
|
|
6575
|
+
]
|
|
6576
|
+
}
|
|
6577
|
+
);
|
|
6578
|
+
};
|
|
6329
6579
|
var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
6330
6580
|
const { t } = useTranslation();
|
|
6331
6581
|
const [showFullText, setShowFullText] = useState(false);
|
|
@@ -6333,7 +6583,7 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
|
6333
6583
|
const { exportWallet } = usePrivy();
|
|
6334
6584
|
const walletImage = getPicassoImage(connectedWallet?.address ?? "");
|
|
6335
6585
|
const { getConnectionCache } = useCrossAppConnectionCache();
|
|
6336
|
-
const {
|
|
6586
|
+
const { darkMode: isDark } = useVeChainKitConfig();
|
|
6337
6587
|
const { connection } = useWallet();
|
|
6338
6588
|
const connectionCache = getConnectionCache();
|
|
6339
6589
|
return /* @__PURE__ */ jsxs(ScrollToTopWrapper, { children: [
|
|
@@ -6412,7 +6662,26 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
|
6412
6662
|
),
|
|
6413
6663
|
"."
|
|
6414
6664
|
] }),
|
|
6415
|
-
/* @__PURE__ */
|
|
6665
|
+
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", opacity: 0.5, children: [
|
|
6666
|
+
t("Click"),
|
|
6667
|
+
" ",
|
|
6668
|
+
/* @__PURE__ */ jsx(
|
|
6669
|
+
Link,
|
|
6670
|
+
{
|
|
6671
|
+
href: "https://docs.vechain-kit.vechain.org/vechain-kit/embedded-wallets",
|
|
6672
|
+
isExternal: true,
|
|
6673
|
+
color: "gray.500",
|
|
6674
|
+
fontSize: "14px",
|
|
6675
|
+
textDecoration: "underline",
|
|
6676
|
+
children: t("here")
|
|
6677
|
+
}
|
|
6678
|
+
),
|
|
6679
|
+
" ",
|
|
6680
|
+
t(
|
|
6681
|
+
"to learn more about embedded wallets."
|
|
6682
|
+
)
|
|
6683
|
+
] }),
|
|
6684
|
+
/* @__PURE__ */ jsx(Text, { fontSize: "sm", opacity: 0.5, children: t(
|
|
6416
6685
|
"A smart account is being used as a gateway for blockchain interactions."
|
|
6417
6686
|
) })
|
|
6418
6687
|
] }),
|
|
@@ -6429,30 +6698,32 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
|
6429
6698
|
}
|
|
6430
6699
|
)
|
|
6431
6700
|
] }),
|
|
6432
|
-
|
|
6701
|
+
/* @__PURE__ */ jsx(
|
|
6433
6702
|
ActionButton,
|
|
6434
6703
|
{
|
|
6435
6704
|
title: t("Backup your wallet"),
|
|
6436
6705
|
description: t(
|
|
6437
|
-
"Store your Recovery Phrase or Private Key in a secure location, avoid losing access to your assets."
|
|
6706
|
+
connection.isConnectedWithSocialLogin ? "Store your Recovery Phrase or Private Key in a secure location, avoid losing access to your assets." : "Backup can be done only in the app securing your wallet."
|
|
6438
6707
|
),
|
|
6439
6708
|
onClick: () => {
|
|
6440
6709
|
exportWallet();
|
|
6441
6710
|
},
|
|
6711
|
+
isDisabled: !connection.isConnectedWithSocialLogin,
|
|
6442
6712
|
leftIcon: GiHouseKeys,
|
|
6443
6713
|
rightIcon: MdOutlineNavigateNext
|
|
6444
6714
|
}
|
|
6445
6715
|
),
|
|
6446
|
-
|
|
6716
|
+
/* @__PURE__ */ jsx(
|
|
6447
6717
|
ActionButton,
|
|
6448
6718
|
{
|
|
6449
6719
|
title: t("Login methods"),
|
|
6450
6720
|
description: t(
|
|
6451
|
-
"View and manage the login methods linked to your wallet."
|
|
6721
|
+
connection.isConnectedWithSocialLogin ? "View and manage the login methods linked to your wallet." : "Login methods can be managed only in the app securing your wallet."
|
|
6452
6722
|
),
|
|
6453
6723
|
onClick: () => {
|
|
6454
6724
|
setCurrentContent("privy-linked-accounts");
|
|
6455
6725
|
},
|
|
6726
|
+
isDisabled: !connection.isConnectedWithSocialLogin,
|
|
6456
6727
|
leftIcon: MdManageAccounts,
|
|
6457
6728
|
rightIcon: MdOutlineNavigateNext
|
|
6458
6729
|
}
|
|
@@ -6460,46 +6731,10 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
|
6460
6731
|
]
|
|
6461
6732
|
}
|
|
6462
6733
|
) }),
|
|
6463
|
-
/* @__PURE__ */ jsx(ModalFooter, { w: "full", children: /* @__PURE__ */
|
|
6464
|
-
/* @__PURE__ */ jsx(
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
textAlign: "center",
|
|
6468
|
-
alignItems: "center",
|
|
6469
|
-
justify: "center",
|
|
6470
|
-
w: "full",
|
|
6471
|
-
children: /* @__PURE__ */ jsx(Text, { fontSize: "xs", fontWeight: "800", children: t("Wallet secured by") })
|
|
6472
|
-
}
|
|
6473
|
-
),
|
|
6474
|
-
/* @__PURE__ */ jsxs(HStack, { justify: "center", children: [
|
|
6475
|
-
/* @__PURE__ */ jsx(PrivyLogo, { isDark, w: "50px" }),
|
|
6476
|
-
/* @__PURE__ */ jsx(Icon, { as: PiLineVertical, ml: 2 }),
|
|
6477
|
-
connection.isConnectedWithVeChain ? /* @__PURE__ */ jsx(
|
|
6478
|
-
VechainLogoHorizontal,
|
|
6479
|
-
{
|
|
6480
|
-
isDark,
|
|
6481
|
-
w: "69px"
|
|
6482
|
-
}
|
|
6483
|
-
) : connection.isConnectedWithCrossApp && connectionCache && /* @__PURE__ */ jsx(
|
|
6484
|
-
Image,
|
|
6485
|
-
{
|
|
6486
|
-
src: connectionCache.ecosystemApp.logoUrl,
|
|
6487
|
-
alt: connectionCache.ecosystemApp.name,
|
|
6488
|
-
maxW: "40px",
|
|
6489
|
-
borderRadius: "md"
|
|
6490
|
-
}
|
|
6491
|
-
),
|
|
6492
|
-
connection.isConnectedWithSocialLogin && !connection.isConnectedWithVeChain && /* @__PURE__ */ jsx(
|
|
6493
|
-
Image,
|
|
6494
|
-
{
|
|
6495
|
-
src: privy?.appearance.logo,
|
|
6496
|
-
alt: privy?.appearance.logo,
|
|
6497
|
-
maxW: "40px",
|
|
6498
|
-
borderRadius: "md"
|
|
6499
|
-
}
|
|
6500
|
-
)
|
|
6501
|
-
] })
|
|
6502
|
-
] }) }) })
|
|
6734
|
+
/* @__PURE__ */ jsx(ModalFooter, { w: "full", children: /* @__PURE__ */ jsxs(VStack, { w: "full", children: [
|
|
6735
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
6736
|
+
connection.isConnectedWithPrivy && /* @__PURE__ */ jsx(WalletSecuredBy, {})
|
|
6737
|
+
] }) })
|
|
6503
6738
|
] });
|
|
6504
6739
|
};
|
|
6505
6740
|
var WalletSettingsContent = ({
|
|
@@ -6590,10 +6825,7 @@ var WalletSettingsContent = ({
|
|
|
6590
6825
|
{
|
|
6591
6826
|
title: t("Embedded Wallet"),
|
|
6592
6827
|
description: t(
|
|
6593
|
-
"
|
|
6594
|
-
{
|
|
6595
|
-
appName: connection.isConnectedWithCrossApp ? connectionCache?.ecosystemApp?.name : Object.values(appInfo ?? {})[0]?.name ?? ""
|
|
6596
|
-
}
|
|
6828
|
+
"Manage your embedded wallet security settings or back it up to a new device."
|
|
6597
6829
|
),
|
|
6598
6830
|
onClick: () => {
|
|
6599
6831
|
setCurrentContent("embedded-wallet");
|
|
@@ -10063,197 +10295,6 @@ var FAQContent = ({ onGoBack }) => {
|
|
|
10063
10295
|
] }) })
|
|
10064
10296
|
] });
|
|
10065
10297
|
};
|
|
10066
|
-
var NetworkInfo = () => {
|
|
10067
|
-
const { t } = useTranslation();
|
|
10068
|
-
const { darkMode: isDark, network } = useVeChainKitConfig();
|
|
10069
|
-
const { connection, smartAccount } = useWallet();
|
|
10070
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10071
|
-
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10072
|
-
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
10073
|
-
t("Connection Type"),
|
|
10074
|
-
":"
|
|
10075
|
-
] }),
|
|
10076
|
-
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.source.type })
|
|
10077
|
-
] }),
|
|
10078
|
-
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10079
|
-
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
10080
|
-
t("Network"),
|
|
10081
|
-
":"
|
|
10082
|
-
] }),
|
|
10083
|
-
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.type })
|
|
10084
|
-
] }),
|
|
10085
|
-
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10086
|
-
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
10087
|
-
t("Node"),
|
|
10088
|
-
":"
|
|
10089
|
-
] }),
|
|
10090
|
-
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || getConfig(network.type).nodeUrl })
|
|
10091
|
-
] }),
|
|
10092
|
-
connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10093
|
-
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
10094
|
-
t("Smart Account"),
|
|
10095
|
-
":"
|
|
10096
|
-
] }),
|
|
10097
|
-
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
|
|
10098
|
-
] }) : /* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10099
|
-
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
10100
|
-
t("Smart Account"),
|
|
10101
|
-
":"
|
|
10102
|
-
] }),
|
|
10103
|
-
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
|
|
10104
|
-
] }),
|
|
10105
|
-
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10106
|
-
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
10107
|
-
t("VeChain Kit"),
|
|
10108
|
-
":"
|
|
10109
|
-
] }),
|
|
10110
|
-
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: package_default.version })
|
|
10111
|
-
] })
|
|
10112
|
-
] });
|
|
10113
|
-
};
|
|
10114
|
-
var CrossAppConnectionCard = ({ connectionCache }) => {
|
|
10115
|
-
const { t } = useTranslation();
|
|
10116
|
-
const { darkMode: isDark } = useVeChainKitConfig();
|
|
10117
|
-
return /* @__PURE__ */ jsx(Fragment, { children: connectionCache.ecosystemApp && /* @__PURE__ */ jsxs(
|
|
10118
|
-
VStack,
|
|
10119
|
-
{
|
|
10120
|
-
p: 4,
|
|
10121
|
-
bg: isDark ? "#1a1a1a" : "#f5f5f5",
|
|
10122
|
-
borderRadius: "xl",
|
|
10123
|
-
spacing: 4,
|
|
10124
|
-
w: "full",
|
|
10125
|
-
children: [
|
|
10126
|
-
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10127
|
-
/* @__PURE__ */ jsxs(
|
|
10128
|
-
Text,
|
|
10129
|
-
{
|
|
10130
|
-
fontSize: "sm",
|
|
10131
|
-
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
10132
|
-
children: [
|
|
10133
|
-
t("Connected through"),
|
|
10134
|
-
":"
|
|
10135
|
-
]
|
|
10136
|
-
}
|
|
10137
|
-
),
|
|
10138
|
-
/* @__PURE__ */ jsx(
|
|
10139
|
-
Text,
|
|
10140
|
-
{
|
|
10141
|
-
fontSize: "sm",
|
|
10142
|
-
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
10143
|
-
children: connectionCache.ecosystemApp.name
|
|
10144
|
-
}
|
|
10145
|
-
)
|
|
10146
|
-
] }),
|
|
10147
|
-
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10148
|
-
/* @__PURE__ */ jsxs(
|
|
10149
|
-
Text,
|
|
10150
|
-
{
|
|
10151
|
-
fontSize: "sm",
|
|
10152
|
-
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
10153
|
-
children: [
|
|
10154
|
-
t("Connected at"),
|
|
10155
|
-
":"
|
|
10156
|
-
]
|
|
10157
|
-
}
|
|
10158
|
-
),
|
|
10159
|
-
/* @__PURE__ */ jsx(
|
|
10160
|
-
Text,
|
|
10161
|
-
{
|
|
10162
|
-
fontSize: "sm",
|
|
10163
|
-
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
10164
|
-
children: new Date(
|
|
10165
|
-
connectionCache.timestamp
|
|
10166
|
-
).toLocaleString()
|
|
10167
|
-
}
|
|
10168
|
-
)
|
|
10169
|
-
] }),
|
|
10170
|
-
/* @__PURE__ */ jsx(NetworkInfo, {})
|
|
10171
|
-
]
|
|
10172
|
-
}
|
|
10173
|
-
) });
|
|
10174
|
-
};
|
|
10175
|
-
var DappKitConnectionCard = () => {
|
|
10176
|
-
const { t } = useTranslation();
|
|
10177
|
-
const { source } = useWallet$1();
|
|
10178
|
-
const { darkMode: isDark } = useVeChainKitConfig();
|
|
10179
|
-
return /* @__PURE__ */ jsx(Fragment, { children: source && /* @__PURE__ */ jsxs(
|
|
10180
|
-
VStack,
|
|
10181
|
-
{
|
|
10182
|
-
p: 4,
|
|
10183
|
-
bg: isDark ? "#1a1a1a" : "#f5f5f5",
|
|
10184
|
-
borderRadius: "xl",
|
|
10185
|
-
spacing: 4,
|
|
10186
|
-
w: "full",
|
|
10187
|
-
justifyContent: "space-between",
|
|
10188
|
-
children: [
|
|
10189
|
-
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10190
|
-
/* @__PURE__ */ jsxs(
|
|
10191
|
-
Text,
|
|
10192
|
-
{
|
|
10193
|
-
fontSize: "sm",
|
|
10194
|
-
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
10195
|
-
children: [
|
|
10196
|
-
t("Connected through"),
|
|
10197
|
-
":"
|
|
10198
|
-
]
|
|
10199
|
-
}
|
|
10200
|
-
),
|
|
10201
|
-
/* @__PURE__ */ jsx(
|
|
10202
|
-
Text,
|
|
10203
|
-
{
|
|
10204
|
-
fontSize: "sm",
|
|
10205
|
-
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
10206
|
-
children: source
|
|
10207
|
-
}
|
|
10208
|
-
)
|
|
10209
|
-
] }),
|
|
10210
|
-
/* @__PURE__ */ jsx(NetworkInfo, {})
|
|
10211
|
-
]
|
|
10212
|
-
}
|
|
10213
|
-
) });
|
|
10214
|
-
};
|
|
10215
|
-
var PrivyConnectionCard = () => {
|
|
10216
|
-
const { t } = useTranslation();
|
|
10217
|
-
const { privy, darkMode: isDark } = useVeChainKitConfig();
|
|
10218
|
-
const { data: appInfo, isLoading } = useFetchAppInfo(privy?.appId ?? "");
|
|
10219
|
-
if (isLoading)
|
|
10220
|
-
return /* @__PURE__ */ jsx(VStack, { w: "full", h: "full", justify: "center", align: "center", children: /* @__PURE__ */ jsx(Spinner, {}) });
|
|
10221
|
-
return /* @__PURE__ */ jsx(Fragment, { children: appInfo && /* @__PURE__ */ jsxs(
|
|
10222
|
-
VStack,
|
|
10223
|
-
{
|
|
10224
|
-
p: 4,
|
|
10225
|
-
bg: isDark ? "#1a1a1a" : "#f5f5f5",
|
|
10226
|
-
borderRadius: "xl",
|
|
10227
|
-
spacing: 4,
|
|
10228
|
-
w: "full",
|
|
10229
|
-
justifyContent: "space-between",
|
|
10230
|
-
children: [
|
|
10231
|
-
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10232
|
-
/* @__PURE__ */ jsxs(
|
|
10233
|
-
Text,
|
|
10234
|
-
{
|
|
10235
|
-
fontSize: "sm",
|
|
10236
|
-
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
10237
|
-
children: [
|
|
10238
|
-
t("Connected through"),
|
|
10239
|
-
":"
|
|
10240
|
-
]
|
|
10241
|
-
}
|
|
10242
|
-
),
|
|
10243
|
-
/* @__PURE__ */ jsx(
|
|
10244
|
-
Text,
|
|
10245
|
-
{
|
|
10246
|
-
fontSize: "sm",
|
|
10247
|
-
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
10248
|
-
children: Object.values(appInfo)[0].name
|
|
10249
|
-
}
|
|
10250
|
-
)
|
|
10251
|
-
] }),
|
|
10252
|
-
/* @__PURE__ */ jsx(NetworkInfo, {})
|
|
10253
|
-
]
|
|
10254
|
-
}
|
|
10255
|
-
) });
|
|
10256
|
-
};
|
|
10257
10298
|
var ConnectionDetailsContent = ({ onGoBack }) => {
|
|
10258
10299
|
const { t } = useTranslation();
|
|
10259
10300
|
const { getConnectionCache } = useCrossAppConnectionCache();
|
|
@@ -10354,7 +10395,8 @@ var ConnectionDetailsContent = ({ onGoBack }) => {
|
|
|
10354
10395
|
]
|
|
10355
10396
|
}
|
|
10356
10397
|
)
|
|
10357
|
-
] })
|
|
10398
|
+
] }),
|
|
10399
|
+
connection.isConnectedWithPrivy && /* @__PURE__ */ jsx(WalletSecuredBy, {})
|
|
10358
10400
|
] }),
|
|
10359
10401
|
/* @__PURE__ */ jsx(ModalFooter, {})
|
|
10360
10402
|
] });
|