@vechain/vechain-kit 1.3.1 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -10
- package/dist/{Constants-7pfsJgOl.d.cts → Constants-DQeyU9X7.d.cts} +1 -0
- package/dist/{Constants-7pfsJgOl.d.ts → Constants-DQeyU9X7.d.ts} +1 -0
- package/dist/index.cjs +1262 -938
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +79 -46
- package/dist/index.d.ts +79 -46
- package/dist/index.js +1103 -788
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/utils/index.d.cts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var chunkNKGOARGM_cjs = require('./chunk-NKGOARGM.cjs');
|
|
|
4
4
|
var chunkEO3CLT4E_cjs = require('./chunk-EO3CLT4E.cjs');
|
|
5
5
|
var chunkX4PAU76A_cjs = require('./chunk-X4PAU76A.cjs');
|
|
6
6
|
require('./chunk-Q7SFCCGT.cjs');
|
|
7
|
-
var
|
|
7
|
+
var React8 = require('react');
|
|
8
8
|
var reactAuth = require('@privy-io/react-auth');
|
|
9
9
|
var dappKitReact = require('@vechain/dapp-kit-react');
|
|
10
10
|
var viem = require('viem');
|
|
@@ -31,13 +31,15 @@ var hi2 = require('react-icons/hi2');
|
|
|
31
31
|
var ci = require('react-icons/ci');
|
|
32
32
|
var lu = require('react-icons/lu');
|
|
33
33
|
var md = require('react-icons/md');
|
|
34
|
-
var bi = require('react-icons/bi');
|
|
35
|
-
var ri = require('react-icons/ri');
|
|
36
34
|
var vsc = require('react-icons/vsc');
|
|
37
35
|
var fa = require('react-icons/fa');
|
|
38
36
|
var fi = require('react-icons/fi');
|
|
39
|
-
var
|
|
37
|
+
var picasso = require('@vechain/picasso');
|
|
38
|
+
var gr = require('react-icons/gr');
|
|
39
|
+
var ri = require('react-icons/ri');
|
|
40
|
+
var bi = require('react-icons/bi');
|
|
40
41
|
var pi = require('react-icons/pi');
|
|
42
|
+
var gi = require('react-icons/gi');
|
|
41
43
|
var reactQrcodeLogo = require('react-qrcode-logo');
|
|
42
44
|
var go = require('react-icons/go');
|
|
43
45
|
var fa6 = require('react-icons/fa6');
|
|
@@ -48,7 +50,7 @@ var anatomy = require('@chakra-ui/anatomy');
|
|
|
48
50
|
|
|
49
51
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
50
52
|
|
|
51
|
-
var
|
|
53
|
+
var React8__default = /*#__PURE__*/_interopDefault(React8);
|
|
52
54
|
var imageCompression__default = /*#__PURE__*/_interopDefault(imageCompression);
|
|
53
55
|
var i18n__default = /*#__PURE__*/_interopDefault(i18n);
|
|
54
56
|
|
|
@@ -520,10 +522,10 @@ var pollForReceipt = async (thor, id, blocksTimeout = 5) => {
|
|
|
520
522
|
};
|
|
521
523
|
var useTxReceipt = (txId, blockTimeout) => {
|
|
522
524
|
const { thor } = dappKitReact.useConnex();
|
|
523
|
-
const [receipt, setReceipt] =
|
|
524
|
-
const [error, setError] =
|
|
525
|
-
const [isLoading, setIsLoading] =
|
|
526
|
-
|
|
525
|
+
const [receipt, setReceipt] = React8.useState();
|
|
526
|
+
const [error, setError] = React8.useState(null);
|
|
527
|
+
const [isLoading, setIsLoading] = React8.useState(false);
|
|
528
|
+
React8.useEffect(() => {
|
|
527
529
|
const fetchReceipt = async () => {
|
|
528
530
|
if (!txId) {
|
|
529
531
|
setReceipt(null);
|
|
@@ -719,7 +721,7 @@ var useXApps = () => {
|
|
|
719
721
|
// src/hooks/api/vebetterdao/xApps/hooks/useXApp.ts
|
|
720
722
|
var useXApp = (appId) => {
|
|
721
723
|
const { data: xApps, ...props } = useXApps();
|
|
722
|
-
const allApps =
|
|
724
|
+
const allApps = React8.useMemo(() => [...xApps?.active ?? [], ...xApps?.unendorsed ?? []], [xApps]);
|
|
723
725
|
const app = allApps.find((xa) => xa.id === appId);
|
|
724
726
|
return {
|
|
725
727
|
data: app,
|
|
@@ -865,7 +867,7 @@ var useUserVotesInAllRounds = (address) => {
|
|
|
865
867
|
var useUserTopVotedApps = (user) => {
|
|
866
868
|
const userRoundVotes = useUserVotesInAllRounds(user);
|
|
867
869
|
const { data: xApps } = useXApps();
|
|
868
|
-
const topVotedAppIds =
|
|
870
|
+
const topVotedAppIds = React8.useMemo(() => {
|
|
869
871
|
const appIdToVotes = {};
|
|
870
872
|
userRoundVotes.data?.forEach((voteEvent) => {
|
|
871
873
|
const appIds = voteEvent.appsIds;
|
|
@@ -881,7 +883,7 @@ var useUserTopVotedApps = (user) => {
|
|
|
881
883
|
});
|
|
882
884
|
return Object.entries(appIdToVotes).sort(([, aVotes], [, bVotes]) => Number(bVotes) - Number(aVotes)).map(([appId, votes]) => ({ appId, votes }));
|
|
883
885
|
}, [userRoundVotes]);
|
|
884
|
-
const topVotedApps =
|
|
886
|
+
const topVotedApps = React8.useMemo(() => {
|
|
885
887
|
return topVotedAppIds.map((app) => {
|
|
886
888
|
const appFound = xApps?.allApps.find(
|
|
887
889
|
(xApp) => xApp.id === app.appId
|
|
@@ -941,7 +943,7 @@ var useMostVotedAppsInRound = (roundId) => {
|
|
|
941
943
|
apps?.map((app) => app.id) ?? [],
|
|
942
944
|
roundId
|
|
943
945
|
);
|
|
944
|
-
const mostVotedApps =
|
|
946
|
+
const mostVotedApps = React8.useMemo(
|
|
945
947
|
() => xAppsShares.data?.map((appShares) => ({
|
|
946
948
|
percentage: appShares.share + appShares.unallocatedShare,
|
|
947
949
|
id: apps?.find((xa) => xa.id === appShares.app)?.id ?? "",
|
|
@@ -1160,20 +1162,20 @@ var compressImages = async (images) => {
|
|
|
1160
1162
|
}
|
|
1161
1163
|
};
|
|
1162
1164
|
var useUploadImages = ({ compressImages: compressImages2, defaultImages }) => {
|
|
1163
|
-
const [uploadedImages, setUploadedImages] =
|
|
1165
|
+
const [uploadedImages, setUploadedImages] = React8.useState(
|
|
1164
1166
|
defaultImages ?? []
|
|
1165
1167
|
);
|
|
1166
|
-
|
|
1168
|
+
React8.useEffect(() => {
|
|
1167
1169
|
if (defaultImages) {
|
|
1168
1170
|
setUploadedImages(defaultImages);
|
|
1169
1171
|
}
|
|
1170
1172
|
}, [defaultImages]);
|
|
1171
|
-
const [invalidDateError, setInvalidDateError] =
|
|
1172
|
-
const onRemove =
|
|
1173
|
+
const [invalidDateError, setInvalidDateError] = React8.useState([]);
|
|
1174
|
+
const onRemove = React8.useCallback(
|
|
1173
1175
|
(index) => setUploadedImages((s) => s.filter((_, i) => i !== index)),
|
|
1174
1176
|
[]
|
|
1175
1177
|
);
|
|
1176
|
-
const onUpload =
|
|
1178
|
+
const onUpload = React8.useCallback(
|
|
1177
1179
|
async (acceptedFiles, keepCurrent = true) => {
|
|
1178
1180
|
setInvalidDateError([]);
|
|
1179
1181
|
const parsedUploads = [];
|
|
@@ -1214,14 +1216,14 @@ var useSingleImageUpload = ({
|
|
|
1214
1216
|
compressImage,
|
|
1215
1217
|
defaultImage
|
|
1216
1218
|
}) => {
|
|
1217
|
-
const [uploadedImage, setUploadedImage] =
|
|
1218
|
-
|
|
1219
|
+
const [uploadedImage, setUploadedImage] = React8.useState(defaultImage);
|
|
1220
|
+
React8.useEffect(() => {
|
|
1219
1221
|
if (defaultImage) {
|
|
1220
1222
|
setUploadedImage(defaultImage);
|
|
1221
1223
|
}
|
|
1222
1224
|
}, [defaultImage]);
|
|
1223
|
-
const onRemove =
|
|
1224
|
-
const onUpload =
|
|
1225
|
+
const onRemove = React8.useCallback(() => setUploadedImage(void 0), []);
|
|
1226
|
+
const onUpload = React8.useCallback(
|
|
1225
1227
|
async (acceptedFile) => {
|
|
1226
1228
|
let parsedFile = acceptedFile;
|
|
1227
1229
|
if (compressImage) {
|
|
@@ -1696,7 +1698,7 @@ var useAllocationsRound = (roundId) => {
|
|
|
1696
1698
|
const currentAllocationState = useAllocationsRoundState(roundId);
|
|
1697
1699
|
const allocationRoundsEvents = useAllocationsRoundsEvents();
|
|
1698
1700
|
const { network } = useVeChainKitConfig();
|
|
1699
|
-
const currentAllocationRound =
|
|
1701
|
+
const currentAllocationRound = React8.useMemo(() => {
|
|
1700
1702
|
if (!currentAllocationId.data || !allocationRoundsEvents.data)
|
|
1701
1703
|
return;
|
|
1702
1704
|
const roundInfo = allocationRoundsEvents.data.created.find(
|
|
@@ -1718,7 +1720,7 @@ var useAllocationsRound = (roundId) => {
|
|
|
1718
1720
|
const isError = currentAllocationId.isError || allocationRoundsEvents.isError || currentAllocationState.isError;
|
|
1719
1721
|
const error = currentAllocationId.error || allocationRoundsEvents.error || currentAllocationState.error;
|
|
1720
1722
|
const blockTime = chunkEO3CLT4E_cjs.getConfig(network.type).network.blockTime;
|
|
1721
|
-
const estimatedEndTime =
|
|
1723
|
+
const estimatedEndTime = React8.useMemo(() => {
|
|
1722
1724
|
if (!currentAllocationRound) return null;
|
|
1723
1725
|
const endBlock = Number(currentAllocationRound.voteEnd);
|
|
1724
1726
|
if (!endBlock || !currentBlock) return null;
|
|
@@ -1726,7 +1728,7 @@ var useAllocationsRound = (roundId) => {
|
|
|
1726
1728
|
const durationLeftTimestamp = endBlockFromNow * blockTime;
|
|
1727
1729
|
return Date.now() + durationLeftTimestamp;
|
|
1728
1730
|
}, [currentBlock, currentAllocationRound, blockTime]);
|
|
1729
|
-
const estimatedStartTime =
|
|
1731
|
+
const estimatedStartTime = React8.useMemo(() => {
|
|
1730
1732
|
if (!currentAllocationRound) return null;
|
|
1731
1733
|
const startBlock = Number(currentAllocationRound.voteStart);
|
|
1732
1734
|
if (!startBlock || !currentBlock) return null;
|
|
@@ -1783,7 +1785,7 @@ function getOrCreateQueryClient() {
|
|
|
1783
1785
|
}
|
|
1784
1786
|
var EnsureQueryClient = ({ children }) => {
|
|
1785
1787
|
try {
|
|
1786
|
-
const existingQueryClient =
|
|
1788
|
+
const existingQueryClient = React8__default.default.useContext(reactQuery.QueryClientContext);
|
|
1787
1789
|
if (existingQueryClient) {
|
|
1788
1790
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
1789
1791
|
}
|
|
@@ -2165,7 +2167,7 @@ var useIsWhitelisted = (address) => {
|
|
|
2165
2167
|
var useUserStatus = (address) => {
|
|
2166
2168
|
const { data: isBlacklisted } = useIsBlacklisted(address);
|
|
2167
2169
|
const { data: isWhitelisted } = useIsWhitelisted(address);
|
|
2168
|
-
const userStatus =
|
|
2170
|
+
const userStatus = React8.useMemo(() => {
|
|
2169
2171
|
if (!isBlacklisted && !isWhitelisted) {
|
|
2170
2172
|
return "NONE" /* NONE */;
|
|
2171
2173
|
}
|
|
@@ -2439,7 +2441,7 @@ var useAccountLinking = (user) => {
|
|
|
2439
2441
|
const isPassport = !isEntity && userLinkedEntities?.length > 0;
|
|
2440
2442
|
const { data: entityPassport, isLoading: isEntityPassportLoading } = useGetPassportForEntity(!!isEntity ? user : void 0);
|
|
2441
2443
|
const isLinked = !!isPassport || !!isEntity;
|
|
2442
|
-
const passport =
|
|
2444
|
+
const passport = React8.useMemo(() => {
|
|
2443
2445
|
if (isEntity) return entityPassport ?? void 0;
|
|
2444
2446
|
if (isPassport) return user;
|
|
2445
2447
|
return void 0;
|
|
@@ -2576,7 +2578,7 @@ var useVotingRewards = (currentRoundId, voter) => {
|
|
|
2576
2578
|
const queryClient = reactQuery.useQueryClient();
|
|
2577
2579
|
const { network } = useVeChainKitConfig();
|
|
2578
2580
|
const contractAddress = chunkEO3CLT4E_cjs.getConfig(network.type).voterRewardsContractAddress;
|
|
2579
|
-
const rounds =
|
|
2581
|
+
const rounds = React8.useMemo(() => {
|
|
2580
2582
|
return Array.from(
|
|
2581
2583
|
{ length: parseInt(currentRoundId ?? "0") - 1 },
|
|
2582
2584
|
(_, i) => (i + 1).toString()
|
|
@@ -2846,7 +2848,7 @@ var useClaimVeWorldSubdomain = ({
|
|
|
2846
2848
|
const queryClient = reactQuery.useQueryClient();
|
|
2847
2849
|
const { account } = useWallet();
|
|
2848
2850
|
const { network } = useVeChainKitConfig();
|
|
2849
|
-
const buildClauses =
|
|
2851
|
+
const buildClauses = React8.useCallback(async () => {
|
|
2850
2852
|
if (!subdomain) throw new Error("Invalid subdomain");
|
|
2851
2853
|
const clausesArray = [];
|
|
2852
2854
|
clausesArray.push({
|
|
@@ -2887,7 +2889,7 @@ var useClaimVeWorldSubdomain = ({
|
|
|
2887
2889
|
});
|
|
2888
2890
|
return clausesArray;
|
|
2889
2891
|
}, [subdomain, domain, account?.address, alreadyOwned]);
|
|
2890
|
-
const handleOnSuccess =
|
|
2892
|
+
const handleOnSuccess = React8.useCallback(async () => {
|
|
2891
2893
|
queryClient.cancelQueries({
|
|
2892
2894
|
queryKey: getVechainDomainQueryKey(account?.address ?? ""),
|
|
2893
2895
|
refetchType: "none"
|
|
@@ -3141,7 +3143,7 @@ var useSendTransaction = ({
|
|
|
3141
3143
|
}
|
|
3142
3144
|
return parsedClauses;
|
|
3143
3145
|
}
|
|
3144
|
-
const sendTransaction =
|
|
3146
|
+
const sendTransaction = React8.useCallback(
|
|
3145
3147
|
async (clauses2, options) => {
|
|
3146
3148
|
if (connection.isConnectedWithSocialLogin || connection.isConnectedWithCrossApp) {
|
|
3147
3149
|
return await privyWalletProvider.sendTransaction({
|
|
@@ -3185,13 +3187,13 @@ var useSendTransaction = ({
|
|
|
3185
3187
|
privyUIOptions
|
|
3186
3188
|
]
|
|
3187
3189
|
);
|
|
3188
|
-
const [sendTransactionTx, setSendTransactionTx] =
|
|
3190
|
+
const [sendTransactionTx, setSendTransactionTx] = React8.useState(
|
|
3189
3191
|
null
|
|
3190
3192
|
);
|
|
3191
|
-
const [sendTransactionPending, setSendTransactionPending] =
|
|
3192
|
-
const [sendTransactionError, setSendTransactionError] =
|
|
3193
|
-
const [progress, setProgress] =
|
|
3194
|
-
const sendTransactionAdapter =
|
|
3193
|
+
const [sendTransactionPending, setSendTransactionPending] = React8.useState(false);
|
|
3194
|
+
const [sendTransactionError, setSendTransactionError] = React8.useState(null);
|
|
3195
|
+
const [progress, setProgress] = React8.useState();
|
|
3196
|
+
const sendTransactionAdapter = React8.useCallback(
|
|
3195
3197
|
async (_clauses) => {
|
|
3196
3198
|
if (!_clauses && !clauses) throw new Error("clauses are required");
|
|
3197
3199
|
try {
|
|
@@ -3228,7 +3230,7 @@ var useSendTransaction = ({
|
|
|
3228
3230
|
isLoading: isTxReceiptLoading,
|
|
3229
3231
|
error: txReceiptError
|
|
3230
3232
|
} = useTxReceipt(sendTransactionTx ?? "");
|
|
3231
|
-
const explainTxRevertReason =
|
|
3233
|
+
const explainTxRevertReason = React8.useCallback(
|
|
3232
3234
|
async (txReceipt2) => {
|
|
3233
3235
|
if (!txReceipt2.reverted) return;
|
|
3234
3236
|
const transactionData = await thor.transaction(txReceipt2.meta.txID).get();
|
|
@@ -3237,8 +3239,8 @@ var useSendTransaction = ({
|
|
|
3237
3239
|
},
|
|
3238
3240
|
[thor]
|
|
3239
3241
|
);
|
|
3240
|
-
const [error, setError] =
|
|
3241
|
-
const status =
|
|
3242
|
+
const [error, setError] = React8.useState();
|
|
3243
|
+
const status = React8.useMemo(() => {
|
|
3242
3244
|
if (sendTransactionPending) return "pending";
|
|
3243
3245
|
if (sendTransactionError) {
|
|
3244
3246
|
return "error";
|
|
@@ -3264,7 +3266,7 @@ var useSendTransaction = ({
|
|
|
3264
3266
|
txReceipt,
|
|
3265
3267
|
txReceiptError
|
|
3266
3268
|
]);
|
|
3267
|
-
|
|
3269
|
+
React8.useEffect(() => {
|
|
3268
3270
|
if (status === "success" || status === "error") {
|
|
3269
3271
|
if (sendTransactionError && !error) {
|
|
3270
3272
|
setError({
|
|
@@ -3294,13 +3296,13 @@ var useSendTransaction = ({
|
|
|
3294
3296
|
explainTxRevertReason,
|
|
3295
3297
|
sendTransactionError
|
|
3296
3298
|
]);
|
|
3297
|
-
const resetStatus =
|
|
3299
|
+
const resetStatus = React8.useCallback(() => {
|
|
3298
3300
|
setSendTransactionTx(null);
|
|
3299
3301
|
setSendTransactionPending(false);
|
|
3300
3302
|
setSendTransactionError(null);
|
|
3301
3303
|
setError(void 0);
|
|
3302
3304
|
}, []);
|
|
3303
|
-
const isTransactionPending =
|
|
3305
|
+
const isTransactionPending = React8.useMemo(() => {
|
|
3304
3306
|
return sendTransactionPending || isTxReceiptLoading || status === "pending" || status === "waitingConfirmation";
|
|
3305
3307
|
}, [sendTransactionPending, isTxReceiptLoading, status]);
|
|
3306
3308
|
return {
|
|
@@ -3329,7 +3331,7 @@ var useUpdateAvatarRecord = ({
|
|
|
3329
3331
|
onTxConfirmed: onSuccess,
|
|
3330
3332
|
onTxFailedOrCancelled: onError
|
|
3331
3333
|
});
|
|
3332
|
-
const updateAvatar =
|
|
3334
|
+
const updateAvatar = React8.useCallback(
|
|
3333
3335
|
async (domain, ipfsUri) => {
|
|
3334
3336
|
if (!domain) throw new Error("Domain is required");
|
|
3335
3337
|
const node = ethers.namehash(domain);
|
|
@@ -3489,7 +3491,7 @@ var PrivyCrossAppProvider = ({
|
|
|
3489
3491
|
privyEcosystemAppIDS,
|
|
3490
3492
|
children
|
|
3491
3493
|
}) => {
|
|
3492
|
-
const wagmiConfigRef =
|
|
3494
|
+
const wagmiConfigRef = React8.useRef(
|
|
3493
3495
|
wagmi.createConfig({
|
|
3494
3496
|
chains: [vechain],
|
|
3495
3497
|
ssr: true,
|
|
@@ -3515,9 +3517,9 @@ var usePrivyCrossAppSdk = () => {
|
|
|
3515
3517
|
const { signMessageAsync } = wagmi.useSignMessage();
|
|
3516
3518
|
const { disconnectAsync } = wagmi.useDisconnect();
|
|
3517
3519
|
const { isConnected } = wagmi.useAccount();
|
|
3518
|
-
const [isConnecting, setIsConnecting] =
|
|
3519
|
-
const [connectionError, setConnectionError] =
|
|
3520
|
-
const logout =
|
|
3520
|
+
const [isConnecting, setIsConnecting] = React8.useState(false);
|
|
3521
|
+
const [connectionError, setConnectionError] = React8.useState(null);
|
|
3522
|
+
const logout = React8.useCallback(async () => {
|
|
3521
3523
|
try {
|
|
3522
3524
|
if (isConnected) {
|
|
3523
3525
|
await disconnectAsync();
|
|
@@ -3528,7 +3530,7 @@ var usePrivyCrossAppSdk = () => {
|
|
|
3528
3530
|
throw error;
|
|
3529
3531
|
}
|
|
3530
3532
|
}, [disconnectAsync, isConnected]);
|
|
3531
|
-
const login =
|
|
3533
|
+
const login = React8.useCallback(
|
|
3532
3534
|
async (appID) => {
|
|
3533
3535
|
try {
|
|
3534
3536
|
setIsConnecting(true);
|
|
@@ -3550,7 +3552,7 @@ var usePrivyCrossAppSdk = () => {
|
|
|
3550
3552
|
},
|
|
3551
3553
|
[connectAsync, connectors]
|
|
3552
3554
|
);
|
|
3553
|
-
const signMessage =
|
|
3555
|
+
const signMessage = React8.useCallback(
|
|
3554
3556
|
async (message) => {
|
|
3555
3557
|
try {
|
|
3556
3558
|
return await signMessageAsync({ message });
|
|
@@ -3565,7 +3567,7 @@ var usePrivyCrossAppSdk = () => {
|
|
|
3565
3567
|
},
|
|
3566
3568
|
[signMessageAsync]
|
|
3567
3569
|
);
|
|
3568
|
-
const signTypedData =
|
|
3570
|
+
const signTypedData = React8.useCallback(
|
|
3569
3571
|
async (data) => {
|
|
3570
3572
|
try {
|
|
3571
3573
|
return await signTypedDataAsync(data);
|
|
@@ -3592,12 +3594,15 @@ var usePrivyCrossAppSdk = () => {
|
|
|
3592
3594
|
|
|
3593
3595
|
// src/hooks/api/wallet/useWalletMetadata.ts
|
|
3594
3596
|
var useWalletMetadata = (address, networkType) => {
|
|
3595
|
-
const { data: domain } = useVechainDomain(address ?? "");
|
|
3596
|
-
const { data: avatar } = useGetAvatar(
|
|
3597
|
+
const { data: domain, isLoading: isLoadingVechainDomain } = useVechainDomain(address ?? "");
|
|
3598
|
+
const { data: avatar, isLoading: isLoadingAvatar } = useGetAvatar(
|
|
3599
|
+
domain?.domain
|
|
3600
|
+
);
|
|
3597
3601
|
const avatarUrl = chunkEO3CLT4E_cjs.convertUriToUrl(avatar ?? "", networkType);
|
|
3598
3602
|
return {
|
|
3599
3603
|
domain: domain?.domain,
|
|
3600
|
-
image: avatarUrl ?? chunkEO3CLT4E_cjs.getPicassoImage(address ?? "")
|
|
3604
|
+
image: avatarUrl ?? chunkEO3CLT4E_cjs.getPicassoImage(address ?? ""),
|
|
3605
|
+
isLoading: isLoadingVechainDomain || isLoadingAvatar
|
|
3601
3606
|
};
|
|
3602
3607
|
};
|
|
3603
3608
|
|
|
@@ -3623,7 +3628,7 @@ var useWallet = () => {
|
|
|
3623
3628
|
const isConnectedWithPrivy = isConnectedWithSocialLogin || isConnectedWithCrossApp;
|
|
3624
3629
|
const isConnectedWithVeChain = isConnectedWithSocialLogin && privy?.appId === chunkEO3CLT4E_cjs.VECHAIN_PRIVY_APP_ID || isConnectedWithCrossApp && connectionCache?.ecosystemApp?.appId === chunkEO3CLT4E_cjs.VECHAIN_PRIVY_APP_ID;
|
|
3625
3630
|
const isLoading = isConnectingWithCrossApp || isReconnectingWithCrossApp || isLoadingLoginOAuth || !ready;
|
|
3626
|
-
const [isConnected, setIsConnected] =
|
|
3631
|
+
const [isConnected, setIsConnected] = React8.useState(false);
|
|
3627
3632
|
const connectionSource = isConnectedWithCrossApp ? {
|
|
3628
3633
|
type: "privy-cross-app",
|
|
3629
3634
|
displayName: "Ecosystem"
|
|
@@ -3634,7 +3639,7 @@ var useWallet = () => {
|
|
|
3634
3639
|
type: "privy",
|
|
3635
3640
|
displayName: "Social Login"
|
|
3636
3641
|
};
|
|
3637
|
-
|
|
3642
|
+
React8.useEffect(() => {
|
|
3638
3643
|
const isNowConnected = isConnectedWithDappKit || isConnectedWithSocialLogin || isConnectedWithCrossApp;
|
|
3639
3644
|
if (isConnected !== isNowConnected) {
|
|
3640
3645
|
setIsConnected(isNowConnected);
|
|
@@ -3666,18 +3671,20 @@ var useWallet = () => {
|
|
|
3666
3671
|
const account = activeAddress ? {
|
|
3667
3672
|
address: activeAddress,
|
|
3668
3673
|
domain: activeMetadata.domain,
|
|
3669
|
-
image: activeMetadata.image
|
|
3674
|
+
image: activeMetadata.image,
|
|
3675
|
+
isLoadingAvatar: activeMetadata.isLoading
|
|
3670
3676
|
} : null;
|
|
3671
3677
|
const connectedWallet = connectedWalletAddress ? {
|
|
3672
3678
|
address: connectedWalletAddress,
|
|
3673
3679
|
domain: connectedMetadata.domain,
|
|
3674
|
-
image: connectedMetadata.image
|
|
3680
|
+
image: connectedMetadata.image,
|
|
3681
|
+
isLoadingAvatar: connectedMetadata.isLoading
|
|
3675
3682
|
} : null;
|
|
3676
3683
|
const { data: smartAccountVersion } = useContractVersion(
|
|
3677
3684
|
smartAccount?.address ?? ""
|
|
3678
3685
|
);
|
|
3679
3686
|
const hasActiveSmartAccount = !!smartAccount?.address && !!account?.address && chunkEO3CLT4E_cjs.compareAddresses(smartAccount?.address, account?.address);
|
|
3680
|
-
const disconnect =
|
|
3687
|
+
const disconnect = React8.useCallback(async () => {
|
|
3681
3688
|
try {
|
|
3682
3689
|
setIsConnected(false);
|
|
3683
3690
|
if (isConnectedWithDappKit) {
|
|
@@ -3709,7 +3716,8 @@ var useWallet = () => {
|
|
|
3709
3716
|
image: smartAccountMetadata.image,
|
|
3710
3717
|
isDeployed: smartAccount?.isDeployed ?? false,
|
|
3711
3718
|
isActive: hasActiveSmartAccount,
|
|
3712
|
-
version: smartAccountVersion ?? null
|
|
3719
|
+
version: smartAccountVersion ?? null,
|
|
3720
|
+
isLoadingAvatar: smartAccountMetadata.isLoading
|
|
3713
3721
|
},
|
|
3714
3722
|
connectedWallet,
|
|
3715
3723
|
privyUser: user,
|
|
@@ -4022,7 +4030,7 @@ var useSendTokenModal = () => {
|
|
|
4022
4030
|
var SendTokenModalProvider = ({
|
|
4023
4031
|
children
|
|
4024
4032
|
}) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
4025
|
-
var
|
|
4033
|
+
var useAccessAndSecurityModal = () => {
|
|
4026
4034
|
const {
|
|
4027
4035
|
openAccountModal,
|
|
4028
4036
|
closeAccountModal,
|
|
@@ -4030,7 +4038,7 @@ var useEmbeddedWalletSettingsModal = () => {
|
|
|
4030
4038
|
setAccountModalContent
|
|
4031
4039
|
} = useVeChainKitConfig();
|
|
4032
4040
|
const open = () => {
|
|
4033
|
-
setAccountModalContent("
|
|
4041
|
+
setAccountModalContent("access-and-security");
|
|
4034
4042
|
openAccountModal();
|
|
4035
4043
|
};
|
|
4036
4044
|
const close = () => {
|
|
@@ -4042,7 +4050,7 @@ var useEmbeddedWalletSettingsModal = () => {
|
|
|
4042
4050
|
isOpen: isAccountModalOpen
|
|
4043
4051
|
};
|
|
4044
4052
|
};
|
|
4045
|
-
var
|
|
4053
|
+
var AccessAndSecurityModalProvider = ({
|
|
4046
4054
|
children
|
|
4047
4055
|
}) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
4048
4056
|
var useExploreEcosystemModal = () => {
|
|
@@ -4156,6 +4164,52 @@ var useReceiveModal = () => {
|
|
|
4156
4164
|
};
|
|
4157
4165
|
};
|
|
4158
4166
|
var ReceiveModalProvider = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
4167
|
+
var useLoginModalContent = () => {
|
|
4168
|
+
const { privy, loginMethods } = useVeChainKitConfig();
|
|
4169
|
+
const isVeChainApp = privy?.appId === chunkEO3CLT4E_cjs.VECHAIN_PRIVY_APP_ID;
|
|
4170
|
+
const showEcosystemLogin = React8.useMemo(() => {
|
|
4171
|
+
if (!loginMethods) return true;
|
|
4172
|
+
if (loginMethods.length > 0 && !loginMethods?.find((method35) => method35.method === "ecosystem")) {
|
|
4173
|
+
return false;
|
|
4174
|
+
}
|
|
4175
|
+
return true;
|
|
4176
|
+
}, [loginMethods]);
|
|
4177
|
+
if (!privy) {
|
|
4178
|
+
return {
|
|
4179
|
+
showSocialLogin: false,
|
|
4180
|
+
showPasskey: false,
|
|
4181
|
+
showVeChainLogin: true,
|
|
4182
|
+
showDappKit: true,
|
|
4183
|
+
showEcosystem: showEcosystemLogin,
|
|
4184
|
+
showMoreLogin: false,
|
|
4185
|
+
isOfficialVeChainApp: false
|
|
4186
|
+
};
|
|
4187
|
+
}
|
|
4188
|
+
if (isVeChainApp) {
|
|
4189
|
+
return {
|
|
4190
|
+
showSocialLogin: false,
|
|
4191
|
+
showPasskey: false,
|
|
4192
|
+
showVeChainLogin: true,
|
|
4193
|
+
showDappKit: true,
|
|
4194
|
+
showEcosystem: showEcosystemLogin,
|
|
4195
|
+
showMoreLogin: false,
|
|
4196
|
+
isOfficialVeChainApp: true
|
|
4197
|
+
};
|
|
4198
|
+
}
|
|
4199
|
+
const showMoreLogin = React8.useMemo(() => {
|
|
4200
|
+
if (!loginMethods) return true;
|
|
4201
|
+
return loginMethods.some((method35) => method35.method === "more");
|
|
4202
|
+
}, [loginMethods]);
|
|
4203
|
+
return {
|
|
4204
|
+
showSocialLogin: true,
|
|
4205
|
+
showPasskey: true,
|
|
4206
|
+
showVeChainLogin: true,
|
|
4207
|
+
showDappKit: true,
|
|
4208
|
+
showEcosystem: showEcosystemLogin,
|
|
4209
|
+
showMoreLogin,
|
|
4210
|
+
isOfficialVeChainApp: false
|
|
4211
|
+
};
|
|
4212
|
+
};
|
|
4159
4213
|
var ERC20Interface2 = chunkNKGOARGM_cjs.ERC20__factory.createInterface();
|
|
4160
4214
|
var useTransferERC20 = ({
|
|
4161
4215
|
fromAddress,
|
|
@@ -4167,7 +4221,7 @@ var useTransferERC20 = ({
|
|
|
4167
4221
|
}) => {
|
|
4168
4222
|
const queryClient = reactQuery.useQueryClient();
|
|
4169
4223
|
const { refresh } = useRefreshBalances();
|
|
4170
|
-
const buildClauses =
|
|
4224
|
+
const buildClauses = React8.useCallback(async () => {
|
|
4171
4225
|
if (!receiverAddress || !amount || !chunkEO3CLT4E_cjs.isValidAddress(receiverAddress))
|
|
4172
4226
|
throw new Error("Invalid receiver address or amount");
|
|
4173
4227
|
const clausesArray = [];
|
|
@@ -4183,7 +4237,7 @@ var useTransferERC20 = ({
|
|
|
4183
4237
|
});
|
|
4184
4238
|
return clausesArray;
|
|
4185
4239
|
}, [receiverAddress, amount]);
|
|
4186
|
-
const handleOnSuccess =
|
|
4240
|
+
const handleOnSuccess = React8.useCallback(async () => {
|
|
4187
4241
|
await refresh();
|
|
4188
4242
|
onSuccess?.();
|
|
4189
4243
|
}, [onSuccess, fromAddress, queryClient]);
|
|
@@ -4210,7 +4264,7 @@ var useTransferVET = ({
|
|
|
4210
4264
|
onSuccess
|
|
4211
4265
|
}) => {
|
|
4212
4266
|
const { refresh } = useRefreshBalances();
|
|
4213
|
-
const buildClauses =
|
|
4267
|
+
const buildClauses = React8.useCallback(async () => {
|
|
4214
4268
|
if (!receiverAddress || !amount || !chunkEO3CLT4E_cjs.isValidAddress(receiverAddress))
|
|
4215
4269
|
throw new Error("Invalid receiver address or amount");
|
|
4216
4270
|
if (isNaN(Number(amount))) {
|
|
@@ -4262,7 +4316,7 @@ var DEFAULT_NOTIFICATIONS = [
|
|
|
4262
4316
|
];
|
|
4263
4317
|
var useNotifications = () => {
|
|
4264
4318
|
const { account } = useWallet();
|
|
4265
|
-
const getStorageKeys =
|
|
4319
|
+
const getStorageKeys = React8.useCallback((address) => {
|
|
4266
4320
|
const normalizedAddress = address?.toLowerCase();
|
|
4267
4321
|
return {
|
|
4268
4322
|
notifications: `vechain_kit_notifications_${normalizedAddress}`,
|
|
@@ -4270,7 +4324,7 @@ var useNotifications = () => {
|
|
|
4270
4324
|
initialized: `vechain_kit_notifications_initialized_${normalizedAddress}`
|
|
4271
4325
|
};
|
|
4272
4326
|
}, []);
|
|
4273
|
-
const initializeNotifications =
|
|
4327
|
+
const initializeNotifications = React8.useCallback(() => {
|
|
4274
4328
|
if (!account?.address) return;
|
|
4275
4329
|
const keys = getStorageKeys(account.address);
|
|
4276
4330
|
const isInitialized = localStorage.getItem(keys.initialized);
|
|
@@ -4282,24 +4336,24 @@ var useNotifications = () => {
|
|
|
4282
4336
|
localStorage.setItem(keys.initialized, "true");
|
|
4283
4337
|
}
|
|
4284
4338
|
}, [account?.address, getStorageKeys]);
|
|
4285
|
-
|
|
4339
|
+
React8.useEffect(() => {
|
|
4286
4340
|
initializeNotifications();
|
|
4287
4341
|
}, [initializeNotifications]);
|
|
4288
|
-
const getNotifications =
|
|
4342
|
+
const getNotifications = React8.useCallback(() => {
|
|
4289
4343
|
if (!account?.address) return [];
|
|
4290
4344
|
const keys = getStorageKeys(account.address);
|
|
4291
4345
|
const cached = localStorage.getItem(keys.notifications);
|
|
4292
4346
|
if (!cached) return [];
|
|
4293
4347
|
return JSON.parse(cached);
|
|
4294
4348
|
}, [account?.address, getStorageKeys]);
|
|
4295
|
-
const getArchivedNotifications =
|
|
4349
|
+
const getArchivedNotifications = React8.useCallback(() => {
|
|
4296
4350
|
if (!account?.address) return [];
|
|
4297
4351
|
const keys = getStorageKeys(account.address);
|
|
4298
4352
|
const cached = localStorage.getItem(keys.archived);
|
|
4299
4353
|
if (!cached) return [];
|
|
4300
4354
|
return JSON.parse(cached);
|
|
4301
4355
|
}, [account?.address, getStorageKeys]);
|
|
4302
|
-
const addNotification =
|
|
4356
|
+
const addNotification = React8.useCallback(
|
|
4303
4357
|
(notification) => {
|
|
4304
4358
|
if (!account?.address) return;
|
|
4305
4359
|
const keys = getStorageKeys(account.address);
|
|
@@ -4325,7 +4379,7 @@ var useNotifications = () => {
|
|
|
4325
4379
|
},
|
|
4326
4380
|
[account?.address, getNotifications, getStorageKeys]
|
|
4327
4381
|
);
|
|
4328
|
-
const clearAllNotifications =
|
|
4382
|
+
const clearAllNotifications = React8.useCallback(() => {
|
|
4329
4383
|
if (!account?.address) return;
|
|
4330
4384
|
const keys = getStorageKeys(account.address);
|
|
4331
4385
|
const notifications = getNotifications();
|
|
@@ -4340,7 +4394,7 @@ var useNotifications = () => {
|
|
|
4340
4394
|
getArchivedNotifications,
|
|
4341
4395
|
getStorageKeys
|
|
4342
4396
|
]);
|
|
4343
|
-
const markAsRead =
|
|
4397
|
+
const markAsRead = React8.useCallback(
|
|
4344
4398
|
(notificationId) => {
|
|
4345
4399
|
if (!account?.address) return;
|
|
4346
4400
|
const keys = getStorageKeys(account.address);
|
|
@@ -4386,7 +4440,7 @@ var useNotificationAlerts = () => {
|
|
|
4386
4440
|
const { t } = reactI18next.useTranslation();
|
|
4387
4441
|
const { account, connection } = useWallet();
|
|
4388
4442
|
const { addNotification, getNotifications } = useNotifications();
|
|
4389
|
-
|
|
4443
|
+
React8.useEffect(() => {
|
|
4390
4444
|
if (!connection.isConnectedWithPrivy || !account?.address) return;
|
|
4391
4445
|
const notifications = getNotifications();
|
|
4392
4446
|
const hasSmartAccountNotification = notifications.some(
|
|
@@ -4403,7 +4457,7 @@ var useNotificationAlerts = () => {
|
|
|
4403
4457
|
});
|
|
4404
4458
|
}
|
|
4405
4459
|
}, [connection.isConnectedWithPrivy, account?.address]);
|
|
4406
|
-
|
|
4460
|
+
React8.useEffect(() => {
|
|
4407
4461
|
if (!connection.isConnectedWithPrivy || !account?.address) return;
|
|
4408
4462
|
const notifications = getNotifications();
|
|
4409
4463
|
const hasMulticlauseWarning = notifications.some(
|
|
@@ -4422,13 +4476,13 @@ var useNotificationAlerts = () => {
|
|
|
4422
4476
|
}, [connection.isConnectedWithPrivy, account?.address]);
|
|
4423
4477
|
};
|
|
4424
4478
|
var useSignMessage2 = () => {
|
|
4425
|
-
const [isSigningPending, setIsSigningPending] =
|
|
4426
|
-
const [signature, setSignature] =
|
|
4427
|
-
const [error, setError] =
|
|
4479
|
+
const [isSigningPending, setIsSigningPending] = React8.useState(false);
|
|
4480
|
+
const [signature, setSignature] = React8.useState(null);
|
|
4481
|
+
const [error, setError] = React8.useState(null);
|
|
4428
4482
|
const { connection } = useWallet();
|
|
4429
4483
|
const { vendor } = dappKitReact.useConnex();
|
|
4430
4484
|
const privyWalletProvider = usePrivyWalletProvider();
|
|
4431
|
-
const signMessage =
|
|
4485
|
+
const signMessage = React8.useCallback(
|
|
4432
4486
|
async (message) => {
|
|
4433
4487
|
setIsSigningPending(true);
|
|
4434
4488
|
setError(null);
|
|
@@ -4458,7 +4512,7 @@ var useSignMessage2 = () => {
|
|
|
4458
4512
|
},
|
|
4459
4513
|
[connection, privyWalletProvider]
|
|
4460
4514
|
);
|
|
4461
|
-
const reset =
|
|
4515
|
+
const reset = React8.useCallback(() => {
|
|
4462
4516
|
setIsSigningPending(false);
|
|
4463
4517
|
setSignature(null);
|
|
4464
4518
|
setError(null);
|
|
@@ -4472,13 +4526,13 @@ var useSignMessage2 = () => {
|
|
|
4472
4526
|
};
|
|
4473
4527
|
};
|
|
4474
4528
|
var useSignTypedData2 = () => {
|
|
4475
|
-
const [isSigningPending, setIsSigningPending] =
|
|
4476
|
-
const [signature, setSignature] =
|
|
4477
|
-
const [error, setError] =
|
|
4529
|
+
const [isSigningPending, setIsSigningPending] = React8.useState(false);
|
|
4530
|
+
const [signature, setSignature] = React8.useState(null);
|
|
4531
|
+
const [error, setError] = React8.useState(null);
|
|
4478
4532
|
const { connection } = useWallet();
|
|
4479
4533
|
const privyWalletProvider = usePrivyWalletProvider();
|
|
4480
4534
|
const { signTypedData: signTypedDataDappKit } = dappKitReact.useWallet();
|
|
4481
|
-
const signTypedData =
|
|
4535
|
+
const signTypedData = React8.useCallback(
|
|
4482
4536
|
async (data) => {
|
|
4483
4537
|
setIsSigningPending(true);
|
|
4484
4538
|
setError(null);
|
|
@@ -4510,7 +4564,7 @@ var useSignTypedData2 = () => {
|
|
|
4510
4564
|
},
|
|
4511
4565
|
[connection, privyWalletProvider]
|
|
4512
4566
|
);
|
|
4513
|
-
const reset =
|
|
4567
|
+
const reset = React8.useCallback(() => {
|
|
4514
4568
|
setIsSigningPending(false);
|
|
4515
4569
|
setSignature(null);
|
|
4516
4570
|
setError(null);
|
|
@@ -4549,7 +4603,7 @@ var useLoginWithOAuth2 = () => {
|
|
|
4549
4603
|
};
|
|
4550
4604
|
var useCrossAppConnectionCache = () => {
|
|
4551
4605
|
const CACHE_KEY = "vechain_kit_cross_app_connection";
|
|
4552
|
-
const setConnectionCache =
|
|
4606
|
+
const setConnectionCache = React8.useCallback(
|
|
4553
4607
|
(ecosystemApp) => {
|
|
4554
4608
|
const cacheData = {
|
|
4555
4609
|
timestamp: Date.now(),
|
|
@@ -4559,12 +4613,12 @@ var useCrossAppConnectionCache = () => {
|
|
|
4559
4613
|
},
|
|
4560
4614
|
[]
|
|
4561
4615
|
);
|
|
4562
|
-
const getConnectionCache =
|
|
4616
|
+
const getConnectionCache = React8.useCallback(() => {
|
|
4563
4617
|
const cached = localStorage.getItem(CACHE_KEY);
|
|
4564
4618
|
if (!cached) return null;
|
|
4565
4619
|
return JSON.parse(cached);
|
|
4566
4620
|
}, []);
|
|
4567
|
-
const clearConnectionCache =
|
|
4621
|
+
const clearConnectionCache = React8.useCallback(() => {
|
|
4568
4622
|
localStorage.removeItem(CACHE_KEY);
|
|
4569
4623
|
}, []);
|
|
4570
4624
|
return {
|
|
@@ -4599,7 +4653,7 @@ var useLoginWithVeChain = () => {
|
|
|
4599
4653
|
return { login };
|
|
4600
4654
|
};
|
|
4601
4655
|
var useScrollToTop = () => {
|
|
4602
|
-
|
|
4656
|
+
React8.useEffect(() => {
|
|
4603
4657
|
const modalContent = document.querySelector(".chakra-modal__content");
|
|
4604
4658
|
if (modalContent) {
|
|
4605
4659
|
modalContent.scrollTop = 0;
|
|
@@ -4607,8 +4661,8 @@ var useScrollToTop = () => {
|
|
|
4607
4661
|
}, []);
|
|
4608
4662
|
};
|
|
4609
4663
|
var useIsPWA = () => {
|
|
4610
|
-
const [isPWA, setIsPWA] =
|
|
4611
|
-
|
|
4664
|
+
const [isPWA, setIsPWA] = React8.useState(true);
|
|
4665
|
+
React8.useEffect(() => {
|
|
4612
4666
|
const checkIsPWA = () => {
|
|
4613
4667
|
const isStandalone = window.matchMedia("(display-mode: standalone)").matches || window.standalone || document.referrer.includes("android-app://");
|
|
4614
4668
|
setIsPWA(isStandalone);
|
|
@@ -4622,9 +4676,9 @@ var useIsPWA = () => {
|
|
|
4622
4676
|
return isPWA;
|
|
4623
4677
|
};
|
|
4624
4678
|
var useFeatureAnnouncement = () => {
|
|
4625
|
-
const [isVisible, setIsVisible] =
|
|
4679
|
+
const [isVisible, setIsVisible] = React8.useState(true);
|
|
4626
4680
|
const CACHE_KEY = "vechain_kit_feature_announcement_closed";
|
|
4627
|
-
|
|
4681
|
+
React8.useEffect(() => {
|
|
4628
4682
|
const isClosed = localStorage.getItem(CACHE_KEY);
|
|
4629
4683
|
if (isClosed) {
|
|
4630
4684
|
setIsVisible(false);
|
|
@@ -4649,7 +4703,7 @@ var useCall = ({
|
|
|
4649
4703
|
mapResponse
|
|
4650
4704
|
}) => {
|
|
4651
4705
|
const { thor } = dappKitReact.useConnex();
|
|
4652
|
-
const queryFn =
|
|
4706
|
+
const queryFn = React8.useCallback(async () => {
|
|
4653
4707
|
try {
|
|
4654
4708
|
const functionFragment2 = contractInterface21?.getFunction(method35)?.format("json");
|
|
4655
4709
|
if (!functionFragment2)
|
|
@@ -4669,11 +4723,11 @@ var useCall = ({
|
|
|
4669
4723
|
throw error;
|
|
4670
4724
|
}
|
|
4671
4725
|
}, [args, contractAddress, contractInterface21, mapResponse, method35, thor]);
|
|
4672
|
-
const queryKey =
|
|
4726
|
+
const queryKey = React8.useMemo(
|
|
4673
4727
|
() => getCallKey({ method: method35, keyArgs: keyArgs || args }),
|
|
4674
4728
|
[method35, keyArgs, args]
|
|
4675
4729
|
);
|
|
4676
|
-
const enableQuery =
|
|
4730
|
+
const enableQuery = React8.useMemo(() => enabled, [enabled]);
|
|
4677
4731
|
return reactQuery.useQuery({
|
|
4678
4732
|
queryFn,
|
|
4679
4733
|
queryKey,
|
|
@@ -4684,7 +4738,7 @@ var getCallKey = ({ method: method35, keyArgs = [] }) => {
|
|
|
4684
4738
|
return ["VECHAIN_KIT_", method35, ...keyArgs];
|
|
4685
4739
|
};
|
|
4686
4740
|
var useLocalStorage = (key, initialValue) => {
|
|
4687
|
-
const [storedValue, setStoredValue] =
|
|
4741
|
+
const [storedValue, setStoredValue] = React8.useState(() => {
|
|
4688
4742
|
try {
|
|
4689
4743
|
const item = window.localStorage.getItem(key);
|
|
4690
4744
|
return item ? JSON.parse(item) : initialValue;
|
|
@@ -4693,7 +4747,7 @@ var useLocalStorage = (key, initialValue) => {
|
|
|
4693
4747
|
return initialValue;
|
|
4694
4748
|
}
|
|
4695
4749
|
});
|
|
4696
|
-
|
|
4750
|
+
React8.useEffect(() => {
|
|
4697
4751
|
window.localStorage.setItem(key, JSON.stringify(storedValue));
|
|
4698
4752
|
}, [key, storedValue]);
|
|
4699
4753
|
return [storedValue, setStoredValue];
|
|
@@ -4723,7 +4777,7 @@ var useEcosystemShortcuts = () => {
|
|
|
4723
4777
|
isShortcut
|
|
4724
4778
|
};
|
|
4725
4779
|
};
|
|
4726
|
-
var PrivyWalletProviderContext =
|
|
4780
|
+
var PrivyWalletProviderContext = React8.createContext(null);
|
|
4727
4781
|
var PrivyWalletProvider = ({
|
|
4728
4782
|
children,
|
|
4729
4783
|
nodeUrl,
|
|
@@ -5070,7 +5124,7 @@ var PrivyWalletProvider = ({
|
|
|
5070
5124
|
);
|
|
5071
5125
|
};
|
|
5072
5126
|
var usePrivyWalletProvider = () => {
|
|
5073
|
-
const context =
|
|
5127
|
+
const context = React8.useContext(PrivyWalletProviderContext);
|
|
5074
5128
|
if (!context) {
|
|
5075
5129
|
throw new Error(
|
|
5076
5130
|
"usePrivyWalletProvider must be used within a PrivyWalletProvider"
|
|
@@ -5090,7 +5144,7 @@ var FadeInView = ({ children }) => {
|
|
|
5090
5144
|
);
|
|
5091
5145
|
};
|
|
5092
5146
|
var FadeInViewFromBottom = ({ children }) => {
|
|
5093
|
-
|
|
5147
|
+
React8.useEffect(() => {
|
|
5094
5148
|
const modalContent = document.querySelector(".chakra-modal__content");
|
|
5095
5149
|
if (modalContent) {
|
|
5096
5150
|
modalContent.scrollTop = 0;
|
|
@@ -5148,9 +5202,14 @@ var ModalBackButton = ({ onClick, ...props }) => {
|
|
|
5148
5202
|
}
|
|
5149
5203
|
);
|
|
5150
5204
|
};
|
|
5151
|
-
var AddressDisplay = ({
|
|
5152
|
-
|
|
5153
|
-
|
|
5205
|
+
var AddressDisplay = ({
|
|
5206
|
+
wallet,
|
|
5207
|
+
label,
|
|
5208
|
+
size = "lg",
|
|
5209
|
+
style
|
|
5210
|
+
}) => {
|
|
5211
|
+
const [copied, setCopied] = React8.useState(false);
|
|
5212
|
+
const [copiedDomain, setCopiedDomain] = React8.useState(false);
|
|
5154
5213
|
const copyToClipboard = async (textToCopy, setCopied2) => {
|
|
5155
5214
|
await navigator.clipboard.writeText(textToCopy);
|
|
5156
5215
|
setCopied2(true);
|
|
@@ -5158,7 +5217,7 @@ var AddressDisplay = ({ wallet, label, size = "lg" }) => {
|
|
|
5158
5217
|
setCopied2(false);
|
|
5159
5218
|
}, 2e3);
|
|
5160
5219
|
};
|
|
5161
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { children: [
|
|
5220
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", justifyContent: "center", ...style, children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { children: [
|
|
5162
5221
|
label && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.7, children: label }),
|
|
5163
5222
|
wallet?.domain ? /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { children: [
|
|
5164
5223
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5234,7 +5293,7 @@ var AddressDisplay = ({ wallet, label, size = "lg" }) => {
|
|
|
5234
5293
|
// package.json
|
|
5235
5294
|
var package_default = {
|
|
5236
5295
|
name: "@vechain/vechain-kit",
|
|
5237
|
-
version: "1.
|
|
5296
|
+
version: "1.4.1",
|
|
5238
5297
|
private: false,
|
|
5239
5298
|
homepage: "https://github.com/vechain/vechain-kit",
|
|
5240
5299
|
repository: "github:vechain/vechain-kit",
|
|
@@ -5260,8 +5319,8 @@ var package_default = {
|
|
|
5260
5319
|
dependencies: {
|
|
5261
5320
|
"@chakra-ui/react": "^2.8.2",
|
|
5262
5321
|
"@choc-ui/chakra-autocomplete": "^5.3.0",
|
|
5263
|
-
"@privy-io/cross-app-connect": "^0.1.
|
|
5264
|
-
"@privy-io/react-auth": "2.0
|
|
5322
|
+
"@privy-io/cross-app-connect": "^0.1.6",
|
|
5323
|
+
"@privy-io/react-auth": "2.3.0",
|
|
5265
5324
|
"@rainbow-me/rainbowkit": "^2.1.5",
|
|
5266
5325
|
"@tanstack/react-query": "^5.64.2",
|
|
5267
5326
|
"@tanstack/react-query-devtools": "^5.64.1",
|
|
@@ -5381,10 +5440,10 @@ var VersionFooter = ({ ...props }) => {
|
|
|
5381
5440
|
);
|
|
5382
5441
|
};
|
|
5383
5442
|
var StickyHeaderContainer = ({ children }) => {
|
|
5384
|
-
const [hasContentBelow, setHasContentBelow] =
|
|
5385
|
-
const observerRef =
|
|
5443
|
+
const [hasContentBelow, setHasContentBelow] = React8.useState(false);
|
|
5444
|
+
const observerRef = React8.useRef(null);
|
|
5386
5445
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
5387
|
-
|
|
5446
|
+
React8.useEffect(() => {
|
|
5388
5447
|
const observer = new IntersectionObserver(
|
|
5389
5448
|
([entry]) => {
|
|
5390
5449
|
setHasContentBelow(!entry.isIntersecting);
|
|
@@ -5596,7 +5655,8 @@ var AddressDisplayCard = ({
|
|
|
5596
5655
|
src: imageSrc,
|
|
5597
5656
|
alt: imageAlt,
|
|
5598
5657
|
boxSize: "40px",
|
|
5599
|
-
borderRadius: "xl"
|
|
5658
|
+
borderRadius: "xl",
|
|
5659
|
+
objectFit: "cover"
|
|
5600
5660
|
}
|
|
5601
5661
|
),
|
|
5602
5662
|
/* @__PURE__ */ jsxRuntime.jsx(react.VStack, { align: "start", spacing: 0, children: domain ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -5646,10 +5706,26 @@ var ScrollToTopWrapper = ({ children, ...props }) => {
|
|
|
5646
5706
|
useScrollToTop();
|
|
5647
5707
|
return /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { ...props, children });
|
|
5648
5708
|
};
|
|
5709
|
+
var AccountAvatar = ({ wallet, props }) => {
|
|
5710
|
+
if (wallet?.isLoadingAvatar) {
|
|
5711
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, { size: "sm" });
|
|
5712
|
+
}
|
|
5713
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5714
|
+
react.Image,
|
|
5715
|
+
{
|
|
5716
|
+
src: props?.src ?? wallet?.image,
|
|
5717
|
+
alt: props?.alt ?? wallet?.domain,
|
|
5718
|
+
fallbackSrc: chunkEO3CLT4E_cjs.notFoundImage,
|
|
5719
|
+
objectFit: "cover",
|
|
5720
|
+
rounded: "full",
|
|
5721
|
+
...props
|
|
5722
|
+
}
|
|
5723
|
+
);
|
|
5724
|
+
};
|
|
5649
5725
|
var VeChainLoginButton = ({ isDark, gridColumn }) => {
|
|
5650
5726
|
const { t } = reactI18next.useTranslation();
|
|
5651
5727
|
const { login: loginWithVeChain } = useLoginWithVeChain();
|
|
5652
|
-
const [loginError, setLoginError] =
|
|
5728
|
+
const [loginError, setLoginError] = React8.useState();
|
|
5653
5729
|
const loginLoadingModal = react.useDisclosure();
|
|
5654
5730
|
const handleLoginWithVeChain = async () => {
|
|
5655
5731
|
loginLoadingModal.onOpen();
|
|
@@ -5691,12 +5767,19 @@ var VeChainLoginButton = ({ isDark, gridColumn }) => {
|
|
|
5691
5767
|
)
|
|
5692
5768
|
] });
|
|
5693
5769
|
};
|
|
5694
|
-
var SocialLoginButtons = ({
|
|
5770
|
+
var SocialLoginButtons = ({
|
|
5771
|
+
isDark,
|
|
5772
|
+
loginMethods,
|
|
5773
|
+
gridColumn
|
|
5774
|
+
}) => {
|
|
5695
5775
|
const { t } = reactI18next.useTranslation();
|
|
5696
5776
|
const { initOAuth } = useLoginWithOAuth2();
|
|
5697
|
-
|
|
5698
|
-
method35 === "email"
|
|
5699
|
-
|
|
5777
|
+
const selfHostedPrivyLoginMethods = loginMethods?.filter(
|
|
5778
|
+
(method35) => method35.method === "email" || method35.method === "google"
|
|
5779
|
+
);
|
|
5780
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan: gridColumn, w: "full", children: selfHostedPrivyLoginMethods?.map((loginMethod, index) => /* @__PURE__ */ jsxRuntime.jsxs(React8__default.default.Fragment, { children: [
|
|
5781
|
+
loginMethod.method === "email" && /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan: 4, w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(EmailLoginButton, {}) }),
|
|
5782
|
+
loginMethod.method === "google" && /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan: 4, w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5700
5783
|
ConnectionButton,
|
|
5701
5784
|
{
|
|
5702
5785
|
isDark,
|
|
@@ -5707,17 +5790,17 @@ var SocialLoginButtons = ({ isDark, loginModalUI }) => {
|
|
|
5707
5790
|
text: t("Continue with Google")
|
|
5708
5791
|
}
|
|
5709
5792
|
) }),
|
|
5710
|
-
index !== (
|
|
5793
|
+
index !== (selfHostedPrivyLoginMethods?.length ?? 0) - 1 && /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan: 4, w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { children: [
|
|
5711
5794
|
/* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
|
|
5712
5795
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", children: "or" }),
|
|
5713
5796
|
/* @__PURE__ */ jsxRuntime.jsx(react.Divider, {})
|
|
5714
5797
|
] }) })
|
|
5715
|
-
] },
|
|
5798
|
+
] }, loginMethod.method)) });
|
|
5716
5799
|
};
|
|
5717
|
-
var PasskeyLoginButton = ({ isDark, gridColumn
|
|
5800
|
+
var PasskeyLoginButton = ({ isDark, gridColumn }) => {
|
|
5718
5801
|
const { t } = reactI18next.useTranslation();
|
|
5719
5802
|
const { loginWithPasskey } = useLoginWithPasskey();
|
|
5720
|
-
const [loginError, setLoginError] =
|
|
5803
|
+
const [loginError, setLoginError] = React8.useState();
|
|
5721
5804
|
const loginLoadingModal = react.useDisclosure();
|
|
5722
5805
|
const handleLoginWithPasskey = async () => {
|
|
5723
5806
|
loginLoadingModal.onOpen();
|
|
@@ -5738,7 +5821,8 @@ var PasskeyLoginButton = ({ isDark, gridColumn = 1 }) => {
|
|
|
5738
5821
|
{
|
|
5739
5822
|
isDark,
|
|
5740
5823
|
onClick: handleLoginWithPasskey,
|
|
5741
|
-
icon: io.IoIosFingerPrint
|
|
5824
|
+
icon: io.IoIosFingerPrint,
|
|
5825
|
+
text: gridColumn && gridColumn >= 2 ? t("Passkey") : void 0
|
|
5742
5826
|
}
|
|
5743
5827
|
) }),
|
|
5744
5828
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5771,20 +5855,20 @@ var DappKitButton = ({ isDark, gridColumn = 2 }) => {
|
|
|
5771
5855
|
};
|
|
5772
5856
|
var EcosystemButton = ({
|
|
5773
5857
|
isDark,
|
|
5774
|
-
privySocialLoginEnabled,
|
|
5775
5858
|
appsInfo,
|
|
5776
|
-
isLoading
|
|
5859
|
+
isLoading,
|
|
5860
|
+
gridColumn
|
|
5777
5861
|
}) => {
|
|
5778
5862
|
const { t } = reactI18next.useTranslation();
|
|
5779
5863
|
const ecosystemModal = react.useDisclosure();
|
|
5780
5864
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5781
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan:
|
|
5865
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan: gridColumn, w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5782
5866
|
ConnectionButton,
|
|
5783
5867
|
{
|
|
5784
5868
|
isDark,
|
|
5785
5869
|
onClick: ecosystemModal.onOpen,
|
|
5786
|
-
icon:
|
|
5787
|
-
text:
|
|
5870
|
+
icon: io.IoMdApps,
|
|
5871
|
+
text: gridColumn && gridColumn >= 2 ? t("Other") : void 0
|
|
5788
5872
|
}
|
|
5789
5873
|
) }),
|
|
5790
5874
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5798,11 +5882,7 @@ var EcosystemButton = ({
|
|
|
5798
5882
|
)
|
|
5799
5883
|
] });
|
|
5800
5884
|
};
|
|
5801
|
-
var PrivyButton = ({
|
|
5802
|
-
isDark,
|
|
5803
|
-
onViewMoreLogin,
|
|
5804
|
-
gridColumn = 1
|
|
5805
|
-
}) => {
|
|
5885
|
+
var PrivyButton = ({ isDark, onViewMoreLogin, gridColumn }) => {
|
|
5806
5886
|
const { t } = reactI18next.useTranslation();
|
|
5807
5887
|
return /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan: gridColumn, w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5808
5888
|
ConnectionButton,
|
|
@@ -5810,7 +5890,7 @@ var PrivyButton = ({
|
|
|
5810
5890
|
isDark,
|
|
5811
5891
|
onClick: onViewMoreLogin,
|
|
5812
5892
|
icon: ci.CiCircleMore,
|
|
5813
|
-
text: gridColumn >= 2 ? t("More") : void 0
|
|
5893
|
+
text: gridColumn && gridColumn >= 2 ? t("More") : void 0
|
|
5814
5894
|
}
|
|
5815
5895
|
) });
|
|
5816
5896
|
};
|
|
@@ -5867,10 +5947,10 @@ var EmailCodeVerificationModal = ({
|
|
|
5867
5947
|
}) => {
|
|
5868
5948
|
const { t } = reactI18next.useTranslation();
|
|
5869
5949
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
5870
|
-
const [code, setCode] =
|
|
5871
|
-
const [error, setError] =
|
|
5950
|
+
const [code, setCode] = React8.useState("");
|
|
5951
|
+
const [error, setError] = React8.useState(null);
|
|
5872
5952
|
const { loginWithCode } = reactAuth.useLoginWithEmail({});
|
|
5873
|
-
|
|
5953
|
+
React8.useEffect(() => {
|
|
5874
5954
|
if (code.length === 6) {
|
|
5875
5955
|
loginWithCode({ code }).then(() => {
|
|
5876
5956
|
onClose();
|
|
@@ -6057,7 +6137,7 @@ var EmailCodeVerificationModal = ({
|
|
|
6057
6137
|
var EmailLoginButton = () => {
|
|
6058
6138
|
const { t } = reactI18next.useTranslation();
|
|
6059
6139
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
6060
|
-
const [email, setEmail] =
|
|
6140
|
+
const [email, setEmail] = React8.useState("");
|
|
6061
6141
|
const { sendCode, state: emailState } = reactAuth.useLoginWithEmail({});
|
|
6062
6142
|
const emailCodeVerificationModal = react.useDisclosure();
|
|
6063
6143
|
const handleSendCode = async () => {
|
|
@@ -6136,51 +6216,99 @@ var VeChainWithPrivyLoginButton = ({ isDark, gridColumn }) => {
|
|
|
6136
6216
|
}
|
|
6137
6217
|
) });
|
|
6138
6218
|
};
|
|
6139
|
-
var MainContent = ({
|
|
6140
|
-
setCurrentContent,
|
|
6141
|
-
onClose,
|
|
6142
|
-
variant = "vechain-wallet-ecosystem"
|
|
6143
|
-
}) => {
|
|
6219
|
+
var MainContent = ({ setCurrentContent, onClose }) => {
|
|
6144
6220
|
const { t } = reactI18next.useTranslation();
|
|
6145
6221
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
6146
6222
|
const { connection } = useWallet();
|
|
6147
|
-
const { loginModalUI,
|
|
6223
|
+
const { loginModalUI, privyEcosystemAppIDS, loginMethods } = useVeChainKitConfig();
|
|
6148
6224
|
const { login: viewMoreLogin } = reactAuth.usePrivy();
|
|
6225
|
+
const {
|
|
6226
|
+
showSocialLogin,
|
|
6227
|
+
showPasskey,
|
|
6228
|
+
showVeChainLogin,
|
|
6229
|
+
showDappKit,
|
|
6230
|
+
showEcosystem,
|
|
6231
|
+
showMoreLogin,
|
|
6232
|
+
isOfficialVeChainApp
|
|
6233
|
+
} = useLoginModalContent();
|
|
6149
6234
|
const { data: appsInfo, isLoading: isEcosystemAppsLoading } = useFetchAppInfo(privyEcosystemAppIDS);
|
|
6150
|
-
|
|
6235
|
+
React8.useEffect(() => {
|
|
6151
6236
|
if (connection.isConnected) {
|
|
6152
6237
|
onClose();
|
|
6153
6238
|
}
|
|
6154
6239
|
}, [connection.isConnected, onClose]);
|
|
6155
|
-
const
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6240
|
+
const gridLayout = React8.useMemo(() => {
|
|
6241
|
+
if (loginMethods?.length) {
|
|
6242
|
+
const layout = {};
|
|
6243
|
+
loginMethods.forEach(({ method: method35, gridColumn }) => {
|
|
6244
|
+
switch (method35) {
|
|
6245
|
+
case "email":
|
|
6246
|
+
case "google":
|
|
6247
|
+
layout.socialLoginColumn = gridColumn || 4;
|
|
6248
|
+
break;
|
|
6249
|
+
case "vechain":
|
|
6250
|
+
layout.veChainColumn = gridColumn || 4;
|
|
6251
|
+
break;
|
|
6252
|
+
case "passkey":
|
|
6253
|
+
layout.passkeyColumn = gridColumn || 1;
|
|
6254
|
+
break;
|
|
6255
|
+
case "dappkit":
|
|
6256
|
+
layout.dappKitColumn = gridColumn || 2;
|
|
6257
|
+
break;
|
|
6258
|
+
case "ecosystem":
|
|
6259
|
+
layout.ecosystemColumn = gridColumn || 2;
|
|
6260
|
+
break;
|
|
6261
|
+
case "more":
|
|
6262
|
+
layout.moreLoginColumn = gridColumn || 1;
|
|
6263
|
+
break;
|
|
6164
6264
|
}
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6265
|
+
});
|
|
6266
|
+
return layout;
|
|
6267
|
+
}
|
|
6268
|
+
const visibleButtons = {
|
|
6269
|
+
socialLogin: showSocialLogin,
|
|
6270
|
+
veChainLogin: showVeChainLogin,
|
|
6271
|
+
dappKit: showDappKit,
|
|
6272
|
+
ecosystem: showEcosystem,
|
|
6273
|
+
moreLogin: showMoreLogin,
|
|
6274
|
+
passkey: showPasskey
|
|
6275
|
+
};
|
|
6276
|
+
if (visibleButtons.veChainLogin && visibleButtons.dappKit && visibleButtons.ecosystem && !visibleButtons.socialLogin) {
|
|
6277
|
+
return {
|
|
6278
|
+
veChainColumn: 4,
|
|
6279
|
+
// Full width
|
|
6280
|
+
dappKitColumn: 2,
|
|
6281
|
+
// Half width
|
|
6282
|
+
ecosystemColumn: 2
|
|
6283
|
+
// Half width
|
|
6284
|
+
};
|
|
6182
6285
|
}
|
|
6183
|
-
|
|
6286
|
+
if (visibleButtons.socialLogin) {
|
|
6287
|
+
return {
|
|
6288
|
+
socialLoginColumn: 4,
|
|
6289
|
+
veChainColumn: 4,
|
|
6290
|
+
dappKitColumn: 1,
|
|
6291
|
+
ecosystemColumn: 1,
|
|
6292
|
+
moreLoginColumn: 1,
|
|
6293
|
+
passkeyColumn: 1
|
|
6294
|
+
};
|
|
6295
|
+
}
|
|
6296
|
+
const totalButtons = Object.values(visibleButtons).filter(Boolean).length;
|
|
6297
|
+
const defaultColumn = Math.min(4, totalButtons);
|
|
6298
|
+
return {
|
|
6299
|
+
veChainColumn: 4,
|
|
6300
|
+
dappKitColumn: defaultColumn,
|
|
6301
|
+
ecosystemColumn: defaultColumn
|
|
6302
|
+
};
|
|
6303
|
+
}, [
|
|
6304
|
+
loginMethods,
|
|
6305
|
+
showSocialLogin,
|
|
6306
|
+
showVeChainLogin,
|
|
6307
|
+
showDappKit,
|
|
6308
|
+
showEcosystem,
|
|
6309
|
+
showMoreLogin,
|
|
6310
|
+
showPasskey
|
|
6311
|
+
]);
|
|
6184
6312
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6185
6313
|
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
6186
6314
|
/* @__PURE__ */ jsxRuntime.jsx(ModalFAQButton, { onClick: () => setCurrentContent("faq") }),
|
|
@@ -6227,53 +6355,56 @@ var MainContent = ({
|
|
|
6227
6355
|
}
|
|
6228
6356
|
),
|
|
6229
6357
|
/* @__PURE__ */ jsxRuntime.jsx(react.Stack, { spacing: 4, w: "full", align: "center", children: /* @__PURE__ */ jsxRuntime.jsxs(react.Grid, { templateColumns: "repeat(4, 1fr)", gap: 2, w: "full", children: [
|
|
6230
|
-
|
|
6358
|
+
showSocialLogin && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6231
6359
|
SocialLoginButtons,
|
|
6232
6360
|
{
|
|
6233
6361
|
isDark,
|
|
6234
|
-
|
|
6362
|
+
loginMethods,
|
|
6363
|
+
gridColumn: gridLayout.socialLoginColumn
|
|
6235
6364
|
}
|
|
6236
6365
|
),
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
isDark,
|
|
6244
|
-
gridColumn: 4
|
|
6245
|
-
}
|
|
6246
|
-
)
|
|
6366
|
+
showVeChainLogin && (isOfficialVeChainApp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6367
|
+
VeChainWithPrivyLoginButton,
|
|
6368
|
+
{
|
|
6369
|
+
isDark,
|
|
6370
|
+
gridColumn: gridLayout.veChainColumn
|
|
6371
|
+
}
|
|
6247
6372
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
6248
6373
|
VeChainLoginButton,
|
|
6249
6374
|
{
|
|
6250
6375
|
isDark,
|
|
6251
|
-
gridColumn:
|
|
6376
|
+
gridColumn: gridLayout.veChainColumn
|
|
6377
|
+
}
|
|
6378
|
+
)),
|
|
6379
|
+
gridLayout.passkeyColumn && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6380
|
+
PasskeyLoginButton,
|
|
6381
|
+
{
|
|
6382
|
+
isDark,
|
|
6383
|
+
gridColumn: gridLayout.passkeyColumn
|
|
6252
6384
|
}
|
|
6253
6385
|
),
|
|
6254
|
-
|
|
6255
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6386
|
+
showDappKit && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6256
6387
|
DappKitButton,
|
|
6257
6388
|
{
|
|
6258
6389
|
isDark,
|
|
6259
|
-
gridColumn:
|
|
6390
|
+
gridColumn: gridLayout.dappKitColumn
|
|
6260
6391
|
}
|
|
6261
6392
|
),
|
|
6262
|
-
|
|
6393
|
+
showEcosystem && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6263
6394
|
EcosystemButton,
|
|
6264
6395
|
{
|
|
6265
6396
|
isDark,
|
|
6266
|
-
privySocialLoginEnabled: variant === "full" && privySocialLoginEnabled,
|
|
6267
6397
|
appsInfo: Object.values(appsInfo || {}),
|
|
6268
|
-
isLoading: isEcosystemAppsLoading
|
|
6398
|
+
isLoading: isEcosystemAppsLoading,
|
|
6399
|
+
gridColumn: gridLayout.ecosystemColumn
|
|
6269
6400
|
}
|
|
6270
6401
|
),
|
|
6271
|
-
|
|
6402
|
+
showMoreLogin && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6272
6403
|
PrivyButton,
|
|
6273
6404
|
{
|
|
6274
6405
|
isDark,
|
|
6275
6406
|
onViewMoreLogin: viewMoreLogin,
|
|
6276
|
-
gridColumn:
|
|
6407
|
+
gridColumn: gridLayout.moreLoginColumn
|
|
6277
6408
|
}
|
|
6278
6409
|
)
|
|
6279
6410
|
] }) })
|
|
@@ -6338,21 +6469,35 @@ var FeatureAnnouncementCard = ({
|
|
|
6338
6469
|
}
|
|
6339
6470
|
);
|
|
6340
6471
|
};
|
|
6341
|
-
var
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6472
|
+
var ExchangeWarningAlert = () => {
|
|
6473
|
+
const { t } = reactI18next.useTranslation();
|
|
6474
|
+
const [showFullText, setShowFullText] = React8.useState(false);
|
|
6475
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Alert, { status: "warning", fontSize: "xs", borderRadius: "xl", p: 2, children: /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { spacing: 1, align: "stretch", w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { spacing: 2, align: "flex-start", children: [
|
|
6476
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AlertIcon, { boxSize: 4 }),
|
|
6477
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { w: "full", children: [
|
|
6478
|
+
t(
|
|
6479
|
+
"Sending to OceanX or other exchanges may result in loss of funds."
|
|
6480
|
+
),
|
|
6481
|
+
showFullText && t("Send the tokens to your VeWorld wallet first."),
|
|
6482
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6483
|
+
react.Button,
|
|
6484
|
+
{
|
|
6485
|
+
variant: "link",
|
|
6486
|
+
size: "xs",
|
|
6487
|
+
onClick: () => setShowFullText(!showFullText),
|
|
6488
|
+
color: "inherit",
|
|
6489
|
+
pl: 6,
|
|
6490
|
+
mt: 0,
|
|
6491
|
+
children: t(showFullText ? "Show Less" : "Read More")
|
|
6492
|
+
}
|
|
6493
|
+
)
|
|
6494
|
+
] })
|
|
6495
|
+
] }) }) });
|
|
6496
|
+
};
|
|
6497
|
+
var AccountMainContent = ({ setCurrentContent, wallet }) => {
|
|
6346
6498
|
const { t } = reactI18next.useTranslation();
|
|
6347
6499
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
6348
|
-
const {
|
|
6349
|
-
const { getNotifications } = useNotifications();
|
|
6350
|
-
const notifications = getNotifications();
|
|
6351
|
-
const hasUnreadNotifications = notifications.some((n) => !n.isRead);
|
|
6352
|
-
const handleDisconnect = () => {
|
|
6353
|
-
disconnect();
|
|
6354
|
-
onClose();
|
|
6355
|
-
};
|
|
6500
|
+
const { connection, account } = useWallet();
|
|
6356
6501
|
return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
|
|
6357
6502
|
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
6358
6503
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6375,60 +6520,16 @@ var AccountMainContent = ({
|
|
|
6375
6520
|
setCurrentContent
|
|
6376
6521
|
}
|
|
6377
6522
|
),
|
|
6378
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
type: "disconnect-confirm",
|
|
6389
|
-
props: {
|
|
6390
|
-
onDisconnect: handleDisconnect,
|
|
6391
|
-
onBack: () => setCurrentContent("main")
|
|
6392
|
-
}
|
|
6393
|
-
})
|
|
6394
|
-
}
|
|
6395
|
-
),
|
|
6396
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6397
|
-
AccountSelector,
|
|
6398
|
-
{
|
|
6399
|
-
mt: 0,
|
|
6400
|
-
onClick: () => {
|
|
6401
|
-
setCurrentContent("settings");
|
|
6402
|
-
},
|
|
6403
|
-
wallet
|
|
6404
|
-
}
|
|
6405
|
-
),
|
|
6406
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { position: "relative", children: [
|
|
6407
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6408
|
-
react.IconButton,
|
|
6409
|
-
{
|
|
6410
|
-
p: 2,
|
|
6411
|
-
h: 9,
|
|
6412
|
-
variant: "vechainKitSelector",
|
|
6413
|
-
"aria-label": "notifications",
|
|
6414
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { boxSize: 5, as: bi.BiBell }),
|
|
6415
|
-
onClick: () => setCurrentContent("notifications")
|
|
6416
|
-
}
|
|
6417
|
-
),
|
|
6418
|
-
hasUnreadNotifications && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6419
|
-
react.Box,
|
|
6420
|
-
{
|
|
6421
|
-
position: "absolute",
|
|
6422
|
-
top: 1,
|
|
6423
|
-
right: 1,
|
|
6424
|
-
width: "8px",
|
|
6425
|
-
height: "8px",
|
|
6426
|
-
bg: "red.500",
|
|
6427
|
-
borderRadius: "full"
|
|
6428
|
-
}
|
|
6429
|
-
)
|
|
6430
|
-
] })
|
|
6431
|
-
] }),
|
|
6523
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6524
|
+
AccountSelector,
|
|
6525
|
+
{
|
|
6526
|
+
mt: 0,
|
|
6527
|
+
onClick: () => {
|
|
6528
|
+
setCurrentContent("settings");
|
|
6529
|
+
},
|
|
6530
|
+
wallet
|
|
6531
|
+
}
|
|
6532
|
+
),
|
|
6432
6533
|
/* @__PURE__ */ jsxRuntime.jsx(BalanceSection, { mt: 14 }),
|
|
6433
6534
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6434
6535
|
QuickActionsSection,
|
|
@@ -6515,7 +6616,6 @@ var ActionButton = ({
|
|
|
6515
6616
|
leftIcon,
|
|
6516
6617
|
rightIcon,
|
|
6517
6618
|
title,
|
|
6518
|
-
description,
|
|
6519
6619
|
onClick,
|
|
6520
6620
|
leftImage,
|
|
6521
6621
|
hide = false,
|
|
@@ -6526,7 +6626,8 @@ var ActionButton = ({
|
|
|
6526
6626
|
stacked = false,
|
|
6527
6627
|
isLoading,
|
|
6528
6628
|
loadingText,
|
|
6529
|
-
style
|
|
6629
|
+
style,
|
|
6630
|
+
extraContent
|
|
6530
6631
|
}) => {
|
|
6531
6632
|
const { t } = reactI18next.useTranslation();
|
|
6532
6633
|
const { colorMode } = react.useColorMode();
|
|
@@ -6555,10 +6656,11 @@ var ActionButton = ({
|
|
|
6555
6656
|
h: "35px",
|
|
6556
6657
|
borderRadius: "full",
|
|
6557
6658
|
alt: "left-image",
|
|
6558
|
-
alignSelf: "end"
|
|
6659
|
+
alignSelf: "end",
|
|
6660
|
+
objectFit: "cover"
|
|
6559
6661
|
}
|
|
6560
6662
|
) : /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: leftIcon, fontSize: "25px" }) }),
|
|
6561
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6663
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6562
6664
|
react.VStack,
|
|
6563
6665
|
{
|
|
6564
6666
|
textAlign: "left",
|
|
@@ -6566,26 +6668,11 @@ var ActionButton = ({
|
|
|
6566
6668
|
flex: 1,
|
|
6567
6669
|
justifyContent: "flex-start",
|
|
6568
6670
|
alignItems: "flex-start",
|
|
6569
|
-
children: [
|
|
6570
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6575
|
-
react.Text,
|
|
6576
|
-
{
|
|
6577
|
-
fontSize: "xs",
|
|
6578
|
-
fontWeight: "400",
|
|
6579
|
-
opacity: 0.5,
|
|
6580
|
-
overflowWrap: "break-word",
|
|
6581
|
-
wordBreak: "break-word",
|
|
6582
|
-
whiteSpace: "normal",
|
|
6583
|
-
w: "full",
|
|
6584
|
-
pr: rightIcon ? "0px" : "10px",
|
|
6585
|
-
children: description
|
|
6586
|
-
}
|
|
6587
|
-
)
|
|
6588
|
-
]
|
|
6671
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "flex-start", children: [
|
|
6672
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "400", children: title }),
|
|
6673
|
+
showComingSoon && /* @__PURE__ */ jsxRuntime.jsx(react.Tag, { size: "sm", colorScheme: "red", children: t("Coming Soon!") }),
|
|
6674
|
+
extraContent
|
|
6675
|
+
] })
|
|
6589
6676
|
}
|
|
6590
6677
|
),
|
|
6591
6678
|
rightIcon && /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { minW: "40px", justifyContent: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: rightIcon, fontSize: "20px", opacity: 0.5 }) })
|
|
@@ -6599,28 +6686,25 @@ var AccountSelector = ({
|
|
|
6599
6686
|
onClick,
|
|
6600
6687
|
mt
|
|
6601
6688
|
}) => {
|
|
6602
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.HStack, { mt, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6689
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.HStack, { mt, w: "full", justify: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6603
6690
|
react.Button,
|
|
6604
6691
|
{
|
|
6605
6692
|
w: "fit-content",
|
|
6606
6693
|
p: 2,
|
|
6607
6694
|
pl: 4,
|
|
6608
|
-
h:
|
|
6695
|
+
h: 14,
|
|
6609
6696
|
"aria-label": "Wallet",
|
|
6610
6697
|
onClick,
|
|
6611
6698
|
variant: "vechainKitSelector",
|
|
6612
6699
|
children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { spacing: 2, align: "center", children: [
|
|
6613
6700
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6614
|
-
|
|
6701
|
+
AccountAvatar,
|
|
6615
6702
|
{
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
width: 5,
|
|
6619
|
-
height: 5,
|
|
6620
|
-
rounded: "full"
|
|
6703
|
+
wallet,
|
|
6704
|
+
props: { width: 10, height: 10 }
|
|
6621
6705
|
}
|
|
6622
6706
|
),
|
|
6623
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: size, fontWeight: "500", children: chunkEO3CLT4E_cjs.humanDomain(wallet?.domain ?? "",
|
|
6707
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: size, fontWeight: "500", children: chunkEO3CLT4E_cjs.humanDomain(wallet?.domain ?? "", 20, 0) || chunkEO3CLT4E_cjs.humanAddress(wallet?.address ?? "", 6, 4) }),
|
|
6624
6708
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6625
6709
|
react.Icon,
|
|
6626
6710
|
{
|
|
@@ -6646,7 +6730,7 @@ var BalanceSection = ({ mb, mt }) => {
|
|
|
6646
6730
|
address: account?.address ?? ""
|
|
6647
6731
|
});
|
|
6648
6732
|
const { refresh } = useRefreshBalances();
|
|
6649
|
-
const [isRefreshing, setIsRefreshing] =
|
|
6733
|
+
const [isRefreshing, setIsRefreshing] = React8.useState(false);
|
|
6650
6734
|
const handleRefresh = async () => {
|
|
6651
6735
|
setIsRefreshing(true);
|
|
6652
6736
|
await refresh();
|
|
@@ -6765,7 +6849,7 @@ var AssetsSection = ({ mt, setCurrentContent }) => {
|
|
|
6765
6849
|
const tabBgColor = react.useColorModeValue("white", "#1f1f1e");
|
|
6766
6850
|
const tabBorderColor = react.useColorModeValue("#ebebeb", "#2d2d2d");
|
|
6767
6851
|
const tabTextColor = react.useColorModeValue("#4d4d4d", "#dfdfdd");
|
|
6768
|
-
const tabPanelsRef =
|
|
6852
|
+
const tabPanelsRef = React8.useRef(null);
|
|
6769
6853
|
const scrollToContent = () => {
|
|
6770
6854
|
setTimeout(() => {
|
|
6771
6855
|
if (tabPanelsRef.current) {
|
|
@@ -6820,8 +6904,8 @@ var QuickActionsSection = ({ mt, setCurrentContent }) => {
|
|
|
6820
6904
|
py: 3,
|
|
6821
6905
|
fontSize: "xs",
|
|
6822
6906
|
verticalAlign: "middle",
|
|
6823
|
-
"aria-label": "
|
|
6824
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as:
|
|
6907
|
+
"aria-label": "Apps",
|
|
6908
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: io.IoMdApps, boxSize: 5, opacity: 0.9 }),
|
|
6825
6909
|
onClick: () => setCurrentContent("ecosystem")
|
|
6826
6910
|
}
|
|
6827
6911
|
),
|
|
@@ -6874,83 +6958,539 @@ var QuickActionsSection = ({ mt, setCurrentContent }) => {
|
|
|
6874
6958
|
)
|
|
6875
6959
|
] });
|
|
6876
6960
|
};
|
|
6877
|
-
var
|
|
6961
|
+
var Profile = ({ onEditClick }) => {
|
|
6962
|
+
const { darkMode: isDark } = useVeChainKitConfig();
|
|
6963
|
+
const { account } = useWallet();
|
|
6964
|
+
const baseBackgroundColor = isDark ? "whiteAlpha.100" : "#00000005";
|
|
6965
|
+
const headerImageSvg = picasso.picasso(account?.address ?? "");
|
|
6966
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6967
|
+
react.Card,
|
|
6968
|
+
{
|
|
6969
|
+
bg: baseBackgroundColor,
|
|
6970
|
+
borderRadius: "xl",
|
|
6971
|
+
width: "full",
|
|
6972
|
+
position: "relative",
|
|
6973
|
+
overflow: "visible",
|
|
6974
|
+
children: [
|
|
6975
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6976
|
+
react.Box,
|
|
6977
|
+
{
|
|
6978
|
+
p: 0,
|
|
6979
|
+
backgroundSize: "100% !important",
|
|
6980
|
+
backgroundPosition: "center",
|
|
6981
|
+
position: "relative",
|
|
6982
|
+
h: "80px",
|
|
6983
|
+
background: `no-repeat url('data:image/svg+xml;utf8,${headerImageSvg}')`,
|
|
6984
|
+
w: "100%",
|
|
6985
|
+
borderRadius: "14px 14px 0 0"
|
|
6986
|
+
}
|
|
6987
|
+
),
|
|
6988
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6989
|
+
react.Box,
|
|
6990
|
+
{
|
|
6991
|
+
position: "absolute",
|
|
6992
|
+
top: "30px",
|
|
6993
|
+
left: "50%",
|
|
6994
|
+
transform: "translateX(-50%)",
|
|
6995
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6996
|
+
AccountAvatar,
|
|
6997
|
+
{
|
|
6998
|
+
wallet: account,
|
|
6999
|
+
props: {
|
|
7000
|
+
width: "100px",
|
|
7001
|
+
height: "100px",
|
|
7002
|
+
boxShadow: "0px 0px 3px 2px #00000024"
|
|
7003
|
+
}
|
|
7004
|
+
}
|
|
7005
|
+
)
|
|
7006
|
+
}
|
|
7007
|
+
),
|
|
7008
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { pt: "14", pb: "6", backgroundColor: "none", border: "none", children: /* @__PURE__ */ jsxRuntime.jsx(AddressDisplay, { wallet: account }) }),
|
|
7009
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.CardFooter, { pt: 0, justify: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7010
|
+
react.Button,
|
|
7011
|
+
{
|
|
7012
|
+
size: "sm",
|
|
7013
|
+
variant: "ghost",
|
|
7014
|
+
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: fa.FaEdit }),
|
|
7015
|
+
onClick: onEditClick,
|
|
7016
|
+
children: "Edit"
|
|
7017
|
+
}
|
|
7018
|
+
) })
|
|
7019
|
+
]
|
|
7020
|
+
}
|
|
7021
|
+
);
|
|
7022
|
+
};
|
|
7023
|
+
var AccessAndSecurityContent = ({ setCurrentContent }) => {
|
|
6878
7024
|
const { t } = reactI18next.useTranslation();
|
|
6879
|
-
const {
|
|
6880
|
-
const {
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
] }),
|
|
6887
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.source.type })
|
|
6888
|
-
] }),
|
|
6889
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6890
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
6891
|
-
t("Network"),
|
|
6892
|
-
":"
|
|
6893
|
-
] }),
|
|
6894
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.type })
|
|
6895
|
-
] }),
|
|
6896
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6897
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
6898
|
-
t("Node URL"),
|
|
6899
|
-
":"
|
|
6900
|
-
] }),
|
|
6901
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || chunkEO3CLT4E_cjs.getConfig(network.type).nodeUrl })
|
|
6902
|
-
] }),
|
|
6903
|
-
connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6904
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
6905
|
-
t("Smart Account"),
|
|
6906
|
-
":"
|
|
6907
|
-
] }),
|
|
6908
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
|
|
6909
|
-
] }) : smartAccount.isDeployed && /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
6910
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6911
|
-
react.Text,
|
|
7025
|
+
const { linkPasskey } = reactAuth.usePrivy();
|
|
7026
|
+
const { darkMode: isDark, privy } = useVeChainKitConfig();
|
|
7027
|
+
const { connection } = useWallet();
|
|
7028
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
|
|
7029
|
+
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
7030
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7031
|
+
react.ModalHeader,
|
|
6912
7032
|
{
|
|
6913
|
-
fontSize: "
|
|
7033
|
+
fontSize: "md",
|
|
7034
|
+
fontWeight: "500",
|
|
7035
|
+
textAlign: "center",
|
|
6914
7036
|
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6915
|
-
children:
|
|
6916
|
-
t("Smart Account"),
|
|
6917
|
-
":"
|
|
6918
|
-
]
|
|
7037
|
+
children: t("Access and security")
|
|
6919
7038
|
}
|
|
6920
7039
|
),
|
|
6921
7040
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6922
|
-
|
|
7041
|
+
ModalBackButton,
|
|
6923
7042
|
{
|
|
6924
|
-
|
|
6925
|
-
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
6926
|
-
children: smartAccount.version ? `v${smartAccount.version}` : "v1"
|
|
7043
|
+
onClick: () => setCurrentContent("settings")
|
|
6927
7044
|
}
|
|
6928
|
-
)
|
|
7045
|
+
),
|
|
7046
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
|
|
6929
7047
|
] }),
|
|
6930
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
7048
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7049
|
+
react.VStack,
|
|
7050
|
+
{
|
|
7051
|
+
justify: "center",
|
|
7052
|
+
spacing: 3,
|
|
7053
|
+
align: "flex-start",
|
|
7054
|
+
w: "full",
|
|
7055
|
+
children: [
|
|
7056
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
|
|
7057
|
+
"Manage your embedded wallet security settings or back it up to a new device."
|
|
7058
|
+
) }),
|
|
7059
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7060
|
+
ActionButton,
|
|
7061
|
+
{
|
|
7062
|
+
title: t("Passkey"),
|
|
7063
|
+
description: t(
|
|
7064
|
+
"Enable one click login by adding a passkey to your account."
|
|
7065
|
+
),
|
|
7066
|
+
onClick: () => {
|
|
7067
|
+
linkPasskey();
|
|
7068
|
+
},
|
|
7069
|
+
leftIcon: io.IoIosFingerPrint,
|
|
7070
|
+
rightIcon: void 0,
|
|
7071
|
+
isDisabled: !privy?.allowPasskeyLinking
|
|
7072
|
+
}
|
|
7073
|
+
),
|
|
7074
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7075
|
+
ActionButton,
|
|
7076
|
+
{
|
|
7077
|
+
title: t("Login methods"),
|
|
7078
|
+
description: t(
|
|
7079
|
+
connection.isConnectedWithSocialLogin ? "View and manage the login methods linked to your wallet." : "Login methods can be managed only in the app securing your wallet."
|
|
7080
|
+
),
|
|
7081
|
+
onClick: () => {
|
|
7082
|
+
setCurrentContent("privy-linked-accounts");
|
|
7083
|
+
},
|
|
7084
|
+
isDisabled: !connection.isConnectedWithSocialLogin,
|
|
7085
|
+
leftIcon: gr.GrUserAdmin,
|
|
7086
|
+
rightIcon: md.MdOutlineNavigateNext
|
|
7087
|
+
}
|
|
7088
|
+
),
|
|
7089
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7090
|
+
ActionButton,
|
|
7091
|
+
{
|
|
7092
|
+
title: t("Embedded wallet"),
|
|
7093
|
+
description: t(
|
|
7094
|
+
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."
|
|
7095
|
+
),
|
|
7096
|
+
onClick: () => {
|
|
7097
|
+
setCurrentContent("embedded-wallet");
|
|
7098
|
+
},
|
|
7099
|
+
leftIcon: hi2.HiOutlineWallet,
|
|
7100
|
+
rightIcon: md.MdOutlineNavigateNext
|
|
7101
|
+
}
|
|
7102
|
+
)
|
|
7103
|
+
]
|
|
7104
|
+
}
|
|
7105
|
+
) }),
|
|
7106
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full" })
|
|
7107
|
+
] });
|
|
7108
|
+
};
|
|
7109
|
+
var SettingsContent = ({
|
|
7110
|
+
setCurrentContent,
|
|
7111
|
+
onLogoutSuccess
|
|
7112
|
+
}) => {
|
|
7113
|
+
const contentRef = React8.useRef(null);
|
|
7114
|
+
const { t } = reactI18next.useTranslation();
|
|
7115
|
+
const { privy, darkMode: isDark } = useVeChainKitConfig();
|
|
7116
|
+
const { connection, disconnect } = useWallet();
|
|
7117
|
+
const { getConnectionCache } = useCrossAppConnectionCache();
|
|
7118
|
+
const connectionCache = getConnectionCache();
|
|
7119
|
+
const { data: appInfo } = useFetchAppInfo(privy?.appId ?? "");
|
|
7120
|
+
const { getNotifications } = useNotifications();
|
|
7121
|
+
const notifications = getNotifications();
|
|
7122
|
+
const hasUnreadNotifications = notifications.some((n) => !n.isRead);
|
|
7123
|
+
React8.useEffect(() => {
|
|
7124
|
+
if (contentRef.current) {
|
|
7125
|
+
contentRef.current.scrollTop = 0;
|
|
7126
|
+
}
|
|
7127
|
+
}, []);
|
|
7128
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
|
|
7129
|
+
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
7130
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7131
|
+
react.ModalHeader,
|
|
7132
|
+
{
|
|
7133
|
+
fontSize: "md",
|
|
7134
|
+
fontWeight: "500",
|
|
7135
|
+
textAlign: "center",
|
|
7136
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
7137
|
+
children: t("Settings")
|
|
7138
|
+
}
|
|
7139
|
+
),
|
|
7140
|
+
/* @__PURE__ */ jsxRuntime.jsx(ModalBackButton, { onClick: () => setCurrentContent("main") }),
|
|
7141
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
|
|
7142
|
+
] }),
|
|
7143
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.ModalBody, { w: "full", children: [
|
|
7144
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7145
|
+
Profile,
|
|
7146
|
+
{
|
|
7147
|
+
onEditClick: () => setCurrentContent("account-customization")
|
|
7148
|
+
}
|
|
7149
|
+
),
|
|
7150
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "full", spacing: 0, children: [
|
|
7151
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7152
|
+
ActionButton,
|
|
7153
|
+
{
|
|
7154
|
+
style: {
|
|
7155
|
+
marginTop: "10px",
|
|
7156
|
+
borderBottomRadius: connection.isConnectedWithPrivy ? "0px" : "12px"
|
|
7157
|
+
},
|
|
7158
|
+
title: t("Connection details"),
|
|
7159
|
+
description: t(
|
|
7160
|
+
"View the details of your connection to this app."
|
|
7161
|
+
),
|
|
7162
|
+
onClick: () => {
|
|
7163
|
+
setCurrentContent("connection-details");
|
|
7164
|
+
},
|
|
7165
|
+
leftIcon: vsc.VscDebugDisconnect,
|
|
7166
|
+
rightIcon: md.MdOutlineNavigateNext
|
|
7167
|
+
}
|
|
7168
|
+
),
|
|
7169
|
+
connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7170
|
+
ActionButton,
|
|
7171
|
+
{
|
|
7172
|
+
style: {
|
|
7173
|
+
borderTopRadius: "0px"
|
|
7174
|
+
},
|
|
7175
|
+
title: t("Access and security"),
|
|
7176
|
+
description: t(
|
|
7177
|
+
"Manage your embedded wallet security settings or back it up to a new device."
|
|
7178
|
+
),
|
|
7179
|
+
onClick: () => {
|
|
7180
|
+
setCurrentContent("access-and-security");
|
|
7181
|
+
},
|
|
7182
|
+
leftIcon: io5.IoShieldOutline,
|
|
7183
|
+
rightIcon: md.MdOutlineNavigateNext
|
|
7184
|
+
}
|
|
7185
|
+
),
|
|
7186
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7187
|
+
ActionButton,
|
|
7188
|
+
{
|
|
7189
|
+
style: {
|
|
7190
|
+
marginTop: "10px",
|
|
7191
|
+
borderBottomRadius: "0px"
|
|
7192
|
+
},
|
|
7193
|
+
title: t("Notifications"),
|
|
7194
|
+
description: t("View your notifications and updates."),
|
|
7195
|
+
onClick: () => {
|
|
7196
|
+
setCurrentContent("notifications");
|
|
7197
|
+
},
|
|
7198
|
+
leftIcon: bi.BiBell,
|
|
7199
|
+
rightIcon: md.MdOutlineNavigateNext,
|
|
7200
|
+
extraContent: hasUnreadNotifications && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7201
|
+
react.Box,
|
|
7202
|
+
{
|
|
7203
|
+
minWidth: "16px",
|
|
7204
|
+
height: "16px",
|
|
7205
|
+
bg: "red.500",
|
|
7206
|
+
borderRadius: "full",
|
|
7207
|
+
display: "flex",
|
|
7208
|
+
alignItems: "center",
|
|
7209
|
+
justifyContent: "center",
|
|
7210
|
+
ml: 2,
|
|
7211
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", color: "white", children: notifications.filter(
|
|
7212
|
+
(n) => !n.isRead
|
|
7213
|
+
).length })
|
|
7214
|
+
}
|
|
7215
|
+
)
|
|
7216
|
+
}
|
|
7217
|
+
),
|
|
7218
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7219
|
+
ActionButton,
|
|
7220
|
+
{
|
|
7221
|
+
title: t("Help"),
|
|
7222
|
+
description: t(
|
|
7223
|
+
"Still have some doubts? Check out our FAQs and learn more.",
|
|
7224
|
+
{
|
|
7225
|
+
appName: connection.isConnectedWithCrossApp ? connectionCache?.ecosystemApp?.name : Object.values(appInfo ?? {})[0]?.name ?? ""
|
|
7226
|
+
}
|
|
7227
|
+
),
|
|
7228
|
+
onClick: () => setCurrentContent("faq"),
|
|
7229
|
+
leftIcon: bs.BsQuestionCircle,
|
|
7230
|
+
rightIcon: md.MdOutlineNavigateNext,
|
|
7231
|
+
style: {
|
|
7232
|
+
borderTopRadius: "0px"
|
|
7233
|
+
}
|
|
7234
|
+
}
|
|
7235
|
+
)
|
|
7236
|
+
] })
|
|
7237
|
+
] }),
|
|
7238
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7239
|
+
react.Button,
|
|
7240
|
+
{
|
|
7241
|
+
onClick: () => setCurrentContent({
|
|
7242
|
+
type: "disconnect-confirm",
|
|
7243
|
+
props: {
|
|
7244
|
+
onDisconnect: () => {
|
|
7245
|
+
disconnect();
|
|
7246
|
+
onLogoutSuccess();
|
|
7247
|
+
},
|
|
7248
|
+
onBack: () => setCurrentContent("settings")
|
|
7249
|
+
}
|
|
7250
|
+
}),
|
|
7251
|
+
variant: "vechainKitSecondary",
|
|
7252
|
+
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(ri.RiLogoutBoxLine, { color: "#888888" }),
|
|
7253
|
+
children: t("Logout")
|
|
7254
|
+
}
|
|
7255
|
+
) })
|
|
7256
|
+
] });
|
|
7257
|
+
};
|
|
7258
|
+
var AccountCustomizationContent = ({ setCurrentContent }) => {
|
|
7259
|
+
const { t } = reactI18next.useTranslation();
|
|
7260
|
+
const { network, darkMode: isDark } = useVeChainKitConfig();
|
|
7261
|
+
const { account } = useWallet();
|
|
7262
|
+
const fileInputRef = React8.useRef(null);
|
|
7263
|
+
const [isUploading, setIsUploading] = React8.useState(false);
|
|
7264
|
+
const [isProcessing, setIsProcessing] = React8.useState(false);
|
|
7265
|
+
const [showFullText, setShowFullText] = React8.useState(false);
|
|
7266
|
+
const queryClient = reactQuery.useQueryClient();
|
|
7267
|
+
const { onUpload } = useSingleImageUpload({
|
|
7268
|
+
compressImage: true
|
|
7269
|
+
});
|
|
7270
|
+
const { updateAvatar } = useUpdateAvatarRecord({
|
|
7271
|
+
onSuccess: async () => {
|
|
7272
|
+
await queryClient.invalidateQueries({
|
|
7273
|
+
queryKey: getAvatarQueryKey(account?.domain ?? "")
|
|
7274
|
+
});
|
|
7275
|
+
await queryClient.refetchQueries({
|
|
7276
|
+
queryKey: getAvatarQueryKey(account?.domain ?? "")
|
|
7277
|
+
});
|
|
7278
|
+
setIsProcessing(false);
|
|
7279
|
+
},
|
|
7280
|
+
onError: () => {
|
|
7281
|
+
setIsProcessing(false);
|
|
7282
|
+
}
|
|
7283
|
+
});
|
|
7284
|
+
const handleImageUpload = async (event) => {
|
|
7285
|
+
const file = event.target.files?.[0];
|
|
7286
|
+
if (!file) return;
|
|
7287
|
+
try {
|
|
7288
|
+
setIsUploading(true);
|
|
7289
|
+
setIsProcessing(true);
|
|
7290
|
+
const uploadedImage = await onUpload(file);
|
|
7291
|
+
if (!uploadedImage) throw new Error("Failed to compress image");
|
|
7292
|
+
const ipfsHash = await chunkEO3CLT4E_cjs.uploadBlobToIPFS(
|
|
7293
|
+
uploadedImage.file,
|
|
7294
|
+
file.name,
|
|
7295
|
+
network.type
|
|
7296
|
+
);
|
|
7297
|
+
await updateAvatar(account?.domain ?? "", "ipfs://" + ipfsHash);
|
|
7298
|
+
} catch (error) {
|
|
7299
|
+
console.error("Error uploading image:", error);
|
|
7300
|
+
setIsProcessing(false);
|
|
7301
|
+
} finally {
|
|
7302
|
+
setIsUploading(false);
|
|
7303
|
+
}
|
|
7304
|
+
};
|
|
7305
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7306
|
+
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
7307
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7308
|
+
react.ModalHeader,
|
|
7309
|
+
{
|
|
7310
|
+
fontSize: "md",
|
|
7311
|
+
fontWeight: "500",
|
|
7312
|
+
textAlign: "center",
|
|
7313
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
7314
|
+
children: t("Customize Account")
|
|
7315
|
+
}
|
|
7316
|
+
),
|
|
7317
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7318
|
+
ModalBackButton,
|
|
7319
|
+
{
|
|
7320
|
+
onClick: () => setCurrentContent("settings")
|
|
7321
|
+
}
|
|
7322
|
+
),
|
|
7323
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
|
|
7324
|
+
] }),
|
|
7325
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 3, align: "center", children: [
|
|
7326
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7327
|
+
react.VStack,
|
|
7328
|
+
{
|
|
7329
|
+
spacing: 3,
|
|
7330
|
+
w: "full",
|
|
7331
|
+
justifyContent: "flex-start",
|
|
7332
|
+
alignItems: "flex-start",
|
|
7333
|
+
children: [
|
|
7334
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
|
|
7335
|
+
"Customize your account with a unique .vet domain name and profile image to enhance your identity across VeChain applications."
|
|
7336
|
+
) }),
|
|
7337
|
+
showFullText && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7338
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
|
|
7339
|
+
"Your customizations are linked to your .vet domain name, making them portable across different applications."
|
|
7340
|
+
) }),
|
|
7341
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
|
|
7342
|
+
"To get started with customization, first secure your .vet domain name. Once you have a domain, you can add a profile image that will be visible wherever you use your account."
|
|
7343
|
+
) }),
|
|
7344
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
|
|
7345
|
+
"Changing your domain name will update also your profile image."
|
|
7346
|
+
) })
|
|
7347
|
+
] }),
|
|
7348
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7349
|
+
react.Button,
|
|
7350
|
+
{
|
|
7351
|
+
mt: 0,
|
|
7352
|
+
variant: "link",
|
|
7353
|
+
size: "sm",
|
|
7354
|
+
onClick: () => setShowFullText(!showFullText),
|
|
7355
|
+
color: "blue.500",
|
|
7356
|
+
textAlign: "left",
|
|
7357
|
+
children: t(showFullText ? "Show Less" : "Read More")
|
|
7358
|
+
}
|
|
7359
|
+
)
|
|
7360
|
+
]
|
|
7361
|
+
}
|
|
7362
|
+
),
|
|
7363
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7364
|
+
ActionButton,
|
|
7365
|
+
{
|
|
7366
|
+
style: {
|
|
7367
|
+
mt: 3
|
|
7368
|
+
},
|
|
7369
|
+
title: account?.domain ? account?.domain : t("Choose account name"),
|
|
7370
|
+
description: t(
|
|
7371
|
+
"Choose a unique .vet domain name for your account."
|
|
7372
|
+
),
|
|
7373
|
+
onClick: () => {
|
|
7374
|
+
if (account?.domain) {
|
|
7375
|
+
setCurrentContent({
|
|
7376
|
+
type: "choose-name-search",
|
|
7377
|
+
props: {
|
|
7378
|
+
name: "",
|
|
7379
|
+
setCurrentContent
|
|
7380
|
+
}
|
|
7381
|
+
});
|
|
7382
|
+
} else {
|
|
7383
|
+
setCurrentContent("choose-name");
|
|
7384
|
+
}
|
|
7385
|
+
},
|
|
7386
|
+
leftIcon: fa.FaRegAddressCard,
|
|
7387
|
+
rightIcon: md.MdOutlineNavigateNext
|
|
7388
|
+
}
|
|
7389
|
+
),
|
|
7390
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7391
|
+
ActionButton,
|
|
7392
|
+
{
|
|
7393
|
+
title: t("Update profile image"),
|
|
7394
|
+
description: t(
|
|
7395
|
+
!account?.domain ? "You can change your profile image only after you setup your domain name." : "Customize your account by adding a profile image, which will be displayed on the apps you use."
|
|
7396
|
+
),
|
|
7397
|
+
onClick: () => fileInputRef.current?.click(),
|
|
7398
|
+
leftImage: account?.image,
|
|
7399
|
+
isLoading: isUploading || isProcessing,
|
|
7400
|
+
isDisabled: !account?.domain,
|
|
7401
|
+
loadingText: isUploading ? t("Uploading image") : t("Setting image")
|
|
7402
|
+
}
|
|
7403
|
+
),
|
|
7404
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7405
|
+
"input",
|
|
7406
|
+
{
|
|
7407
|
+
type: "file",
|
|
7408
|
+
ref: fileInputRef,
|
|
7409
|
+
hidden: true,
|
|
7410
|
+
accept: "image/*",
|
|
7411
|
+
onChange: async (event) => await handleImageUpload(event)
|
|
7412
|
+
}
|
|
7413
|
+
)
|
|
7414
|
+
] }) })
|
|
7415
|
+
] });
|
|
7416
|
+
};
|
|
7417
|
+
var NetworkInfo = () => {
|
|
7418
|
+
const { t } = reactI18next.useTranslation();
|
|
7419
|
+
const { darkMode: isDark, network } = useVeChainKitConfig();
|
|
7420
|
+
const { connection, smartAccount } = useWallet();
|
|
7421
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7422
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
7423
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
7424
|
+
t("Connection Type"),
|
|
7425
|
+
":"
|
|
7426
|
+
] }),
|
|
7427
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.source.type })
|
|
7428
|
+
] }),
|
|
7429
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
7430
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
7431
|
+
t("Network"),
|
|
7432
|
+
":"
|
|
7433
|
+
] }),
|
|
7434
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.type })
|
|
7435
|
+
] }),
|
|
7436
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
7437
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
7438
|
+
t("Node URL"),
|
|
7439
|
+
":"
|
|
7440
|
+
] }),
|
|
7441
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || chunkEO3CLT4E_cjs.getConfig(network.type).nodeUrl })
|
|
7442
|
+
] }),
|
|
7443
|
+
connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
7444
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
7445
|
+
t("Smart Account"),
|
|
7446
|
+
":"
|
|
7447
|
+
] }),
|
|
7448
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
|
|
7449
|
+
] }) : smartAccount.isDeployed && /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
7450
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7451
|
+
react.Text,
|
|
7452
|
+
{
|
|
7453
|
+
fontSize: "sm",
|
|
7454
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
7455
|
+
children: [
|
|
7456
|
+
t("Smart Account"),
|
|
7457
|
+
":"
|
|
7458
|
+
]
|
|
7459
|
+
}
|
|
7460
|
+
),
|
|
7461
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7462
|
+
react.Text,
|
|
7463
|
+
{
|
|
7464
|
+
fontSize: "sm",
|
|
7465
|
+
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
7466
|
+
children: smartAccount.version ? `v${smartAccount.version}` : "v1"
|
|
7467
|
+
}
|
|
7468
|
+
)
|
|
7469
|
+
] }),
|
|
7470
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
7471
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
7472
|
+
t("VeChain Kit"),
|
|
7473
|
+
":"
|
|
7474
|
+
] }),
|
|
7475
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: package_default.version })
|
|
7476
|
+
] })
|
|
7477
|
+
] });
|
|
7478
|
+
};
|
|
7479
|
+
var CrossAppConnectionCard = ({ connectionCache }) => {
|
|
7480
|
+
const { t } = reactI18next.useTranslation();
|
|
7481
|
+
const { darkMode: isDark } = useVeChainKitConfig();
|
|
7482
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: connectionCache.ecosystemApp && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7483
|
+
react.VStack,
|
|
7484
|
+
{
|
|
7485
|
+
p: 4,
|
|
7486
|
+
bg: isDark ? "#1a1a1a" : "#f5f5f5",
|
|
7487
|
+
borderRadius: "xl",
|
|
7488
|
+
spacing: 4,
|
|
7489
|
+
w: "full",
|
|
7490
|
+
children: [
|
|
7491
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
7492
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7493
|
+
react.Text,
|
|
6954
7494
|
{
|
|
6955
7495
|
fontSize: "sm",
|
|
6956
7496
|
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
@@ -7126,14 +7666,13 @@ var WalletSecuredBy = () => {
|
|
|
7126
7666
|
};
|
|
7127
7667
|
var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
7128
7668
|
const { t } = reactI18next.useTranslation();
|
|
7129
|
-
const
|
|
7130
|
-
const
|
|
7131
|
-
const { exportWallet } = reactAuth.usePrivy();
|
|
7669
|
+
const { connectedWallet, connection } = useWallet();
|
|
7670
|
+
const [showFullText, setShowFullText] = React8.useState(false);
|
|
7132
7671
|
const walletImage = chunkEO3CLT4E_cjs.getPicassoImage(connectedWallet?.address ?? "");
|
|
7133
7672
|
const { getConnectionCache } = useCrossAppConnectionCache();
|
|
7134
|
-
const { darkMode: isDark } = useVeChainKitConfig();
|
|
7135
|
-
const { connection } = useWallet();
|
|
7136
7673
|
const connectionCache = getConnectionCache();
|
|
7674
|
+
const { darkMode: isDark } = useVeChainKitConfig();
|
|
7675
|
+
const { exportWallet } = reactAuth.usePrivy();
|
|
7137
7676
|
return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
|
|
7138
7677
|
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
7139
7678
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7143,13 +7682,13 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
|
7143
7682
|
fontWeight: "500",
|
|
7144
7683
|
textAlign: "center",
|
|
7145
7684
|
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
7146
|
-
children: t("Embedded
|
|
7685
|
+
children: t("Embedded wallet")
|
|
7147
7686
|
}
|
|
7148
7687
|
),
|
|
7149
7688
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7150
7689
|
ModalBackButton,
|
|
7151
7690
|
{
|
|
7152
|
-
onClick: () => setCurrentContent("
|
|
7691
|
+
onClick: () => setCurrentContent("access-and-security")
|
|
7153
7692
|
}
|
|
7154
7693
|
),
|
|
7155
7694
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
|
|
@@ -7247,278 +7786,8 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
|
7247
7786
|
" ",
|
|
7248
7787
|
t(
|
|
7249
7788
|
"to learn more about embedded wallets."
|
|
7250
|
-
)
|
|
7251
|
-
] })
|
|
7252
|
-
] }),
|
|
7253
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7254
|
-
react.Button,
|
|
7255
|
-
{
|
|
7256
|
-
mt: 0,
|
|
7257
|
-
variant: "link",
|
|
7258
|
-
size: "sm",
|
|
7259
|
-
onClick: () => setShowFullText(!showFullText),
|
|
7260
|
-
color: "blue.500",
|
|
7261
|
-
textAlign: "left",
|
|
7262
|
-
children: t(showFullText ? "Show Less" : "Read More")
|
|
7263
|
-
}
|
|
7264
|
-
)
|
|
7265
|
-
] }),
|
|
7266
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7267
|
-
ActionButton,
|
|
7268
|
-
{
|
|
7269
|
-
title: t("Backup your wallet"),
|
|
7270
|
-
description: t(
|
|
7271
|
-
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."
|
|
7272
|
-
),
|
|
7273
|
-
onClick: () => {
|
|
7274
|
-
exportWallet();
|
|
7275
|
-
},
|
|
7276
|
-
isDisabled: !connection.isConnectedWithSocialLogin,
|
|
7277
|
-
leftIcon: gi.GiHouseKeys,
|
|
7278
|
-
rightIcon: md.MdOutlineNavigateNext
|
|
7279
|
-
}
|
|
7280
|
-
),
|
|
7281
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7282
|
-
ActionButton,
|
|
7283
|
-
{
|
|
7284
|
-
title: t("Login methods"),
|
|
7285
|
-
description: t(
|
|
7286
|
-
connection.isConnectedWithSocialLogin ? "View and manage the login methods linked to your wallet." : "Login methods can be managed only in the app securing your wallet."
|
|
7287
|
-
),
|
|
7288
|
-
onClick: () => {
|
|
7289
|
-
setCurrentContent("privy-linked-accounts");
|
|
7290
|
-
},
|
|
7291
|
-
isDisabled: !connection.isConnectedWithSocialLogin,
|
|
7292
|
-
leftIcon: md.MdManageAccounts,
|
|
7293
|
-
rightIcon: md.MdOutlineNavigateNext
|
|
7294
|
-
}
|
|
7295
|
-
)
|
|
7296
|
-
]
|
|
7297
|
-
}
|
|
7298
|
-
) }),
|
|
7299
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "full", children: [
|
|
7300
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
|
|
7301
|
-
connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(WalletSecuredBy, {})
|
|
7302
|
-
] }) })
|
|
7303
|
-
] });
|
|
7304
|
-
};
|
|
7305
|
-
var WalletSettingsContent = ({
|
|
7306
|
-
setCurrentContent,
|
|
7307
|
-
onLogoutSuccess
|
|
7308
|
-
}) => {
|
|
7309
|
-
const contentRef = React9.useRef(null);
|
|
7310
|
-
const { t } = reactI18next.useTranslation();
|
|
7311
|
-
const { privy, darkMode: isDark, network } = useVeChainKitConfig();
|
|
7312
|
-
const { connection, disconnect, account } = useWallet();
|
|
7313
|
-
const { getConnectionCache } = useCrossAppConnectionCache();
|
|
7314
|
-
const connectionCache = getConnectionCache();
|
|
7315
|
-
const { data: appInfo } = useFetchAppInfo(privy?.appId ?? "");
|
|
7316
|
-
React9.useEffect(() => {
|
|
7317
|
-
if (contentRef.current) {
|
|
7318
|
-
contentRef.current.scrollTop = 0;
|
|
7319
|
-
}
|
|
7320
|
-
}, []);
|
|
7321
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
|
|
7322
|
-
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
7323
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7324
|
-
react.ModalHeader,
|
|
7325
|
-
{
|
|
7326
|
-
fontSize: "md",
|
|
7327
|
-
fontWeight: "500",
|
|
7328
|
-
textAlign: "center",
|
|
7329
|
-
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
7330
|
-
children: t("Settings")
|
|
7331
|
-
}
|
|
7332
|
-
),
|
|
7333
|
-
/* @__PURE__ */ jsxRuntime.jsx(ModalBackButton, { onClick: () => setCurrentContent("main") }),
|
|
7334
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
|
|
7335
|
-
] }),
|
|
7336
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.ModalBody, { w: "full", children: [
|
|
7337
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { justify: "center", children: [
|
|
7338
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7339
|
-
react.Image,
|
|
7340
|
-
{
|
|
7341
|
-
src: account?.image,
|
|
7342
|
-
maxW: "100px",
|
|
7343
|
-
borderRadius: "50%"
|
|
7344
|
-
}
|
|
7345
|
-
),
|
|
7346
|
-
/* @__PURE__ */ jsxRuntime.jsx(AddressDisplay, { wallet: account }),
|
|
7347
|
-
network.type !== "main" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7348
|
-
react.Tag,
|
|
7349
|
-
{
|
|
7350
|
-
size: "sm",
|
|
7351
|
-
colorScheme: "blue",
|
|
7352
|
-
width: "fit-content",
|
|
7353
|
-
justifyContent: "center",
|
|
7354
|
-
padding: "10px",
|
|
7355
|
-
children: network.type === "test" ? t("Testnet") : t("Unknown")
|
|
7356
|
-
}
|
|
7357
|
-
)
|
|
7358
|
-
] }),
|
|
7359
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { mt: 10, w: "full", spacing: 3, children: [
|
|
7360
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7361
|
-
ActionButton,
|
|
7362
|
-
{
|
|
7363
|
-
title: t("Connection Details"),
|
|
7364
|
-
description: t(
|
|
7365
|
-
"View the details of your connection to this app."
|
|
7366
|
-
),
|
|
7367
|
-
onClick: () => {
|
|
7368
|
-
setCurrentContent("connection-details");
|
|
7369
|
-
},
|
|
7370
|
-
leftIcon: vsc.VscDebugDisconnect,
|
|
7371
|
-
rightIcon: md.MdOutlineNavigateNext
|
|
7372
|
-
}
|
|
7373
|
-
),
|
|
7374
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7375
|
-
ActionButton,
|
|
7376
|
-
{
|
|
7377
|
-
title: t("Customize account"),
|
|
7378
|
-
description: t(
|
|
7379
|
-
"Customize your account with a nickname and a picture to easily identify it."
|
|
7380
|
-
),
|
|
7381
|
-
onClick: () => {
|
|
7382
|
-
setCurrentContent("account-customization");
|
|
7383
|
-
},
|
|
7384
|
-
leftIcon: gi.GiPaintBrush,
|
|
7385
|
-
rightIcon: md.MdOutlineNavigateNext
|
|
7386
|
-
}
|
|
7387
|
-
),
|
|
7388
|
-
connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7389
|
-
ActionButton,
|
|
7390
|
-
{
|
|
7391
|
-
title: t("Embedded Wallet"),
|
|
7392
|
-
description: t(
|
|
7393
|
-
"Manage your embedded wallet security settings or back it up to a new device."
|
|
7394
|
-
),
|
|
7395
|
-
onClick: () => {
|
|
7396
|
-
setCurrentContent("embedded-wallet");
|
|
7397
|
-
},
|
|
7398
|
-
leftIcon: hi2.HiOutlineWallet,
|
|
7399
|
-
rightIcon: md.MdOutlineNavigateNext
|
|
7400
|
-
}
|
|
7401
|
-
),
|
|
7402
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7403
|
-
ActionButton,
|
|
7404
|
-
{
|
|
7405
|
-
title: t("FAQs"),
|
|
7406
|
-
description: t(
|
|
7407
|
-
"Still have some doubts? Check out our FAQs and learn more.",
|
|
7408
|
-
{
|
|
7409
|
-
appName: connection.isConnectedWithCrossApp ? connectionCache?.ecosystemApp?.name : Object.values(appInfo ?? {})[0]?.name ?? ""
|
|
7410
|
-
}
|
|
7411
|
-
),
|
|
7412
|
-
onClick: () => setCurrentContent("faq"),
|
|
7413
|
-
leftIcon: bs.BsQuestionCircle,
|
|
7414
|
-
rightIcon: md.MdOutlineNavigateNext
|
|
7415
|
-
}
|
|
7416
|
-
)
|
|
7417
|
-
] })
|
|
7418
|
-
] }),
|
|
7419
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7420
|
-
react.Button,
|
|
7421
|
-
{
|
|
7422
|
-
onClick: () => {
|
|
7423
|
-
disconnect();
|
|
7424
|
-
onLogoutSuccess();
|
|
7425
|
-
},
|
|
7426
|
-
variant: "vechainKitSecondary",
|
|
7427
|
-
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(ri.RiLogoutBoxLine, { color: "#888888" }),
|
|
7428
|
-
children: t("Logout")
|
|
7429
|
-
}
|
|
7430
|
-
) })
|
|
7431
|
-
] });
|
|
7432
|
-
};
|
|
7433
|
-
var AccountCustomizationContent = ({ setCurrentContent }) => {
|
|
7434
|
-
const { t } = reactI18next.useTranslation();
|
|
7435
|
-
const { network, darkMode: isDark } = useVeChainKitConfig();
|
|
7436
|
-
const { account } = useWallet();
|
|
7437
|
-
const fileInputRef = React9.useRef(null);
|
|
7438
|
-
const [isUploading, setIsUploading] = React9.useState(false);
|
|
7439
|
-
const [isProcessing, setIsProcessing] = React9.useState(false);
|
|
7440
|
-
const [showFullText, setShowFullText] = React9.useState(false);
|
|
7441
|
-
const queryClient = reactQuery.useQueryClient();
|
|
7442
|
-
const { onUpload } = useSingleImageUpload({
|
|
7443
|
-
compressImage: true
|
|
7444
|
-
});
|
|
7445
|
-
const { updateAvatar } = useUpdateAvatarRecord({
|
|
7446
|
-
onSuccess: async () => {
|
|
7447
|
-
await queryClient.invalidateQueries({
|
|
7448
|
-
queryKey: getAvatarQueryKey(account?.domain ?? "")
|
|
7449
|
-
});
|
|
7450
|
-
await queryClient.refetchQueries({
|
|
7451
|
-
queryKey: getAvatarQueryKey(account?.domain ?? "")
|
|
7452
|
-
});
|
|
7453
|
-
setIsProcessing(false);
|
|
7454
|
-
},
|
|
7455
|
-
onError: () => {
|
|
7456
|
-
setIsProcessing(false);
|
|
7457
|
-
}
|
|
7458
|
-
});
|
|
7459
|
-
const handleImageUpload = async (event) => {
|
|
7460
|
-
const file = event.target.files?.[0];
|
|
7461
|
-
if (!file) return;
|
|
7462
|
-
try {
|
|
7463
|
-
setIsUploading(true);
|
|
7464
|
-
setIsProcessing(true);
|
|
7465
|
-
const uploadedImage = await onUpload(file);
|
|
7466
|
-
if (!uploadedImage) throw new Error("Failed to compress image");
|
|
7467
|
-
const ipfsHash = await chunkEO3CLT4E_cjs.uploadBlobToIPFS(
|
|
7468
|
-
uploadedImage.file,
|
|
7469
|
-
file.name,
|
|
7470
|
-
network.type
|
|
7471
|
-
);
|
|
7472
|
-
await updateAvatar(account?.domain ?? "", "ipfs://" + ipfsHash);
|
|
7473
|
-
} catch (error) {
|
|
7474
|
-
console.error("Error uploading image:", error);
|
|
7475
|
-
setIsProcessing(false);
|
|
7476
|
-
} finally {
|
|
7477
|
-
setIsUploading(false);
|
|
7478
|
-
}
|
|
7479
|
-
};
|
|
7480
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7481
|
-
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
7482
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7483
|
-
react.ModalHeader,
|
|
7484
|
-
{
|
|
7485
|
-
fontSize: "md",
|
|
7486
|
-
fontWeight: "500",
|
|
7487
|
-
textAlign: "center",
|
|
7488
|
-
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
7489
|
-
children: t("Customize Account")
|
|
7490
|
-
}
|
|
7491
|
-
),
|
|
7492
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7493
|
-
ModalBackButton,
|
|
7494
|
-
{
|
|
7495
|
-
onClick: () => setCurrentContent("settings")
|
|
7496
|
-
}
|
|
7497
|
-
),
|
|
7498
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
|
|
7499
|
-
] }),
|
|
7500
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 3, align: "center", children: [
|
|
7501
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7502
|
-
react.VStack,
|
|
7503
|
-
{
|
|
7504
|
-
spacing: 3,
|
|
7505
|
-
w: "full",
|
|
7506
|
-
justifyContent: "flex-start",
|
|
7507
|
-
alignItems: "flex-start",
|
|
7508
|
-
children: [
|
|
7509
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
|
|
7510
|
-
"Customize your account with a unique .vet domain name and profile image to enhance your identity across VeChain applications."
|
|
7511
|
-
) }),
|
|
7512
|
-
showFullText && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7513
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
|
|
7514
|
-
"Your customizations are linked to your .vet domain name, making them portable across different applications."
|
|
7515
|
-
) }),
|
|
7516
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
|
|
7517
|
-
"To get started with customization, first secure your .vet domain name. Once you have a domain, you can add a profile image that will be visible wherever you use your account."
|
|
7518
|
-
) }),
|
|
7519
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
|
|
7520
|
-
"Changing your domain name will update also your profile image."
|
|
7521
|
-
) })
|
|
7789
|
+
)
|
|
7790
|
+
] })
|
|
7522
7791
|
] }),
|
|
7523
7792
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7524
7793
|
react.Button,
|
|
@@ -7532,60 +7801,27 @@ var AccountCustomizationContent = ({ setCurrentContent }) => {
|
|
|
7532
7801
|
children: t(showFullText ? "Show Less" : "Read More")
|
|
7533
7802
|
}
|
|
7534
7803
|
)
|
|
7535
|
-
]
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
onClick: () => {
|
|
7549
|
-
if (account?.domain) {
|
|
7550
|
-
setCurrentContent({
|
|
7551
|
-
type: "choose-name-search",
|
|
7552
|
-
props: {
|
|
7553
|
-
name: "",
|
|
7554
|
-
setCurrentContent
|
|
7555
|
-
}
|
|
7556
|
-
});
|
|
7557
|
-
} else {
|
|
7558
|
-
setCurrentContent("choose-name");
|
|
7804
|
+
] }),
|
|
7805
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7806
|
+
ActionButton,
|
|
7807
|
+
{
|
|
7808
|
+
title: t("Backup your wallet"),
|
|
7809
|
+
description: t(
|
|
7810
|
+
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."
|
|
7811
|
+
),
|
|
7812
|
+
onClick: () => {
|
|
7813
|
+
exportWallet();
|
|
7814
|
+
},
|
|
7815
|
+
isDisabled: !connection.isConnectedWithSocialLogin,
|
|
7816
|
+
leftIcon: gi.GiHouseKeys
|
|
7559
7817
|
}
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7566
|
-
|
|
7567
|
-
{
|
|
7568
|
-
title: t("Update profile image"),
|
|
7569
|
-
description: t(
|
|
7570
|
-
!account?.domain ? "You can change your profile image only after you setup your domain name." : "Customize your account by adding a profile image, which will be displayed on the apps you use."
|
|
7571
|
-
),
|
|
7572
|
-
onClick: () => fileInputRef.current?.click(),
|
|
7573
|
-
leftImage: account?.image,
|
|
7574
|
-
isLoading: isUploading || isProcessing,
|
|
7575
|
-
isDisabled: !account?.domain,
|
|
7576
|
-
loadingText: isUploading ? t("Uploading image") : t("Setting image")
|
|
7577
|
-
}
|
|
7578
|
-
),
|
|
7579
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7580
|
-
"input",
|
|
7581
|
-
{
|
|
7582
|
-
type: "file",
|
|
7583
|
-
ref: fileInputRef,
|
|
7584
|
-
hidden: true,
|
|
7585
|
-
accept: "image/*",
|
|
7586
|
-
onChange: async (event) => await handleImageUpload(event)
|
|
7587
|
-
}
|
|
7588
|
-
)
|
|
7818
|
+
)
|
|
7819
|
+
]
|
|
7820
|
+
}
|
|
7821
|
+
) }),
|
|
7822
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "full", children: [
|
|
7823
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
|
|
7824
|
+
connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(WalletSecuredBy, {})
|
|
7589
7825
|
] }) })
|
|
7590
7826
|
] });
|
|
7591
7827
|
};
|
|
@@ -7596,7 +7832,7 @@ var SelectTokenContent = ({ onSelectToken, onBack }) => {
|
|
|
7596
7832
|
const { balances, prices } = useBalances({
|
|
7597
7833
|
address: account?.address ?? ""
|
|
7598
7834
|
});
|
|
7599
|
-
const [searchQuery, setSearchQuery] =
|
|
7835
|
+
const [searchQuery, setSearchQuery] = React8.useState("");
|
|
7600
7836
|
const { network } = useVeChainKitConfig();
|
|
7601
7837
|
const tokens = [
|
|
7602
7838
|
{
|
|
@@ -7732,23 +7968,23 @@ var SendTokenContent = ({
|
|
|
7732
7968
|
}) => {
|
|
7733
7969
|
const { t } = reactI18next.useTranslation();
|
|
7734
7970
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
7735
|
-
const [toAddressOrDomain, setToAddress] =
|
|
7736
|
-
const [amount, setAmount] =
|
|
7737
|
-
const [error, setError] =
|
|
7738
|
-
const [isSelectingToken, setIsSelectingToken] =
|
|
7971
|
+
const [toAddressOrDomain, setToAddress] = React8.useState("");
|
|
7972
|
+
const [amount, setAmount] = React8.useState("");
|
|
7973
|
+
const [error, setError] = React8.useState(null);
|
|
7974
|
+
const [isSelectingToken, setIsSelectingToken] = React8.useState(
|
|
7739
7975
|
isNavigatingFromMain && !preselectedToken
|
|
7740
7976
|
);
|
|
7741
|
-
const [selectedToken, setSelectedToken] =
|
|
7977
|
+
const [selectedToken, setSelectedToken] = React8.useState(
|
|
7742
7978
|
preselectedToken ?? null
|
|
7743
7979
|
);
|
|
7744
|
-
const [addressError, setAddressError] =
|
|
7745
|
-
const [isInitialTokenSelection, setIsInitialTokenSelection] =
|
|
7980
|
+
const [addressError, setAddressError] = React8.useState(null);
|
|
7981
|
+
const [isInitialTokenSelection, setIsInitialTokenSelection] = React8.useState(isNavigatingFromMain);
|
|
7746
7982
|
const {
|
|
7747
7983
|
domain: resolvedDomain,
|
|
7748
7984
|
address: resolvedAddress,
|
|
7749
7985
|
isLoading: isLoadingDomain
|
|
7750
7986
|
} = dappKitReact.useVechainDomain({ addressOrDomain: toAddressOrDomain });
|
|
7751
|
-
const validateAddress =
|
|
7987
|
+
const validateAddress = React8.useCallback(
|
|
7752
7988
|
(value) => {
|
|
7753
7989
|
if (!value) {
|
|
7754
7990
|
setAddressError(t("Address is required"));
|
|
@@ -8060,6 +8296,14 @@ var SendTokenSummaryContent = ({
|
|
|
8060
8296
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
8061
8297
|
const { account, connection } = useWallet();
|
|
8062
8298
|
const transactionModal = react.useDisclosure();
|
|
8299
|
+
const { data: avatar } = useGetAvatar(resolvedDomain);
|
|
8300
|
+
const { network } = useVeChainKitConfig();
|
|
8301
|
+
const toImageSrc = React8.useMemo(() => {
|
|
8302
|
+
if (avatar) {
|
|
8303
|
+
return chunkEO3CLT4E_cjs.convertUriToUrl(avatar, network.type);
|
|
8304
|
+
}
|
|
8305
|
+
return chunkEO3CLT4E_cjs.getPicassoImage(resolvedAddress || toAddressOrDomain);
|
|
8306
|
+
}, [avatar, network.type, resolvedAddress, toAddressOrDomain]);
|
|
8063
8307
|
const transferERC20 = useTransferERC20({
|
|
8064
8308
|
fromAddress: account?.address ?? "",
|
|
8065
8309
|
receiverAddress: resolvedAddress || toAddressOrDomain,
|
|
@@ -8111,20 +8355,7 @@ var SendTokenSummaryContent = ({
|
|
|
8111
8355
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
|
|
8112
8356
|
] }),
|
|
8113
8357
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 6, align: "stretch", w: "full", children: [
|
|
8114
|
-
connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.
|
|
8115
|
-
react.Alert,
|
|
8116
|
-
{
|
|
8117
|
-
status: "warning",
|
|
8118
|
-
fontSize: "xs",
|
|
8119
|
-
borderRadius: "xl",
|
|
8120
|
-
children: [
|
|
8121
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.AlertIcon, {}),
|
|
8122
|
-
t(
|
|
8123
|
-
"Sending to OceanX or other exchanges may result in loss of funds. Send the tokens to your VeWorld wallet first."
|
|
8124
|
-
)
|
|
8125
|
-
]
|
|
8126
|
-
}
|
|
8127
|
-
),
|
|
8358
|
+
connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(ExchangeWarningAlert, {}),
|
|
8128
8359
|
/* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 4, w: "full", children: [
|
|
8129
8360
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8130
8361
|
AddressDisplayCard,
|
|
@@ -8144,9 +8375,7 @@ var SendTokenSummaryContent = ({
|
|
|
8144
8375
|
label: t("To"),
|
|
8145
8376
|
address: resolvedAddress || toAddressOrDomain,
|
|
8146
8377
|
domain: resolvedDomain,
|
|
8147
|
-
imageSrc:
|
|
8148
|
-
resolvedAddress || toAddressOrDomain
|
|
8149
|
-
),
|
|
8378
|
+
imageSrc: toImageSrc ?? "",
|
|
8150
8379
|
imageAlt: "To account",
|
|
8151
8380
|
symbol: selectedToken.symbol
|
|
8152
8381
|
}
|
|
@@ -8390,6 +8619,123 @@ var ChooseNameContent = ({
|
|
|
8390
8619
|
] }) })
|
|
8391
8620
|
] });
|
|
8392
8621
|
};
|
|
8622
|
+
var ExistingDomainsList = ({
|
|
8623
|
+
domains,
|
|
8624
|
+
onDomainSelect,
|
|
8625
|
+
isLoading
|
|
8626
|
+
}) => {
|
|
8627
|
+
const { t } = reactI18next.useTranslation();
|
|
8628
|
+
const { darkMode: isDark } = useVeChainKitConfig();
|
|
8629
|
+
const { account, connection } = useWallet();
|
|
8630
|
+
if (domains.length === 0 || isLoading) {
|
|
8631
|
+
return null;
|
|
8632
|
+
}
|
|
8633
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Accordion, { allowToggle: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.AccordionItem, { border: "none", children: ({ isExpanded }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8634
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8635
|
+
react.AccordionButton,
|
|
8636
|
+
{
|
|
8637
|
+
bg: isDark ? "whiteAlpha.50" : "gray.50",
|
|
8638
|
+
borderRadius: "xl",
|
|
8639
|
+
_hover: {
|
|
8640
|
+
bg: isDark ? "whiteAlpha.100" : "gray.100"
|
|
8641
|
+
},
|
|
8642
|
+
opacity: isLoading ? 0.7 : 1,
|
|
8643
|
+
transition: "all 0.2s",
|
|
8644
|
+
disabled: isLoading,
|
|
8645
|
+
children: [
|
|
8646
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { flex: "1", textAlign: "left", py: 2, children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: "500", children: isLoading ? t("Loading your domains...") : `${t("Your existing domains")} (${domains.length})` }) }),
|
|
8647
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8648
|
+
react.Icon,
|
|
8649
|
+
{
|
|
8650
|
+
as: isExpanded ? io5.IoChevronUp : io5.IoChevronDown,
|
|
8651
|
+
fontSize: "20px",
|
|
8652
|
+
opacity: 0.5
|
|
8653
|
+
}
|
|
8654
|
+
)
|
|
8655
|
+
]
|
|
8656
|
+
}
|
|
8657
|
+
),
|
|
8658
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AccordionPanel, { pb: 4, pt: 2, children: /* @__PURE__ */ jsxRuntime.jsx(react.List, { spacing: 2, children: domains.map((domain) => {
|
|
8659
|
+
const isCurrentDomain = domain.name === account?.domain;
|
|
8660
|
+
const metadata = useWalletMetadata(
|
|
8661
|
+
domain.name,
|
|
8662
|
+
connection.network
|
|
8663
|
+
);
|
|
8664
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8665
|
+
react.ListItem,
|
|
8666
|
+
{
|
|
8667
|
+
p: 4,
|
|
8668
|
+
bg: isDark ? "#1f1f1e" : "white",
|
|
8669
|
+
borderRadius: "xl",
|
|
8670
|
+
cursor: isCurrentDomain ? "default" : "pointer",
|
|
8671
|
+
opacity: isCurrentDomain ? 0.7 : 1,
|
|
8672
|
+
border: `1px solid ${isDark ? "#2d2d2d" : "#eaeaea"}`,
|
|
8673
|
+
_hover: {
|
|
8674
|
+
bg: isCurrentDomain ? isDark ? "#1f1f1e" : "white" : isDark ? "#252525" : "gray.50",
|
|
8675
|
+
borderColor: isDark ? "#3d3d3d" : "#dedede"
|
|
8676
|
+
},
|
|
8677
|
+
onClick: () => !isCurrentDomain && onDomainSelect(domain.name),
|
|
8678
|
+
transition: "all 0.2s",
|
|
8679
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { spacing: 3, align: "center", children: [
|
|
8680
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8681
|
+
AccountAvatar,
|
|
8682
|
+
{
|
|
8683
|
+
props: {
|
|
8684
|
+
width: "40px",
|
|
8685
|
+
height: "40px",
|
|
8686
|
+
src: metadata.image,
|
|
8687
|
+
alt: domain.name
|
|
8688
|
+
}
|
|
8689
|
+
}
|
|
8690
|
+
),
|
|
8691
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8692
|
+
react.VStack,
|
|
8693
|
+
{
|
|
8694
|
+
align: "start",
|
|
8695
|
+
spacing: 0,
|
|
8696
|
+
flex: 1,
|
|
8697
|
+
children: [
|
|
8698
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8699
|
+
react.Text,
|
|
8700
|
+
{
|
|
8701
|
+
color: isDark ? "whiteAlpha.900" : "gray.700",
|
|
8702
|
+
fontSize: "md",
|
|
8703
|
+
fontWeight: "500",
|
|
8704
|
+
children: domain.name
|
|
8705
|
+
}
|
|
8706
|
+
),
|
|
8707
|
+
isCurrentDomain && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8708
|
+
react.Text,
|
|
8709
|
+
{
|
|
8710
|
+
fontSize: "sm",
|
|
8711
|
+
color: isDark ? "whiteAlpha.600" : "gray.500",
|
|
8712
|
+
children: t(
|
|
8713
|
+
"Current domain"
|
|
8714
|
+
)
|
|
8715
|
+
}
|
|
8716
|
+
)
|
|
8717
|
+
]
|
|
8718
|
+
}
|
|
8719
|
+
),
|
|
8720
|
+
isCurrentDomain && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8721
|
+
react.Tag,
|
|
8722
|
+
{
|
|
8723
|
+
size: "sm",
|
|
8724
|
+
bg: isDark ? "whiteAlpha.200" : "gray.100",
|
|
8725
|
+
color: isDark ? "whiteAlpha.800" : "gray.600",
|
|
8726
|
+
px: 3,
|
|
8727
|
+
py: 1,
|
|
8728
|
+
borderRadius: "full",
|
|
8729
|
+
children: t("Current")
|
|
8730
|
+
}
|
|
8731
|
+
)
|
|
8732
|
+
] })
|
|
8733
|
+
},
|
|
8734
|
+
domain.name
|
|
8735
|
+
);
|
|
8736
|
+
}) }) })
|
|
8737
|
+
] }) }) });
|
|
8738
|
+
};
|
|
8393
8739
|
var ChooseNameSearchContent = ({
|
|
8394
8740
|
name: initialName,
|
|
8395
8741
|
setCurrentContent
|
|
@@ -8397,11 +8743,11 @@ var ChooseNameSearchContent = ({
|
|
|
8397
8743
|
const { t } = reactI18next.useTranslation();
|
|
8398
8744
|
const { account } = useWallet();
|
|
8399
8745
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
8400
|
-
const [name, setName] =
|
|
8401
|
-
const [error, setError] =
|
|
8402
|
-
const [isOwnDomain, setIsOwnDomain] =
|
|
8403
|
-
const [isAvailable, setIsAvailable] =
|
|
8404
|
-
const [hasInteracted, setHasInteracted] =
|
|
8746
|
+
const [name, setName] = React8.useState(initialName);
|
|
8747
|
+
const [error, setError] = React8.useState(null);
|
|
8748
|
+
const [isOwnDomain, setIsOwnDomain] = React8.useState(false);
|
|
8749
|
+
const [isAvailable, setIsAvailable] = React8.useState(false);
|
|
8750
|
+
const [hasInteracted, setHasInteracted] = React8.useState(false);
|
|
8405
8751
|
const { data: ensRecordExists, isLoading: isEnsCheckLoading } = useEnsRecordExists(name);
|
|
8406
8752
|
const { data: domainInfo, isLoading: isDomainInfoLoading } = useVechainDomain(`${name}.veworld.vet`);
|
|
8407
8753
|
const { data: isProtected, isLoading: isProtectedLoading } = useIsDomainProtected(name);
|
|
@@ -8419,7 +8765,7 @@ var ChooseNameSearchContent = ({
|
|
|
8419
8765
|
...veworldDomainsOfAddress?.domains || [],
|
|
8420
8766
|
...vetDomainsOfAddress?.domains || []
|
|
8421
8767
|
];
|
|
8422
|
-
|
|
8768
|
+
React8.useEffect(() => {
|
|
8423
8769
|
if (!hasInteracted) return;
|
|
8424
8770
|
if (name.length < 3) {
|
|
8425
8771
|
setError(t("Name must be at least 3 characters long"));
|
|
@@ -8500,104 +8846,69 @@ var ChooseNameSearchContent = ({
|
|
|
8500
8846
|
),
|
|
8501
8847
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
|
|
8502
8848
|
] }),
|
|
8503
|
-
/* @__PURE__ */ jsxRuntime.
|
|
8504
|
-
|
|
8849
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 4, align: "stretch", children: [
|
|
8850
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8851
|
+
ExistingDomainsList,
|
|
8852
|
+
{
|
|
8853
|
+
domains: allUserDomains,
|
|
8854
|
+
onDomainSelect: handleDomainSelect,
|
|
8855
|
+
isLoading: isLoadingOwnedDomains
|
|
8856
|
+
}
|
|
8857
|
+
),
|
|
8858
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.InputGroup, { size: "lg", children: [
|
|
8505
8859
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8506
|
-
react.
|
|
8860
|
+
react.Input,
|
|
8507
8861
|
{
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8862
|
+
placeholder: t("Enter your name"),
|
|
8863
|
+
value: name,
|
|
8864
|
+
onChange: (e) => {
|
|
8865
|
+
setName(e.target.value);
|
|
8866
|
+
if (!hasInteracted) setHasInteracted(true);
|
|
8867
|
+
},
|
|
8868
|
+
paddingRight: "120px",
|
|
8869
|
+
fontSize: "lg",
|
|
8870
|
+
height: "60px",
|
|
8871
|
+
bg: isDark ? "#1a1a1a" : "white",
|
|
8872
|
+
border: `1px solid ${isDark ? "#ffffff29" : "#ebebeb"}`,
|
|
8873
|
+
_hover: {
|
|
8874
|
+
border: `1px solid ${isDark ? "#ffffff40" : "#e0e0e0"}`
|
|
8875
|
+
},
|
|
8876
|
+
_focus: {
|
|
8877
|
+
border: `1px solid ${isDark ? "#ffffff60" : "#d0d0d0"}`,
|
|
8878
|
+
boxShadow: "none"
|
|
8879
|
+
},
|
|
8880
|
+
isInvalid: !!error
|
|
8512
8881
|
}
|
|
8513
8882
|
),
|
|
8514
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8515
|
-
|
|
8516
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8517
|
-
react.ListItem,
|
|
8518
|
-
{
|
|
8519
|
-
p: 3,
|
|
8520
|
-
bg: isDark ? "#1a1a1a" : "gray.50",
|
|
8521
|
-
borderRadius: "md",
|
|
8522
|
-
cursor: isCurrentDomain ? "default" : "pointer",
|
|
8523
|
-
opacity: isCurrentDomain ? 0.7 : 1,
|
|
8524
|
-
_hover: {
|
|
8525
|
-
bg: isCurrentDomain ? isDark ? "#1a1a1a" : "gray.50" : isDark ? "#252525" : "gray.100"
|
|
8526
|
-
},
|
|
8527
|
-
onClick: () => !isCurrentDomain && handleDomainSelect(domain.name),
|
|
8528
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "space-between", children: [
|
|
8529
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: domain.name }),
|
|
8530
|
-
isCurrentDomain && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8531
|
-
react.Tag,
|
|
8532
|
-
{
|
|
8533
|
-
size: "sm",
|
|
8534
|
-
colorScheme: "green",
|
|
8535
|
-
variant: "subtle",
|
|
8536
|
-
children: t("Current")
|
|
8537
|
-
}
|
|
8538
|
-
)
|
|
8539
|
-
] })
|
|
8540
|
-
},
|
|
8541
|
-
domain.name
|
|
8542
|
-
);
|
|
8543
|
-
}) })
|
|
8544
|
-
] }) : null,
|
|
8545
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 4, align: "stretch", children: [
|
|
8546
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.InputGroup, { size: "lg", children: [
|
|
8547
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8548
|
-
react.Input,
|
|
8549
|
-
{
|
|
8550
|
-
placeholder: t("Enter your name"),
|
|
8551
|
-
value: name,
|
|
8552
|
-
onChange: (e) => {
|
|
8553
|
-
setName(e.target.value);
|
|
8554
|
-
if (!hasInteracted) setHasInteracted(true);
|
|
8555
|
-
},
|
|
8556
|
-
paddingRight: "120px",
|
|
8557
|
-
fontSize: "lg",
|
|
8558
|
-
height: "60px",
|
|
8559
|
-
bg: isDark ? "#1a1a1a" : "white",
|
|
8560
|
-
border: `1px solid ${isDark ? "#ffffff29" : "#ebebeb"}`,
|
|
8561
|
-
_hover: {
|
|
8562
|
-
border: `1px solid ${isDark ? "#ffffff40" : "#e0e0e0"}`
|
|
8563
|
-
},
|
|
8564
|
-
_focus: {
|
|
8565
|
-
border: `1px solid ${isDark ? "#ffffff60" : "#d0d0d0"}`,
|
|
8566
|
-
boxShadow: "none"
|
|
8567
|
-
},
|
|
8568
|
-
isInvalid: !!error
|
|
8569
|
-
}
|
|
8570
|
-
),
|
|
8571
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8572
|
-
react.InputRightElement,
|
|
8573
|
-
{
|
|
8574
|
-
width: "auto",
|
|
8575
|
-
paddingRight: "12px",
|
|
8576
|
-
h: "full",
|
|
8577
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8578
|
-
react.Box,
|
|
8579
|
-
{
|
|
8580
|
-
mr: 4,
|
|
8581
|
-
fontSize: "sm",
|
|
8582
|
-
color: isDark ? "whiteAlpha.800" : "gray.500",
|
|
8583
|
-
children: ".veworld.vet"
|
|
8584
|
-
}
|
|
8585
|
-
)
|
|
8586
|
-
}
|
|
8587
|
-
)
|
|
8588
|
-
] }),
|
|
8589
|
-
error && hasInteracted && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { color: "red.500", fontSize: "sm", children: error }),
|
|
8590
|
-
!error && hasInteracted && name.length >= 3 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8591
|
-
react.Text,
|
|
8883
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8884
|
+
react.InputRightElement,
|
|
8592
8885
|
{
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
children:
|
|
8886
|
+
width: "auto",
|
|
8887
|
+
paddingRight: "12px",
|
|
8888
|
+
h: "full",
|
|
8889
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8890
|
+
react.Box,
|
|
8891
|
+
{
|
|
8892
|
+
mr: 4,
|
|
8893
|
+
fontSize: "sm",
|
|
8894
|
+
color: isDark ? "whiteAlpha.800" : "gray.500",
|
|
8895
|
+
children: ".veworld.vet"
|
|
8896
|
+
}
|
|
8897
|
+
)
|
|
8597
8898
|
}
|
|
8598
8899
|
)
|
|
8599
|
-
] })
|
|
8600
|
-
|
|
8900
|
+
] }),
|
|
8901
|
+
error && hasInteracted && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { color: "red.500", fontSize: "sm", children: error }),
|
|
8902
|
+
!error && hasInteracted && name.length >= 3 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8903
|
+
react.Text,
|
|
8904
|
+
{
|
|
8905
|
+
fontSize: "sm",
|
|
8906
|
+
color: isAvailable ? "green.500" : "red.500",
|
|
8907
|
+
fontWeight: "500",
|
|
8908
|
+
children: isOwnDomain ? t("YOU OWN THIS") : isAvailable ? t("AVAILABLE") : t("UNAVAILABLE")
|
|
8909
|
+
}
|
|
8910
|
+
)
|
|
8911
|
+
] }) }),
|
|
8601
8912
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8602
8913
|
react.Button,
|
|
8603
8914
|
{
|
|
@@ -8621,8 +8932,8 @@ var ConfirmationModalContent = ({
|
|
|
8621
8932
|
const { t } = reactI18next.useTranslation();
|
|
8622
8933
|
const { connection } = useWallet();
|
|
8623
8934
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
8624
|
-
const [showTimeout, setShowTimeout] =
|
|
8625
|
-
|
|
8935
|
+
const [showTimeout, setShowTimeout] = React8.useState(false);
|
|
8936
|
+
React8.useEffect(() => {
|
|
8626
8937
|
setShowTimeout(false);
|
|
8627
8938
|
const timer = setTimeout(() => {
|
|
8628
8939
|
setShowTimeout(true);
|
|
@@ -8809,8 +9120,8 @@ var LoadingModalContent = ({
|
|
|
8809
9120
|
const { network } = useVeChainKitConfig();
|
|
8810
9121
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
8811
9122
|
const explorerUrl = chunkEO3CLT4E_cjs.getConfig(network.type).explorerUrl;
|
|
8812
|
-
const [showTimeout, setShowTimeout] =
|
|
8813
|
-
|
|
9123
|
+
const [showTimeout, setShowTimeout] = React8.useState(false);
|
|
9124
|
+
React8.useEffect(() => {
|
|
8814
9125
|
const timer = setTimeout(() => {
|
|
8815
9126
|
setShowTimeout(true);
|
|
8816
9127
|
}, 12e3);
|
|
@@ -9021,7 +9332,7 @@ var TransactionModal = ({
|
|
|
9021
9332
|
txId,
|
|
9022
9333
|
progress
|
|
9023
9334
|
}) => {
|
|
9024
|
-
const modalContent =
|
|
9335
|
+
const modalContent = React8.useMemo(() => {
|
|
9025
9336
|
if (status === "pending")
|
|
9026
9337
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9027
9338
|
ConfirmationModalContent,
|
|
@@ -9202,7 +9513,7 @@ var ChooseNameSummaryContent = ({
|
|
|
9202
9513
|
var FAQAccordion = () => {
|
|
9203
9514
|
const { t } = reactI18next.useTranslation();
|
|
9204
9515
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
9205
|
-
const [searchQuery, setSearchQuery] =
|
|
9516
|
+
const [searchQuery, setSearchQuery] = React8.useState("");
|
|
9206
9517
|
const faqItems = [
|
|
9207
9518
|
{
|
|
9208
9519
|
question: t("What is VeChain?"),
|
|
@@ -9439,6 +9750,7 @@ var en_default = {
|
|
|
9439
9750
|
"Continue with Google": "Continue with Google",
|
|
9440
9751
|
"Copy your address or scan this QR code": "Copy your address or scan this QR code",
|
|
9441
9752
|
Current: "Current",
|
|
9753
|
+
"Current domain": "Current domain",
|
|
9442
9754
|
"Currently, multiclause transactions are not supported for smart accounts. Your multiclause transaction will be split into multiple transactions.": "Currently, multiclause transactions are not supported for smart accounts. Your multiclause transaction will be split into multiple transactions.",
|
|
9443
9755
|
"Customize Account": "Customize Account",
|
|
9444
9756
|
"Customize account": "Customize account",
|
|
@@ -9537,6 +9849,7 @@ var en_default = {
|
|
|
9537
9849
|
Passkey: "Passkey",
|
|
9538
9850
|
"Phone Number": "Phone Number",
|
|
9539
9851
|
"Please approve the request in the connection request window...": "Please approve the request in the connection request window...",
|
|
9852
|
+
"Please be sure to keep this wallet safe and backed up.": "Please be sure to keep this wallet safe and backed up.",
|
|
9540
9853
|
"Please check {{email}} for an email from privy.io and enter your code below.": "Please check {{email}} for an email from privy.io and enter your code below.",
|
|
9541
9854
|
"Please click 'Try again' to open the login window.": "Please click 'Try again' to open the login window.",
|
|
9542
9855
|
"Please complete the passkey authentication...": "Please complete the passkey authentication...",
|
|
@@ -9601,6 +9914,7 @@ var en_default = {
|
|
|
9601
9914
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} app or extension to manage your wallet and security settings.": "This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} app or extension to manage your wallet and security settings.",
|
|
9602
9915
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.": "This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.",
|
|
9603
9916
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your wallet and security settings.": "This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your wallet and security settings.",
|
|
9917
|
+
"This is your main wallet, created by {{element}} and secured by Privy.": "This is your main wallet, created by {{element}} and secured by Privy.",
|
|
9604
9918
|
"This is your main wallet, created by {{element}} and secured by Privy. This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions. Please be sure to keep it safe and backed up.": "This is your main wallet, created by {{element}} and secured by Privy. This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions. Please be sure to keep it safe and backed up.",
|
|
9605
9919
|
"This may take a few seconds. You can close this window and check the status later.": "This may take a few seconds. You can close this window and check the status later.",
|
|
9606
9920
|
"This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions.": "This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions.",
|
|
@@ -9689,8 +10003,19 @@ var en_default = {
|
|
|
9689
10003
|
"your@email.com": "your@email.com",
|
|
9690
10004
|
"{{element}} website": "{{element}} website",
|
|
9691
10005
|
"{{name}}": "{{name}}",
|
|
9692
|
-
"
|
|
9693
|
-
"
|
|
10006
|
+
"Sending to OceanX or other exchanges may result in loss of funds.": "Sending to OceanX or other exchanges may result in loss of funds.",
|
|
10007
|
+
"Send the tokens to your VeWorld wallet first.": "Send the tokens to your VeWorld wallet first.",
|
|
10008
|
+
"Sign in with a wallet from other x2earn apps.": "Sign in with a wallet from other x2earn apps.",
|
|
10009
|
+
"Select an app": "Select an app",
|
|
10010
|
+
Other: "Other",
|
|
10011
|
+
Apps: "Apps",
|
|
10012
|
+
"View your notifications and updates.": "View your notifications and updates.",
|
|
10013
|
+
"Access and security": "Access and security",
|
|
10014
|
+
"Connection details": "Connection details",
|
|
10015
|
+
"Customize profile": "Customize profile",
|
|
10016
|
+
Help: "Help",
|
|
10017
|
+
"Add Passkey": "Add Passkey",
|
|
10018
|
+
"Embedded wallet": "Embedded wallet"
|
|
9694
10019
|
};
|
|
9695
10020
|
|
|
9696
10021
|
// src/languages/de.json
|
|
@@ -9779,6 +10104,7 @@ var de_default = {
|
|
|
9779
10104
|
"Continue with Google": "Mit Google fortfahren",
|
|
9780
10105
|
"Copy your address or scan this QR code": "Kopieren Sie Ihre Adresse oder scannen Sie diesen QR-Code",
|
|
9781
10106
|
Current: "Aktuell",
|
|
10107
|
+
"Current domain": "Aktuelle Domain",
|
|
9782
10108
|
"Currently, multiclause transactions are not supported for smart accounts. Your multiclause transaction will be split into multiple transactions.": "Derzeit werden Multiclauses-Transaktionen f\xFCr Smart-Konten nicht unterst\xFCtzt. Ihre Multiclause-Transaktion wird in mehrere Transaktionen aufgeteilt.",
|
|
9783
10109
|
"Customize Account": "Konto anpassen",
|
|
9784
10110
|
"Customize account": "Konto anpassen",
|
|
@@ -9877,6 +10203,7 @@ var de_default = {
|
|
|
9877
10203
|
Passkey: "Passwort",
|
|
9878
10204
|
"Phone Number": "Telefonnummer",
|
|
9879
10205
|
"Please approve the request in the connection request window...": "Bitte genehmigen Sie die Anfrage im Verbindungsanfragefenster...",
|
|
10206
|
+
"Please be sure to keep this wallet safe and backed up.": "Bitte stellen Sie sicher, dass diese Brieftasche sicher und gesichert aufbewahrt wird.",
|
|
9880
10207
|
"Please check {{email}} for an email from privy.io and enter your code below.": "Bitte \xFCberpr\xFCfen Sie {{email}} auf eine E-Mail von privy.io und geben Sie Ihren Code unten ein.",
|
|
9881
10208
|
"Please click 'Try again' to open the login window.": "Bitte klicken Sie auf 'Erneut versuchen', um das Anmeldefenster zu \xF6ffnen.",
|
|
9882
10209
|
"Please complete the passkey authentication...": "Bitte schlie\xDFen Sie die Passworthauthentifizierung ab...",
|
|
@@ -9941,6 +10268,7 @@ var de_default = {
|
|
|
9941
10268
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} app or extension to manage your wallet and security settings.": "Dies ist Ihr Hauptwallet und Ihre Identit\xE4t. Bitte stellen Sie sicher, dass es sicher und gesichert ist. Gehen Sie zur {{element}} App oder Erweiterung, um Ihr Wallet und Ihre Sicherheitseinstellungen zu verwalten.",
|
|
9942
10269
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.": "Dies ist Ihr Hauptwallet und Ihre Identit\xE4t. Bitte achten Sie darauf, es sicher zu verwahren und ein Backup zu erstellen. Gehen Sie auf die {{element}} Website, um Ihre Anmeldemethoden und Sicherheitseinstellungen zu verwalten.",
|
|
9943
10270
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your wallet and security settings.": "Dies ist Ihre Hauptgeldb\xF6rse und Identit\xE4t. Bitte achten Sie darauf, sie sicher und abgesichert zu halten. Besuchen Sie die Website von {{element}}, um Ihre Geldb\xF6rse und Sicherheitseinstellungen zu verwalten.",
|
|
10271
|
+
"This is your main wallet, created by {{element}} and secured by Privy.": "Dies ist Ihre Hauptbrieftasche, erstellt von {{element}} und gesichert durch Privy.",
|
|
9944
10272
|
"This is your main wallet, created by {{element}} and secured by Privy. This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions. Please be sure to keep it safe and backed up.": "Dies ist Ihr Haupt-Wallet, erstellt von {{element}} und gesichert von Privy. Dieses Wallet ist der Besitzer Ihres Smart-Accounts, der als Ihre Identit\xE4t und als Tor f\xFCr Ihre Blockchain-Interaktionen verwendet wird. Bitte stellen Sie sicher, dass es sicher und gesichert ist.",
|
|
9945
10273
|
"This may take a few seconds. You can close this window and check the status later.": "Dies kann einige Sekunden dauern. Sie k\xF6nnen dieses Fenster schlie\xDFen und den Status sp\xE4ter \xFCberpr\xFCfen.",
|
|
9946
10274
|
"This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions.": "Dieses Wallet ist der Besitzer Ihres Smart-Accounts, der als Ihre Identit\xE4t und als Tor f\xFCr Ihre Blockchain-Interaktionen verwendet wird.",
|
|
@@ -10117,6 +10445,7 @@ var it_default = {
|
|
|
10117
10445
|
"Continue with Google": "Continua con Google",
|
|
10118
10446
|
"Copy your address or scan this QR code": "Copia il tuo indirizzo o scansiona questo codice QR",
|
|
10119
10447
|
Current: "Attuale",
|
|
10448
|
+
"Current domain": "Dominio attuale",
|
|
10120
10449
|
"Currently, multiclause transactions are not supported for smart accounts. Your multiclause transaction will be split into multiple transactions.": "Attualmente, le transazioni multiclausole non sono supportate per gli account smart. La tua transazione multiclausola sar\xE0 divisa in pi\xF9 transazioni.",
|
|
10121
10450
|
"Customize Account": "Personalizza Account",
|
|
10122
10451
|
"Customize account": "Personalizza account",
|
|
@@ -10215,6 +10544,7 @@ var it_default = {
|
|
|
10215
10544
|
Passkey: "Chiave di accesso",
|
|
10216
10545
|
"Phone Number": "Numero di telefono",
|
|
10217
10546
|
"Please approve the request in the connection request window...": "Si prega di approvare la richiesta nella finestra della richiesta di connessione...",
|
|
10547
|
+
"Please be sure to keep this wallet safe and backed up.": "Si prega di assicurarsi che questo portafoglio sia al sicuro e con un backup.",
|
|
10218
10548
|
"Please check {{email}} for an email from privy.io and enter your code below.": "Controlla {{email}} per un'email da privy.io e inserisci il tuo codice qui sotto.",
|
|
10219
10549
|
"Please click 'Try again' to open the login window.": "Fai clic su 'Riprova' per aprire la finestra di accesso.",
|
|
10220
10550
|
"Please complete the passkey authentication...": "Si prega di completare l'autenticazione con chiave di accesso...",
|
|
@@ -10279,6 +10609,7 @@ var it_default = {
|
|
|
10279
10609
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} app or extension to manage your wallet and security settings.": "Questo \xE8 il tuo portafoglio principale e la tua identit\xE0. Assicurati di tenerlo al sicuro e di eseguire il backup. Vai all'app o all'estensione {{element}} per gestire il tuo portafoglio e le impostazioni di sicurezza.",
|
|
10280
10610
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.": "Questo \xE8 il tuo portafoglio principale e la tua identit\xE0. Assicurati di tenerlo al sicuro e di fare un backup. Vai al sito web {{element}} per gestire i metodi di accesso e le impostazioni di sicurezza.",
|
|
10281
10611
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your wallet and security settings.": "Questo \xE8 il tuo portafoglio e identit\xE0 principale. Assicurati di tenerlo al sicuro e di averne una copia di backup. Vai al sito web di {{element}} per gestire le impostazioni del tuo portafoglio e della sicurezza.",
|
|
10612
|
+
"This is your main wallet, created by {{element}} and secured by Privy.": "Questo \xE8 il tuo portafoglio principale, creato da {{element}} e protetto da Privy.",
|
|
10282
10613
|
"This is your main wallet, created by {{element}} and secured by Privy. This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions. Please be sure to keep it safe and backed up.": "Questo \xE8 il tuo portafoglio principale, creato da {{element}} e protetto da Privy. Questo portafoglio \xE8 il proprietario del tuo account smart, che \xE8 utilizzato come la tua identit\xE0 e come un gateway per le tue interazioni con la blockchain. Assicurati di tenerlo al sicuro e di eseguirne il backup.",
|
|
10283
10614
|
"This may take a few seconds. You can close this window and check the status later.": "Potrebbe richiedere alcuni secondi. Puoi chiudere questa finestra e controllare lo stato pi\xF9 tardi.",
|
|
10284
10615
|
"This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions.": "Questo portafoglio \xE8 il proprietario del tuo account smart, che \xE8 utilizzato come la tua identit\xE0 e come un gateway per le tue interazioni con la blockchain.",
|
|
@@ -10455,6 +10786,7 @@ var fr_default = {
|
|
|
10455
10786
|
"Continue with Google": "Continuer avec Google",
|
|
10456
10787
|
"Copy your address or scan this QR code": "Copiez votre adresse ou scannez ce code QR",
|
|
10457
10788
|
Current: "Actuel",
|
|
10789
|
+
"Current domain": "Domaine actuel",
|
|
10458
10790
|
"Currently, multiclause transactions are not supported for smart accounts. Your multiclause transaction will be split into multiple transactions.": "Actuellement, les transactions \xE0 clauses multiples ne sont pas prises en charge pour les comptes intelligents. Votre transaction \xE0 clauses multiples sera divis\xE9e en plusieurs transactions.",
|
|
10459
10791
|
"Customize Account": "Personnaliser le compte",
|
|
10460
10792
|
"Customize account": "Personnaliser le compte",
|
|
@@ -10553,6 +10885,7 @@ var fr_default = {
|
|
|
10553
10885
|
Passkey: "Cl\xE9 de passe",
|
|
10554
10886
|
"Phone Number": "Num\xE9ro de t\xE9l\xE9phone",
|
|
10555
10887
|
"Please approve the request in the connection request window...": "Veuillez approuver la demande dans la fen\xEAtre de demande de connexion...",
|
|
10888
|
+
"Please be sure to keep this wallet safe and backed up.": "Veuillez vous assurer que ce portefeuille est en s\xE9curit\xE9 et sauvegard\xE9.",
|
|
10556
10889
|
"Please check {{email}} for an email from privy.io and enter your code below.": "Veuillez v\xE9rifier {{email}} pour un email de privy.io et entrez votre code ci-dessous.",
|
|
10557
10890
|
"Please click 'Try again' to open the login window.": "Veuillez cliquer sur 'R\xE9essayer' pour ouvrir la fen\xEAtre de connexion.",
|
|
10558
10891
|
"Please complete the passkey authentication...": "Veuillez compl\xE9ter l'authentification par cl\xE9 de passe...",
|
|
@@ -10617,6 +10950,7 @@ var fr_default = {
|
|
|
10617
10950
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} app or extension to manage your wallet and security settings.": "Ceci est votre portefeuille principal et votre identit\xE9. Veuillez vous assurer de le garder en s\xE9curit\xE9 et sauvegard\xE9. Allez dans l'application ou l'extension {{element}} pour g\xE9rer votre portefeuille et vos param\xE8tres de s\xE9curit\xE9.",
|
|
10618
10951
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.": "Ceci est votre portefeuille et identit\xE9 principaux. Veuillez vous assurer de les garder en s\xE9curit\xE9 et sauvegard\xE9s. Allez sur le site {{element}} pour g\xE9rer vos m\xE9thodes de connexion et vos param\xE8tres de s\xE9curit\xE9.",
|
|
10619
10952
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your wallet and security settings.": "Ceci est votre portefeuille principal et votre identit\xE9. Veuillez vous assurer de le garder en s\xE9curit\xE9 et sauvegard\xE9. Allez sur le site {{element}} pour g\xE9rer votre portefeuille et vos param\xE8tres de s\xE9curit\xE9.",
|
|
10953
|
+
"This is your main wallet, created by {{element}} and secured by Privy.": "Ceci est votre portefeuille principal, cr\xE9\xE9 par {{element}} et s\xE9curis\xE9 par Privy.",
|
|
10620
10954
|
"This is your main wallet, created by {{element}} and secured by Privy. This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions. Please be sure to keep it safe and backed up.": "Ceci est votre portefeuille principal, cr\xE9\xE9 par {{element}} et s\xE9curis\xE9 par Privy. Ce portefeuille est le propri\xE9taire de votre compte intelligent, qui est utilis\xE9 comme votre identit\xE9 et comme une passerelle pour vos interactions blockchain. Veuillez vous assurer de le garder en s\xE9curit\xE9 et sauvegard\xE9.",
|
|
10621
10955
|
"This may take a few seconds. You can close this window and check the status later.": "Cela peut prendre quelques secondes. Vous pouvez fermer cette fen\xEAtre et v\xE9rifier le statut plus tard.",
|
|
10622
10956
|
"This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions.": "Ce portefeuille est le propri\xE9taire de votre compte intelligent, qui est utilis\xE9 comme votre identit\xE9 et comme une passerelle pour vos interactions blockchain.",
|
|
@@ -10793,6 +11127,7 @@ var es_default = {
|
|
|
10793
11127
|
"Continue with Google": "Continuar con Google",
|
|
10794
11128
|
"Copy your address or scan this QR code": "Copia tu direcci\xF3n o escanea este c\xF3digo QR",
|
|
10795
11129
|
Current: "Actual",
|
|
11130
|
+
"Current domain": "Dominio actual",
|
|
10796
11131
|
"Currently, multiclause transactions are not supported for smart accounts. Your multiclause transaction will be split into multiple transactions.": "Actualmente, las transacciones con m\xFAltiples cl\xE1usulas no son compatibles con las cuentas inteligentes. Su transacci\xF3n con m\xFAltiples cl\xE1usulas se dividir\xE1 en varias transacciones.",
|
|
10797
11132
|
"Customize Account": "Personalizar Cuenta",
|
|
10798
11133
|
"Customize account": "Personalizar cuenta",
|
|
@@ -10891,6 +11226,7 @@ var es_default = {
|
|
|
10891
11226
|
Passkey: "Clave de acceso",
|
|
10892
11227
|
"Phone Number": "N\xFAmero de tel\xE9fono",
|
|
10893
11228
|
"Please approve the request in the connection request window...": "Por favor, aprueba la solicitud en la ventana de solicitud de conexi\xF3n...",
|
|
11229
|
+
"Please be sure to keep this wallet safe and backed up.": "Por favor, aseg\xFArese de mantener esta billetera segura y respaldada.",
|
|
10894
11230
|
"Please check {{email}} for an email from privy.io and enter your code below.": "Por favor, revisa {{email}} para un correo electr\xF3nico de privy.io e ingresa tu c\xF3digo a continuaci\xF3n.",
|
|
10895
11231
|
"Please click 'Try again' to open the login window.": "Por favor, haz clic en 'Intentar de nuevo' para abrir la ventana de inicio de sesi\xF3n.",
|
|
10896
11232
|
"Please complete the passkey authentication...": "Por favor, completa la autenticaci\xF3n de clave de acceso...",
|
|
@@ -10955,6 +11291,7 @@ var es_default = {
|
|
|
10955
11291
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} app or extension to manage your wallet and security settings.": "Este es tu monedero principal e identidad. Aseg\xFArate de mantenerlo seguro y respaldado. Ve a la aplicaci\xF3n o extensi\xF3n de {{element}} para gestionar tu monedero y la configuraci\xF3n de seguridad.",
|
|
10956
11292
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.": "Esta es tu billetera e identidad principal. Aseg\xFArate de mantenerla segura y respaldada. Ve al sitio web de {{element}} para gestionar tus m\xE9todos de inicio de sesi\xF3n y configuraciones de seguridad.",
|
|
10957
11293
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your wallet and security settings.": "Esta es su billetera principal e identidad. Aseg\xFArese de mantenerla segura y respaldada. Vaya al sitio web de {{element}} para administrar su billetera y la configuraci\xF3n de seguridad.",
|
|
11294
|
+
"This is your main wallet, created by {{element}} and secured by Privy.": "Esta es su billetera principal, creada por {{element}} y asegurada por Privy.",
|
|
10958
11295
|
"This is your main wallet, created by {{element}} and secured by Privy. This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions. Please be sure to keep it safe and backed up.": "Esta es tu billetera principal, creada por {{element}} y asegurada por Privy. Esta billetera es la propietaria de tu cuenta inteligente, la cual se utiliza como tu identidad y como puerta de entrada para tus interacciones con la blockchain. Por favor, aseg\xFArate de mantenerla segura y respaldada.",
|
|
10959
11296
|
"This may take a few seconds. You can close this window and check the status later.": "Esto puede tardar unos segundos. Puede cerrar esta ventana y comprobar el estado m\xE1s tarde.",
|
|
10960
11297
|
"This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions.": "Esta billetera es la propietaria de tu cuenta inteligente, la cual se utiliza como tu identidad y como puerta de entrada para tus interacciones con la blockchain.",
|
|
@@ -11131,6 +11468,7 @@ var zh_default = {
|
|
|
11131
11468
|
"Continue with Google": "\u901A\u8FC7Google\u7EE7\u7EED",
|
|
11132
11469
|
"Copy your address or scan this QR code": "\u590D\u5236\u60A8\u7684\u5730\u5740\u6216\u626B\u63CF\u6B64\u4E8C\u7EF4\u7801",
|
|
11133
11470
|
Current: "\u5F53\u524D",
|
|
11471
|
+
"Current domain": "\u5F53\u524D\u57DF\u540D",
|
|
11134
11472
|
"Currently, multiclause transactions are not supported for smart accounts. Your multiclause transaction will be split into multiple transactions.": "\u5F53\u524D\uFF0C\u4E0D\u652F\u6301\u667A\u80FD\u8D26\u6237\u7684\u591A\u6761\u6B3E\u4EA4\u6613\u3002\u60A8\u7684\u591A\u6761\u6B3E\u4EA4\u6613\u5C06\u88AB\u62C6\u5206\u4E3A\u591A\u7B14\u4EA4\u6613\u3002",
|
|
11135
11473
|
"Customize Account": "\u81EA\u5B9A\u4E49\u5E10\u6237",
|
|
11136
11474
|
"Customize account": "\u81EA\u5B9A\u4E49\u5E10\u6237",
|
|
@@ -11229,6 +11567,7 @@ var zh_default = {
|
|
|
11229
11567
|
Passkey: "\u901A\u884C\u5BC6\u94A5",
|
|
11230
11568
|
"Phone Number": "\u7535\u8BDD\u53F7\u7801",
|
|
11231
11569
|
"Please approve the request in the connection request window...": "\u8BF7\u5728\u8FDE\u63A5\u8BF7\u6C42\u7A97\u53E3\u4E2D\u6279\u51C6\u8BF7\u6C42...",
|
|
11570
|
+
"Please be sure to keep this wallet safe and backed up.": "\u8BF7\u52A1\u5FC5\u4FDD\u8BC1\u6B64\u94B1\u5305\u7684\u5B89\u5168\u5E76\u8FDB\u884C\u5907\u4EFD\u3002",
|
|
11232
11571
|
"Please check {{email}} for an email from privy.io and enter your code below.": "\u8BF7\u67E5\u770B {{email}} \u662F\u5426\u6709\u6765\u81EA privy.io \u7684\u7535\u5B50\u90AE\u4EF6\uFF0C\u5E76\u5728\u4E0B\u65B9\u8F93\u5165\u60A8\u7684\u4EE3\u7801\u3002",
|
|
11233
11572
|
"Please click 'Try again' to open the login window.": "\u8BF7\u70B9\u51FB\u201C\u91CD\u8BD5\u201D\u4EE5\u6253\u5F00\u767B\u5F55\u7A97\u53E3\u3002",
|
|
11234
11573
|
"Please complete the passkey authentication...": "\u8BF7\u5B8C\u6210\u901A\u884C\u5BC6\u94A5\u8BA4\u8BC1...",
|
|
@@ -11293,6 +11632,7 @@ var zh_default = {
|
|
|
11293
11632
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} app or extension to manage your wallet and security settings.": "\u8FD9\u662F\u60A8\u7684\u4E3B\u8981\u94B1\u5305\u548C\u8EAB\u4EFD\u3002\u8BF7\u52A1\u5FC5\u59A5\u5584\u4FDD\u7BA1\u5E76\u5907\u4EFD\u3002\u8BF7\u524D\u5F80{{element}}\u5E94\u7528\u7A0B\u5E8F\u6216\u6269\u5C55\u7BA1\u7406\u60A8\u7684\u94B1\u5305\u548C\u5B89\u5168\u8BBE\u7F6E\u3002",
|
|
11294
11633
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.": "\u8FD9\u662F\u60A8\u7684\u4E3B\u94B1\u5305\u548C\u8EAB\u4EFD\u3002\u8BF7\u52A1\u5FC5\u786E\u4FDD\u5176\u5B89\u5168\u5E76\u5907\u4EFD\u3002\u524D\u5F80 {{element}} \u7F51\u7AD9\u7BA1\u7406\u60A8\u7684\u767B\u5F55\u65B9\u5F0F\u548C\u5B89\u5168\u8BBE\u7F6E\u3002",
|
|
11295
11634
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your wallet and security settings.": "\u8FD9\u662F\u60A8\u7684\u4E3B\u8981\u94B1\u5305\u548C\u8EAB\u4EFD\u3002\u8BF7\u786E\u4FDD\u5176\u5B89\u5168\u5E76\u8FDB\u884C\u5907\u4EFD\u3002\u8BBF\u95EE{{element}}\u7F51\u7AD9\u4EE5\u7BA1\u7406\u60A8\u7684\u94B1\u5305\u548C\u5B89\u5168\u8BBE\u7F6E\u3002",
|
|
11635
|
+
"This is your main wallet, created by {{element}} and secured by Privy.": "\u8FD9\u662F\u60A8\u7684\u4E3B\u94B1\u5305\uFF0C\u7531{{element}}\u521B\u5EFA\uFF0C\u5E76\u7531Privy\u4FDD\u62A4\u3002",
|
|
11296
11636
|
"This is your main wallet, created by {{element}} and secured by Privy. This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions. Please be sure to keep it safe and backed up.": "\u8FD9\u662F\u60A8\u7684\u4E3B\u94B1\u5305\uFF0C\u7531{{element}}\u521B\u5EFA\u5E76\u901A\u8FC7Privy\u4FDD\u62A4\u3002\u6B64\u94B1\u5305\u662F\u60A8\u7684\u667A\u80FD\u8D26\u6237\u6240\u6709\u8005\uFF0C\u7528\u4F5C\u60A8\u7684\u8EAB\u4EFD\u6807\u8BC6\u4EE5\u53CA\u533A\u5757\u94FE\u4EA4\u4E92\u7684\u7F51\u5173\u3002\u8BF7\u52A1\u5FC5\u786E\u4FDD\u94B1\u5305\u7684\u5B89\u5168\u6027\u5E76\u8FDB\u884C\u5907\u4EFD\u3002",
|
|
11297
11637
|
"This may take a few seconds. You can close this window and check the status later.": "\u8FD9\u53EF\u80FD\u9700\u8981\u51E0\u79D2\u949F\u3002\u60A8\u53EF\u4EE5\u5173\u95ED\u6B64\u7A97\u53E3\uFF0C\u7A0D\u540E\u67E5\u770B\u72B6\u6001\u3002",
|
|
11298
11638
|
"This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions.": "\u6B64\u94B1\u5305\u662F\u60A8\u7684\u667A\u80FD\u8D26\u6237\u6240\u6709\u8005\uFF0C\u7528\u4F5C\u60A8\u7684\u8EAB\u4EFD\u6807\u8BC6\u4EE5\u53CA\u533A\u5757\u94FE\u4EA4\u4E92\u7684\u7F51\u5173\u3002",
|
|
@@ -11469,6 +11809,7 @@ var ja_default = {
|
|
|
11469
11809
|
"Continue with Google": "Google\u3067\u7D9A\u884C",
|
|
11470
11810
|
"Copy your address or scan this QR code": "\u30A2\u30C9\u30EC\u30B9\u3092\u30B3\u30D4\u30FC\u3059\u308B\u304B\u3001\u3053\u306EQR\u30B3\u30FC\u30C9\u3092\u30B9\u30AD\u30E3\u30F3\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
11471
11811
|
Current: "\u73FE\u5728",
|
|
11812
|
+
"Current domain": "\u73FE\u5728\u306E\u30C9\u30E1\u30A4\u30F3",
|
|
11472
11813
|
"Currently, multiclause transactions are not supported for smart accounts. Your multiclause transaction will be split into multiple transactions.": "\u73FE\u5728\u3001\u30B9\u30DE\u30FC\u30C8\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u306F\u8907\u6570\u6761\u9805\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u3042\u306A\u305F\u306E\u8907\u6570\u6761\u9805\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306F\u8907\u6570\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u5206\u5272\u3055\u308C\u307E\u3059\u3002",
|
|
11473
11814
|
"Customize Account": "\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA",
|
|
11474
11815
|
"Customize account": "\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA",
|
|
@@ -11567,6 +11908,7 @@ var ja_default = {
|
|
|
11567
11908
|
Passkey: "\u30D1\u30B9\u30AD\u30FC",
|
|
11568
11909
|
"Phone Number": "\u96FB\u8A71\u756A\u53F7",
|
|
11569
11910
|
"Please approve the request in the connection request window...": "\u63A5\u7D9A\u30EA\u30AF\u30A8\u30B9\u30C8\u30A6\u30A3\u30F3\u30C9\u30A6\u3067\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u627F\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044...",
|
|
11911
|
+
"Please be sure to keep this wallet safe and backed up.": "\u3053\u306E\u30A6\u30A9\u30EC\u30C3\u30C8\u3092\u5B89\u5168\u306B\u4FDD\u7BA1\u3057\u3001\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3092\u53D6\u308B\u3088\u3046\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
11570
11912
|
"Please check {{email}} for an email from privy.io and enter your code below.": "{{email}} \u306B privy.io \u304B\u3089\u306E\u30E1\u30FC\u30EB\u304C\u5C4A\u3044\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3001\u4EE5\u4E0B\u306B\u30B3\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
11571
11913
|
"Please click 'Try again' to open the login window.": "\u300C\u518D\u8A66\u884C\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30ED\u30B0\u30A4\u30F3\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u958B\u3044\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
11572
11914
|
"Please complete the passkey authentication...": "\u30D1\u30B9\u30AD\u30FC\u8A8D\u8A3C\u3092\u5B8C\u4E86\u3057\u3066\u304F\u3060\u3055\u3044...",
|
|
@@ -11631,6 +11973,7 @@ var ja_default = {
|
|
|
11631
11973
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} app or extension to manage your wallet and security settings.": "\u3053\u308C\u306F\u3042\u306A\u305F\u306E\u30E1\u30A4\u30F3\u30A6\u30A9\u30EC\u30C3\u30C8\u3068\u30A2\u30A4\u30C7\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u3059\u3002\u5B89\u5168\u306B\u4FDD\u7BA1\u3057\u3001\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3092\u53D6\u3063\u3066\u304F\u3060\u3055\u3044\u3002\u30A6\u30A9\u30EC\u30C3\u30C8\u3068\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u8A2D\u5B9A\u3092\u7BA1\u7406\u3059\u308B\u306B\u306F\u3001{{element}} \u30A2\u30D7\u30EA\u307E\u305F\u306F\u62E1\u5F35\u6A5F\u80FD\u306B\u79FB\u52D5\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
11632
11974
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.": "\u3053\u308C\u304C\u3042\u306A\u305F\u306E\u4E3B\u8981\u306A\u30A6\u30A9\u30EC\u30C3\u30C8\u3068ID\u3067\u3059\u3002\u5FC5\u305A\u5B89\u5168\u306B\u4FDD\u7BA1\u3057\u3001\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30ED\u30B0\u30A4\u30F3\u65B9\u6CD5\u3068\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u8A2D\u5B9A\u3092\u7BA1\u7406\u3059\u308B\u305F\u3081\u306B{{element}}\u306E\u30A6\u30A7\u30D6\u30B5\u30A4\u30C8\u306B\u79FB\u52D5\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
11633
11975
|
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your wallet and security settings.": "\u3053\u308C\u304C\u3042\u306A\u305F\u306E\u30E1\u30A4\u30F3\u30A6\u30A9\u30EC\u30C3\u30C8\u3068\u30A2\u30A4\u30C7\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u3059\u3002\u5B89\u5168\u306B\u4FDD\u7BA1\u3057\u3001\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3092\u53D6\u3063\u3066\u304F\u3060\u3055\u3044\u3002\u30A6\u30A9\u30EC\u30C3\u30C8\u3068\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u8A2D\u5B9A\u3092\u7BA1\u7406\u3059\u308B\u306B\u306F{{element}}\u30A6\u30A7\u30D6\u30B5\u30A4\u30C8\u306B\u30A2\u30AF\u30BB\u30B9\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
11976
|
+
"This is your main wallet, created by {{element}} and secured by Privy.": "\u3053\u308C\u306F\u3001{{element}}\u306B\u3088\u3063\u3066\u4F5C\u6210\u3055\u308C\u3001Privy\u306B\u3088\u3063\u3066\u4FDD\u8B77\u3055\u308C\u305F\u3042\u306A\u305F\u306E\u30E1\u30A4\u30F3\u30A6\u30A9\u30EC\u30C3\u30C8\u3067\u3059\u3002",
|
|
11634
11977
|
"This is your main wallet, created by {{element}} and secured by Privy. This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions. Please be sure to keep it safe and backed up.": "{{element}}\u306B\u3088\u3063\u3066\u4F5C\u6210\u3055\u308C\u3001Privy\u306B\u3088\u3063\u3066\u4FDD\u8B77\u3055\u308C\u305F\u30E1\u30A4\u30F3\u30A6\u30A9\u30EC\u30C3\u30C8\u3067\u3059\u3002\u3053\u306E\u30A6\u30A9\u30EC\u30C3\u30C8\u306F\u3001\u30A2\u30A4\u30C7\u30F3\u30C6\u30A3\u30C6\u30A3\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u308B\u30B9\u30DE\u30FC\u30C8\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6240\u6709\u8005\u3067\u3042\u308A\u3001\u30D6\u30ED\u30C3\u30AF\u30C1\u30A7\u30FC\u30F3\u3068\u306E\u3084\u308A\u53D6\u308A\u306E\u30B2\u30FC\u30C8\u30A6\u30A7\u30A4\u3068\u3057\u3066\u6A5F\u80FD\u3057\u307E\u3059\u3002\u5B89\u5168\u306B\u4FDD\u7BA1\u3057\u3001\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3092\u78BA\u5B9F\u306B\u53D6\u3063\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
11635
11978
|
"This may take a few seconds. You can close this window and check the status later.": "\u6570\u79D2\u304B\u304B\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u9589\u3058\u3066\u5F8C\u3067\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u78BA\u8A8D\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002",
|
|
11636
11979
|
"This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions.": "\u3053\u306E\u30A6\u30A9\u30EC\u30C3\u30C8\u306F\u3001\u30A2\u30A4\u30C7\u30F3\u30C6\u30A3\u30C6\u30A3\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u308B\u30B9\u30DE\u30FC\u30C8\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6240\u6709\u8005\u3067\u3042\u308A\u3001\u30D6\u30ED\u30C3\u30AF\u30C1\u30A7\u30FC\u30F3\u3068\u306E\u3084\u308A\u53D6\u308A\u306E\u30B2\u30FC\u30C8\u30A6\u30A7\u30A4\u3068\u3057\u3066\u6A5F\u80FD\u3057\u307E\u3059\u3002",
|
|
@@ -11785,7 +12128,7 @@ var FAQContent = ({ onGoBack }) => {
|
|
|
11785
12128
|
fontWeight: "500",
|
|
11786
12129
|
textAlign: "center",
|
|
11787
12130
|
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
11788
|
-
children: t("
|
|
12131
|
+
children: t("Help")
|
|
11789
12132
|
}
|
|
11790
12133
|
),
|
|
11791
12134
|
/* @__PURE__ */ jsxRuntime.jsx(ModalBackButton, { onClick: onGoBack }),
|
|
@@ -11871,7 +12214,6 @@ var ConnectionDetailsContent = ({ onGoBack }) => {
|
|
|
11871
12214
|
const { getConnectionCache } = useCrossAppConnectionCache();
|
|
11872
12215
|
const { privy, darkMode: isDark } = useVeChainKitConfig();
|
|
11873
12216
|
const { connection } = useWallet();
|
|
11874
|
-
const { source } = dappKitReact.useWallet();
|
|
11875
12217
|
const { data: appInfo } = useFetchAppInfo(privy?.appId ?? "");
|
|
11876
12218
|
const connectionCache = getConnectionCache();
|
|
11877
12219
|
return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
|
|
@@ -11899,23 +12241,7 @@ var ConnectionDetailsContent = ({ onGoBack }) => {
|
|
|
11899
12241
|
/* @__PURE__ */ jsxRuntime.jsxs(react.ModalBody, { w: "full", children: [
|
|
11900
12242
|
connection.isConnectedWithCrossApp && connectionCache && /* @__PURE__ */ jsxRuntime.jsx(CrossAppConnectionCard, { connectionCache }),
|
|
11901
12243
|
connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxRuntime.jsx(PrivyConnectionCard, {}),
|
|
11902
|
-
connection.isConnectedWithDappKit && /* @__PURE__ */ jsxRuntime.
|
|
11903
|
-
/* @__PURE__ */ jsxRuntime.jsx(DappKitConnectionCard, {}),
|
|
11904
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11905
|
-
react.Text,
|
|
11906
|
-
{
|
|
11907
|
-
fontSize: "sm",
|
|
11908
|
-
opacity: 0.5,
|
|
11909
|
-
textAlign: "center",
|
|
11910
|
-
children: t(
|
|
11911
|
-
"This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} app or extension to manage your security settings.",
|
|
11912
|
-
{
|
|
11913
|
-
element: source
|
|
11914
|
-
}
|
|
11915
|
-
)
|
|
11916
|
-
}
|
|
11917
|
-
)
|
|
11918
|
-
] }),
|
|
12244
|
+
connection.isConnectedWithDappKit && /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { align: "stretch", textAlign: "center", mt: 5, children: /* @__PURE__ */ jsxRuntime.jsx(DappKitConnectionCard, {}) }),
|
|
11919
12245
|
(connection.isConnectedWithSocialLogin || connection.isConnectedWithCrossApp) && /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 4, mt: 5, children: [
|
|
11920
12246
|
/* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
|
|
11921
12247
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -12016,10 +12342,10 @@ var ConfirmUnlink = ({
|
|
|
12016
12342
|
var PrivyLinkedAccounts = ({ onBack }) => {
|
|
12017
12343
|
const { t } = reactI18next.useTranslation();
|
|
12018
12344
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
12019
|
-
const [unlinkingAccount, setUnlinkingAccount] =
|
|
12020
|
-
const [showLinkOptions, setShowLinkOptions] =
|
|
12021
|
-
const [showFullText, setShowFullText] =
|
|
12022
|
-
const [isLoadingUnlink, setIsLoadingUnlink] =
|
|
12345
|
+
const [unlinkingAccount, setUnlinkingAccount] = React8.useState(null);
|
|
12346
|
+
const [showLinkOptions, setShowLinkOptions] = React8.useState(false);
|
|
12347
|
+
const [showFullText, setShowFullText] = React8.useState(false);
|
|
12348
|
+
const [isLoadingUnlink, setIsLoadingUnlink] = React8.useState(false);
|
|
12023
12349
|
const {
|
|
12024
12350
|
user,
|
|
12025
12351
|
linkEmail,
|
|
@@ -12187,22 +12513,7 @@ var PrivyLinkedAccounts = ({ onBack }) => {
|
|
|
12187
12513
|
),
|
|
12188
12514
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
|
|
12189
12515
|
] }),
|
|
12190
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 3, align: "stretch", children: [
|
|
12191
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12192
|
-
ActionButton,
|
|
12193
|
-
{
|
|
12194
|
-
title: t("Handle Passkey Login"),
|
|
12195
|
-
description: t(
|
|
12196
|
-
"Enable one click login by adding a passkey to your account."
|
|
12197
|
-
),
|
|
12198
|
-
onClick: () => {
|
|
12199
|
-
linkPasskey();
|
|
12200
|
-
},
|
|
12201
|
-
leftIcon: io.IoIosFingerPrint,
|
|
12202
|
-
rightIcon: void 0,
|
|
12203
|
-
isDisabled: !privy?.allowPasskeyLinking
|
|
12204
|
-
}
|
|
12205
|
-
),
|
|
12516
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 3, align: "stretch", w: "full", children: [
|
|
12206
12517
|
canLinkGoogle && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12207
12518
|
ActionButton,
|
|
12208
12519
|
{
|
|
@@ -12579,9 +12890,9 @@ var NotificationsContent = ({ setCurrentContent }) => {
|
|
|
12579
12890
|
clearAllNotifications,
|
|
12580
12891
|
markAsRead
|
|
12581
12892
|
} = useNotifications();
|
|
12582
|
-
const [isArchiveView, setIsArchiveView] =
|
|
12583
|
-
const [notifications, setNotifications] =
|
|
12584
|
-
const [archivedNotifications, setArchivedNotifications] =
|
|
12893
|
+
const [isArchiveView, setIsArchiveView] = React8.useState(false);
|
|
12894
|
+
const [notifications, setNotifications] = React8.useState(getNotifications());
|
|
12895
|
+
const [archivedNotifications, setArchivedNotifications] = React8.useState(
|
|
12585
12896
|
getArchivedNotifications()
|
|
12586
12897
|
);
|
|
12587
12898
|
const handleClearAll = () => {
|
|
@@ -12610,9 +12921,14 @@ var NotificationsContent = ({ setCurrentContent }) => {
|
|
|
12610
12921
|
if (b.id === "multiclause") return 1;
|
|
12611
12922
|
return b.timestamp - a.timestamp;
|
|
12612
12923
|
});
|
|
12613
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12924
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
|
|
12614
12925
|
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
12615
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12926
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12927
|
+
ModalBackButton,
|
|
12928
|
+
{
|
|
12929
|
+
onClick: () => setCurrentContent("settings")
|
|
12930
|
+
}
|
|
12931
|
+
),
|
|
12616
12932
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12617
12933
|
react.ModalHeader,
|
|
12618
12934
|
{
|
|
@@ -12625,7 +12941,7 @@ var NotificationsContent = ({ setCurrentContent }) => {
|
|
|
12625
12941
|
),
|
|
12626
12942
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
|
|
12627
12943
|
] }),
|
|
12628
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Container, { maxW: "container.lg", h: "
|
|
12944
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Container, { maxW: "container.lg", h: ["auto", "540px"], children: [
|
|
12629
12945
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 4, align: "stretch", w: "full", children: [
|
|
12630
12946
|
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "space-between", children: [
|
|
12631
12947
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12830,7 +13146,7 @@ var DEFAULT_APPS = [
|
|
|
12830
13146
|
var ExploreEcosystemContent = ({ setCurrentContent }) => {
|
|
12831
13147
|
const { t } = reactI18next.useTranslation();
|
|
12832
13148
|
const { darkMode: isDark, network } = useVeChainKitConfig();
|
|
12833
|
-
const [searchQuery, setSearchQuery] =
|
|
13149
|
+
const [searchQuery, setSearchQuery] = React8.useState("");
|
|
12834
13150
|
const { data: currentRoundId } = useCurrentAllocationsRoundId();
|
|
12835
13151
|
const { data: vbdApps } = useMostVotedAppsInRound(
|
|
12836
13152
|
currentRoundId ? (parseInt(currentRoundId) - 1).toString() : "1"
|
|
@@ -12852,7 +13168,7 @@ var ExploreEcosystemContent = ({ setCurrentContent }) => {
|
|
|
12852
13168
|
fontWeight: "500",
|
|
12853
13169
|
textAlign: "center",
|
|
12854
13170
|
color: isDark ? "#dfdfdd" : "#4d4d4d",
|
|
12855
|
-
children: t("
|
|
13171
|
+
children: t("Apps")
|
|
12856
13172
|
}
|
|
12857
13173
|
),
|
|
12858
13174
|
/* @__PURE__ */ jsxRuntime.jsx(ModalBackButton, { onClick: () => setCurrentContent("main") }),
|
|
@@ -13058,8 +13374,8 @@ var AccountModal = ({
|
|
|
13058
13374
|
}) => {
|
|
13059
13375
|
useNotificationAlerts();
|
|
13060
13376
|
const { account } = useWallet();
|
|
13061
|
-
const [currentContent, setCurrentContent] =
|
|
13062
|
-
|
|
13377
|
+
const [currentContent, setCurrentContent] = React8.useState(initialContent);
|
|
13378
|
+
React8.useEffect(() => {
|
|
13063
13379
|
if (isOpen && initialContent) {
|
|
13064
13380
|
setCurrentContent(initialContent);
|
|
13065
13381
|
}
|
|
@@ -13099,7 +13415,7 @@ var AccountModal = ({
|
|
|
13099
13415
|
);
|
|
13100
13416
|
case "settings":
|
|
13101
13417
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13102
|
-
|
|
13418
|
+
SettingsContent,
|
|
13103
13419
|
{
|
|
13104
13420
|
setCurrentContent,
|
|
13105
13421
|
onLogoutSuccess: onClose
|
|
@@ -13112,9 +13428,9 @@ var AccountModal = ({
|
|
|
13112
13428
|
setCurrentContent
|
|
13113
13429
|
}
|
|
13114
13430
|
);
|
|
13115
|
-
case "
|
|
13431
|
+
case "access-and-security":
|
|
13116
13432
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13117
|
-
|
|
13433
|
+
AccessAndSecurityContent,
|
|
13118
13434
|
{
|
|
13119
13435
|
setCurrentContent
|
|
13120
13436
|
}
|
|
@@ -13148,7 +13464,7 @@ var AccountModal = ({
|
|
|
13148
13464
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13149
13465
|
PrivyLinkedAccounts,
|
|
13150
13466
|
{
|
|
13151
|
-
onBack: () => setCurrentContent("
|
|
13467
|
+
onBack: () => setCurrentContent("access-and-security")
|
|
13152
13468
|
}
|
|
13153
13469
|
);
|
|
13154
13470
|
case "ecosystem":
|
|
@@ -13165,6 +13481,13 @@ var AccountModal = ({
|
|
|
13165
13481
|
setCurrentContent
|
|
13166
13482
|
}
|
|
13167
13483
|
);
|
|
13484
|
+
case "embedded-wallet":
|
|
13485
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13486
|
+
EmbeddedWalletContent,
|
|
13487
|
+
{
|
|
13488
|
+
setCurrentContent
|
|
13489
|
+
}
|
|
13490
|
+
);
|
|
13168
13491
|
}
|
|
13169
13492
|
};
|
|
13170
13493
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13179,9 +13502,8 @@ var AccountModal = ({
|
|
|
13179
13502
|
);
|
|
13180
13503
|
};
|
|
13181
13504
|
var ConnectModal = ({ isOpen, onClose }) => {
|
|
13182
|
-
const
|
|
13183
|
-
|
|
13184
|
-
React9.useEffect(() => {
|
|
13505
|
+
const [currentContent, setCurrentContent] = React8.useState("main");
|
|
13506
|
+
React8.useEffect(() => {
|
|
13185
13507
|
if (isOpen) {
|
|
13186
13508
|
setCurrentContent("main");
|
|
13187
13509
|
}
|
|
@@ -13193,8 +13515,7 @@ var ConnectModal = ({ isOpen, onClose }) => {
|
|
|
13193
13515
|
MainContent,
|
|
13194
13516
|
{
|
|
13195
13517
|
setCurrentContent,
|
|
13196
|
-
onClose
|
|
13197
|
-
variant: loginModalUI?.variant
|
|
13518
|
+
onClose
|
|
13198
13519
|
}
|
|
13199
13520
|
);
|
|
13200
13521
|
case "faq":
|
|
@@ -13352,13 +13673,10 @@ var ConnectedWallet = ({
|
|
|
13352
13673
|
const [isDesktop] = react.useMediaQuery("(min-width: 768px)");
|
|
13353
13674
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Button, { ...buttonStyle, onClick: onOpen, p: "0px 13px", minH: "45px", children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { children: [
|
|
13354
13675
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13355
|
-
|
|
13676
|
+
AccountAvatar,
|
|
13356
13677
|
{
|
|
13357
|
-
|
|
13358
|
-
|
|
13359
|
-
width: 30,
|
|
13360
|
-
height: 30,
|
|
13361
|
-
borderRadius: "50%"
|
|
13678
|
+
wallet: account,
|
|
13679
|
+
props: { width: 30, height: 30 }
|
|
13362
13680
|
}
|
|
13363
13681
|
),
|
|
13364
13682
|
!isDesktop && /* @__PURE__ */ jsxRuntime.jsx(WalletDisplay, { variant: mobileVariant }),
|
|
@@ -13385,7 +13703,7 @@ var WalletButton = ({
|
|
|
13385
13703
|
connectModal.onOpen();
|
|
13386
13704
|
}
|
|
13387
13705
|
};
|
|
13388
|
-
|
|
13706
|
+
React8.useEffect(() => {
|
|
13389
13707
|
const embeddedWallet = user?.wallet?.address;
|
|
13390
13708
|
const asyncCreateWallet = async () => {
|
|
13391
13709
|
try {
|
|
@@ -13479,7 +13797,7 @@ var TransactionToast = ({
|
|
|
13479
13797
|
onClose();
|
|
13480
13798
|
resetStatus();
|
|
13481
13799
|
};
|
|
13482
|
-
const toastContent =
|
|
13800
|
+
const toastContent = React8.useMemo(() => {
|
|
13483
13801
|
const config = statusConfig[status];
|
|
13484
13802
|
if (!config) return null;
|
|
13485
13803
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13604,9 +13922,9 @@ var LoadingContent = ({
|
|
|
13604
13922
|
}) => {
|
|
13605
13923
|
const { t } = reactI18next.useTranslation();
|
|
13606
13924
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
13607
|
-
const [showTimeout, setShowTimeout] =
|
|
13608
|
-
const [showSafariMessage, setShowSafariMessage] =
|
|
13609
|
-
|
|
13925
|
+
const [showTimeout, setShowTimeout] = React8__default.default.useState(false);
|
|
13926
|
+
const [showSafariMessage, setShowSafariMessage] = React8__default.default.useState(false);
|
|
13927
|
+
React8__default.default.useEffect(() => {
|
|
13610
13928
|
if (reactDeviceDetect.isSafari) {
|
|
13611
13929
|
setShowSafariMessage(true);
|
|
13612
13930
|
}
|
|
@@ -13732,8 +14050,8 @@ var ErrorContent = ({
|
|
|
13732
14050
|
var EcosystemContent = ({ onClose, appsInfo, isLoading }) => {
|
|
13733
14051
|
const { t } = reactI18next.useTranslation();
|
|
13734
14052
|
const { darkMode: isDark } = useVeChainKitConfig();
|
|
13735
|
-
const [loginError, setLoginError] =
|
|
13736
|
-
const [selectedApp, setSelectedApp] =
|
|
14053
|
+
const [loginError, setLoginError] = React8.useState();
|
|
14054
|
+
const [selectedApp, setSelectedApp] = React8.useState();
|
|
13737
14055
|
const loginLoadingModal = react.useDisclosure();
|
|
13738
14056
|
const { setConnectionCache } = useCrossAppConnectionCache();
|
|
13739
14057
|
const { login: loginWithCrossApp } = usePrivyCrossAppSdk();
|
|
@@ -13792,8 +14110,8 @@ var EcosystemContent = ({ onClose, appsInfo, isLoading }) => {
|
|
|
13792
14110
|
display: "flex",
|
|
13793
14111
|
gap: 2,
|
|
13794
14112
|
children: [
|
|
13795
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as:
|
|
13796
|
-
t("
|
|
14113
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: io.IoMdApps, size: "20px" }),
|
|
14114
|
+
t("Select an app")
|
|
13797
14115
|
]
|
|
13798
14116
|
}
|
|
13799
14117
|
),
|
|
@@ -13808,9 +14126,7 @@ var EcosystemContent = ({ onClose, appsInfo, isLoading }) => {
|
|
|
13808
14126
|
opacity: 0.5,
|
|
13809
14127
|
mb: 4,
|
|
13810
14128
|
textAlign: "center",
|
|
13811
|
-
children: t(
|
|
13812
|
-
"Use your existing VeChain wallet from other ecosystem apps to sign in seamlessly."
|
|
13813
|
-
)
|
|
14129
|
+
children: t("Sign in with a wallet from other x2earn apps.")
|
|
13814
14130
|
}
|
|
13815
14131
|
),
|
|
13816
14132
|
isLoading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13927,16 +14243,14 @@ var initializeI18n = (i18nInstance) => {
|
|
|
13927
14243
|
});
|
|
13928
14244
|
};
|
|
13929
14245
|
var DEFAULT_PRIVY_ECOSYSTEM_APP_IDS = [
|
|
13930
|
-
"cm4wxxujb022fyujl7g0thb21",
|
|
13931
|
-
//vechain
|
|
13932
14246
|
"clz41gcg00e4ay75dmq3uzzgr",
|
|
13933
14247
|
//cleanify
|
|
13934
14248
|
"cm153hrup0817axti38avlfyg"
|
|
13935
14249
|
//greencart
|
|
13936
14250
|
];
|
|
13937
|
-
var VeChainKitContext =
|
|
14251
|
+
var VeChainKitContext = React8.createContext(null);
|
|
13938
14252
|
var useVeChainKitConfig = () => {
|
|
13939
|
-
const context =
|
|
14253
|
+
const context = React8.useContext(VeChainKitContext);
|
|
13940
14254
|
if (!context) {
|
|
13941
14255
|
throw new Error("useVeChainKitConfig must be used within VeChainKit");
|
|
13942
14256
|
}
|
|
@@ -13948,50 +14262,51 @@ var VeChainKitProvider = ({
|
|
|
13948
14262
|
feeDelegation,
|
|
13949
14263
|
dappKit,
|
|
13950
14264
|
loginModalUI = {
|
|
13951
|
-
variant: "vechain-and-wallet",
|
|
13952
14265
|
description: "Choose between social login through VeChain or by connecting your wallet."
|
|
13953
14266
|
},
|
|
14267
|
+
loginMethods,
|
|
13954
14268
|
darkMode = false,
|
|
13955
14269
|
i18n: i18nConfig,
|
|
13956
14270
|
language = "en",
|
|
13957
|
-
network
|
|
13958
|
-
privyEcosystemAppIDS = DEFAULT_PRIVY_ECOSYSTEM_APP_IDS
|
|
14271
|
+
network
|
|
13959
14272
|
}) => {
|
|
13960
|
-
const [isConnectModalOpen, setIsConnectModalOpen] =
|
|
13961
|
-
const openConnectModal =
|
|
13962
|
-
const closeConnectModal =
|
|
14273
|
+
const [isConnectModalOpen, setIsConnectModalOpen] = React8.useState(false);
|
|
14274
|
+
const openConnectModal = React8.useCallback(() => setIsConnectModalOpen(true), []);
|
|
14275
|
+
const closeConnectModal = React8.useCallback(
|
|
13963
14276
|
() => setIsConnectModalOpen(false),
|
|
13964
14277
|
[]
|
|
13965
14278
|
);
|
|
13966
|
-
const [isAccountModalOpen, setIsAccountModalOpen] =
|
|
13967
|
-
const openAccountModal =
|
|
13968
|
-
const closeAccountModal =
|
|
14279
|
+
const [isAccountModalOpen, setIsAccountModalOpen] = React8.useState(false);
|
|
14280
|
+
const openAccountModal = React8.useCallback(() => setIsAccountModalOpen(true), []);
|
|
14281
|
+
const closeAccountModal = React8.useCallback(
|
|
13969
14282
|
() => setIsAccountModalOpen(false),
|
|
13970
14283
|
[]
|
|
13971
14284
|
);
|
|
13972
|
-
const [isTransactionModalOpen, setIsTransactionModalOpen] =
|
|
13973
|
-
const openTransactionModal =
|
|
14285
|
+
const [isTransactionModalOpen, setIsTransactionModalOpen] = React8.useState(false);
|
|
14286
|
+
const openTransactionModal = React8.useCallback(
|
|
13974
14287
|
() => setIsTransactionModalOpen(true),
|
|
13975
14288
|
[]
|
|
13976
14289
|
);
|
|
13977
|
-
const closeTransactionModal =
|
|
14290
|
+
const closeTransactionModal = React8.useCallback(
|
|
13978
14291
|
() => setIsTransactionModalOpen(false),
|
|
13979
14292
|
[]
|
|
13980
14293
|
);
|
|
13981
|
-
const [isTransactionToastOpen, setIsTransactionToastOpen] =
|
|
13982
|
-
const openTransactionToast =
|
|
14294
|
+
const [isTransactionToastOpen, setIsTransactionToastOpen] = React8.useState(false);
|
|
14295
|
+
const openTransactionToast = React8.useCallback(
|
|
13983
14296
|
() => setIsTransactionToastOpen(true),
|
|
13984
14297
|
[]
|
|
13985
14298
|
);
|
|
13986
|
-
const closeTransactionToast =
|
|
14299
|
+
const closeTransactionToast = React8.useCallback(
|
|
13987
14300
|
() => setIsTransactionToastOpen(false),
|
|
13988
14301
|
[]
|
|
13989
14302
|
);
|
|
13990
|
-
const [accountModalContent, setAccountModalContent] =
|
|
13991
|
-
const
|
|
13992
|
-
|
|
13993
|
-
|
|
13994
|
-
|
|
14303
|
+
const [accountModalContent, setAccountModalContent] = React8.useState("main");
|
|
14304
|
+
const allowedEcosystemApps = React8.useMemo(() => {
|
|
14305
|
+
const userEcosystemMethods = loginMethods?.find(
|
|
14306
|
+
(method35) => method35.method === "ecosystem"
|
|
14307
|
+
);
|
|
14308
|
+
return userEcosystemMethods?.allowedApps ?? DEFAULT_PRIVY_ECOSYSTEM_APP_IDS;
|
|
14309
|
+
}, [loginMethods]);
|
|
13995
14310
|
let privyAppId, privyClientId;
|
|
13996
14311
|
if (!privy) {
|
|
13997
14312
|
privyAppId = "clzdb5k0b02b9qvzjm6jpknsc";
|
|
@@ -14000,7 +14315,7 @@ var VeChainKitProvider = ({
|
|
|
14000
14315
|
privyAppId = privy.appId;
|
|
14001
14316
|
privyClientId = privy.clientId;
|
|
14002
14317
|
}
|
|
14003
|
-
|
|
14318
|
+
React8.useEffect(() => {
|
|
14004
14319
|
initializeI18n(i18n_default);
|
|
14005
14320
|
if (language) {
|
|
14006
14321
|
i18n_default.changeLanguage(language);
|
|
@@ -14019,20 +14334,20 @@ var VeChainKitProvider = ({
|
|
|
14019
14334
|
}, [language, i18nConfig]);
|
|
14020
14335
|
return /* @__PURE__ */ jsxRuntime.jsxs(EnsureQueryClient, { children: [
|
|
14021
14336
|
/* @__PURE__ */ jsxRuntime.jsx(reactQueryDevtools.ReactQueryDevtools, { initialIsOpen: false }),
|
|
14022
|
-
/* @__PURE__ */ jsxRuntime.jsx(PrivyCrossAppProvider, { privyEcosystemAppIDS, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14337
|
+
/* @__PURE__ */ jsxRuntime.jsx(PrivyCrossAppProvider, { privyEcosystemAppIDS: allowedEcosystemApps, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14023
14338
|
VeChainKitContext.Provider,
|
|
14024
14339
|
{
|
|
14025
14340
|
value: {
|
|
14026
14341
|
privy,
|
|
14027
|
-
privyEcosystemAppIDS,
|
|
14342
|
+
privyEcosystemAppIDS: allowedEcosystemApps,
|
|
14028
14343
|
feeDelegation,
|
|
14029
14344
|
dappKit,
|
|
14030
14345
|
loginModalUI,
|
|
14346
|
+
loginMethods,
|
|
14031
14347
|
darkMode,
|
|
14032
14348
|
i18n: i18nConfig,
|
|
14033
14349
|
language,
|
|
14034
14350
|
network,
|
|
14035
|
-
privySocialLoginEnabled: privy !== void 0,
|
|
14036
14351
|
openConnectModal,
|
|
14037
14352
|
closeConnectModal,
|
|
14038
14353
|
isConnectModalOpen,
|
|
@@ -14055,7 +14370,7 @@ var VeChainKitProvider = ({
|
|
|
14055
14370
|
config: {
|
|
14056
14371
|
loginMethodsAndOrder: {
|
|
14057
14372
|
// @ts-ignore
|
|
14058
|
-
primary: loginMethods
|
|
14373
|
+
primary: privy?.loginMethods
|
|
14059
14374
|
},
|
|
14060
14375
|
appearance: {
|
|
14061
14376
|
theme: darkMode ? "dark" : "light",
|
|
@@ -14145,7 +14460,7 @@ var variants = {
|
|
|
14145
14460
|
scrollbarWidth: "none",
|
|
14146
14461
|
overflow: "scroll",
|
|
14147
14462
|
overflowX: "hidden",
|
|
14148
|
-
maxHeight: "
|
|
14463
|
+
maxHeight: "540px",
|
|
14149
14464
|
borderRadius: "24px",
|
|
14150
14465
|
backgroundColor: props.colorMode === "dark" ? "#1f1f1e" : "white"
|
|
14151
14466
|
},
|
|
@@ -14344,7 +14659,7 @@ var VechainKitThemeProvider = ({
|
|
|
14344
14659
|
children,
|
|
14345
14660
|
darkMode = false
|
|
14346
14661
|
}) => {
|
|
14347
|
-
const theme =
|
|
14662
|
+
const theme = React8.useMemo(
|
|
14348
14663
|
() => ({
|
|
14349
14664
|
...VechainKitTheme,
|
|
14350
14665
|
config: {
|
|
@@ -14372,7 +14687,14 @@ Object.defineProperty(exports, "useConnex", {
|
|
|
14372
14687
|
enumerable: true,
|
|
14373
14688
|
get: function () { return dappKitReact.useConnex; }
|
|
14374
14689
|
});
|
|
14690
|
+
Object.defineProperty(exports, "useDappKitWallet", {
|
|
14691
|
+
enumerable: true,
|
|
14692
|
+
get: function () { return dappKitReact.useWallet; }
|
|
14693
|
+
});
|
|
14375
14694
|
exports.APP_SECURITY_LEVELS = APP_SECURITY_LEVELS;
|
|
14695
|
+
exports.AccessAndSecurityContent = AccessAndSecurityContent;
|
|
14696
|
+
exports.AccessAndSecurityModalProvider = AccessAndSecurityModalProvider;
|
|
14697
|
+
exports.AccountAvatar = AccountAvatar;
|
|
14376
14698
|
exports.AccountCustomizationContent = AccountCustomizationContent;
|
|
14377
14699
|
exports.AccountCustomizationModalProvider = AccountCustomizationModalProvider;
|
|
14378
14700
|
exports.AccountDetailsButton = AccountDetailsButton;
|
|
@@ -14399,7 +14721,7 @@ exports.EcosystemButton = EcosystemButton;
|
|
|
14399
14721
|
exports.EcosystemModal = EcosystemModal;
|
|
14400
14722
|
exports.EmailLoginButton = EmailLoginButton;
|
|
14401
14723
|
exports.EmbeddedWalletContent = EmbeddedWalletContent;
|
|
14402
|
-
exports.
|
|
14724
|
+
exports.ExchangeWarningAlert = ExchangeWarningAlert;
|
|
14403
14725
|
exports.ExploreEcosystemModalProvider = ExploreEcosystemModalProvider;
|
|
14404
14726
|
exports.FAQContent = FAQContent;
|
|
14405
14727
|
exports.FAQModalProvider = FAQModalProvider;
|
|
@@ -14419,6 +14741,7 @@ exports.PRICE_FEED_IDS = PRICE_FEED_IDS;
|
|
|
14419
14741
|
exports.PasskeyLoginButton = PasskeyLoginButton;
|
|
14420
14742
|
exports.PrivyButton = PrivyButton;
|
|
14421
14743
|
exports.PrivyWalletProvider = PrivyWalletProvider;
|
|
14744
|
+
exports.Profile = Profile;
|
|
14422
14745
|
exports.QuickActionsSection = QuickActionsSection;
|
|
14423
14746
|
exports.ReceiveModalProvider = ReceiveModalProvider;
|
|
14424
14747
|
exports.ReceiveTokenContent = ReceiveTokenContent;
|
|
@@ -14429,6 +14752,7 @@ exports.SelectTokenContent = SelectTokenContent;
|
|
|
14429
14752
|
exports.SendTokenContent = SendTokenContent;
|
|
14430
14753
|
exports.SendTokenModalProvider = SendTokenModalProvider;
|
|
14431
14754
|
exports.SendTokenSummaryContent = SendTokenSummaryContent;
|
|
14755
|
+
exports.SettingsContent = SettingsContent;
|
|
14432
14756
|
exports.SocialLoginButtons = SocialLoginButtons;
|
|
14433
14757
|
exports.StickyFooterContainer = StickyFooterContainer;
|
|
14434
14758
|
exports.StickyHeaderContainer = StickyHeaderContainer;
|
|
@@ -14446,7 +14770,6 @@ exports.VechainKitThemeProvider = VechainKitThemeProvider;
|
|
|
14446
14770
|
exports.VersionFooter = VersionFooter;
|
|
14447
14771
|
exports.WalletButton = WalletButton;
|
|
14448
14772
|
exports.WalletModalProvider = WalletModalProvider;
|
|
14449
|
-
exports.WalletSettingsContent = WalletSettingsContent;
|
|
14450
14773
|
exports.buildClaimRewardsTx = buildClaimRewardsTx;
|
|
14451
14774
|
exports.buildClaimRoundReward = buildClaimRoundReward;
|
|
14452
14775
|
exports.compressImages = compressImages;
|
|
@@ -14571,6 +14894,7 @@ exports.getXAppsQueryKey = getXAppsQueryKey;
|
|
|
14571
14894
|
exports.getXAppsSharesQueryKey = getXAppsSharesQueryKey;
|
|
14572
14895
|
exports.imageCompressionOptions = imageCompressionOptions;
|
|
14573
14896
|
exports.pollForReceipt = pollForReceipt;
|
|
14897
|
+
exports.useAccessAndSecurityModal = useAccessAndSecurityModal;
|
|
14574
14898
|
exports.useAccountBalance = useAccountBalance;
|
|
14575
14899
|
exports.useAccountCustomizationModal = useAccountCustomizationModal;
|
|
14576
14900
|
exports.useAccountLinking = useAccountLinking;
|
|
@@ -14597,7 +14921,6 @@ exports.useCurrentAllocationsRound = useCurrentAllocationsRound;
|
|
|
14597
14921
|
exports.useCurrentAllocationsRoundId = useCurrentAllocationsRoundId;
|
|
14598
14922
|
exports.useCurrentBlock = useCurrentBlock;
|
|
14599
14923
|
exports.useEcosystemShortcuts = useEcosystemShortcuts;
|
|
14600
|
-
exports.useEmbeddedWalletSettingsModal = useEmbeddedWalletSettingsModal;
|
|
14601
14924
|
exports.useEnsRecordExists = useEnsRecordExists;
|
|
14602
14925
|
exports.useExploreEcosystemModal = useExploreEcosystemModal;
|
|
14603
14926
|
exports.useFAQModal = useFAQModal;
|
|
@@ -14650,6 +14973,7 @@ exports.useIsWhitelisted = useIsWhitelisted;
|
|
|
14650
14973
|
exports.useLevelMultiplier = useLevelMultiplier;
|
|
14651
14974
|
exports.useLevelOfToken = useLevelOfToken;
|
|
14652
14975
|
exports.useLocalStorage = useLocalStorage;
|
|
14976
|
+
exports.useLoginModalContent = useLoginModalContent;
|
|
14653
14977
|
exports.useLoginWithOAuth = useLoginWithOAuth2;
|
|
14654
14978
|
exports.useLoginWithPasskey = useLoginWithPasskey;
|
|
14655
14979
|
exports.useLoginWithVeChain = useLoginWithVeChain;
|