@vechain/vechain-kit 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +153 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -5
- package/dist/index.d.ts +14 -5
- package/dist/index.js +152 -61
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3293,7 +3293,7 @@ var useSendTransaction = ({
|
|
|
3293
3293
|
});
|
|
3294
3294
|
}
|
|
3295
3295
|
let transaction = vendor.sign("tx", clauses2);
|
|
3296
|
-
if (feeDelegation
|
|
3296
|
+
if (feeDelegation?.delegateAllTransactions) {
|
|
3297
3297
|
transaction = transaction.delegate(feeDelegation.delegatorUrl);
|
|
3298
3298
|
}
|
|
3299
3299
|
if (signerAccountAddress) {
|
|
@@ -3976,7 +3976,7 @@ var useWallet = () => {
|
|
|
3976
3976
|
source: connectionSource,
|
|
3977
3977
|
isInAppBrowser: (window.vechain && window.vechain.isInAppBrowser) ?? false,
|
|
3978
3978
|
nodeUrl,
|
|
3979
|
-
delegatorUrl: feeDelegation
|
|
3979
|
+
delegatorUrl: feeDelegation?.delegatorUrl,
|
|
3980
3980
|
chainId,
|
|
3981
3981
|
network: network.type
|
|
3982
3982
|
},
|
|
@@ -4983,7 +4983,7 @@ var AddressDisplay = ({
|
|
|
4983
4983
|
// package.json
|
|
4984
4984
|
var package_default = {
|
|
4985
4985
|
name: "@vechain/vechain-kit",
|
|
4986
|
-
version: "1.5.
|
|
4986
|
+
version: "1.5.7",
|
|
4987
4987
|
private: false,
|
|
4988
4988
|
homepage: "https://github.com/vechain/vechain-kit",
|
|
4989
4989
|
repository: "github:vechain/vechain-kit",
|
|
@@ -6283,7 +6283,7 @@ var ActionButton = ({
|
|
|
6283
6283
|
flex: 1,
|
|
6284
6284
|
justifyContent: "flex-start",
|
|
6285
6285
|
alignItems: "flex-start",
|
|
6286
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "flex-start", children: [
|
|
6286
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "flex-start", alignItems: "baseline", children: [
|
|
6287
6287
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "400", children: title }),
|
|
6288
6288
|
showComingSoon && /* @__PURE__ */ jsxRuntime.jsx(react.Tag, { size: "sm", colorScheme: "red", children: t("Coming Soon!") }),
|
|
6289
6289
|
extraContent
|
|
@@ -6730,7 +6730,8 @@ var QuickActionButton = ({
|
|
|
6730
6730
|
icon,
|
|
6731
6731
|
label,
|
|
6732
6732
|
onClick,
|
|
6733
|
-
isDisabled
|
|
6733
|
+
isDisabled,
|
|
6734
|
+
showRedDot
|
|
6734
6735
|
}) => {
|
|
6735
6736
|
const { t } = reactI18next.useTranslation();
|
|
6736
6737
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6743,18 +6744,41 @@ var QuickActionButton = ({
|
|
|
6743
6744
|
isDisabled,
|
|
6744
6745
|
icon: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 4, children: [
|
|
6745
6746
|
/* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: icon, boxSize: 5, opacity: 0.9 }),
|
|
6746
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6747
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { p: 0, alignItems: "baseline", spacing: 1, children: [
|
|
6748
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "600", children: t(label, label) }),
|
|
6749
|
+
showRedDot && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6750
|
+
react.Box,
|
|
6751
|
+
{
|
|
6752
|
+
minWidth: "8px",
|
|
6753
|
+
height: "8px",
|
|
6754
|
+
bg: "red.500",
|
|
6755
|
+
borderRadius: "full",
|
|
6756
|
+
display: "flex",
|
|
6757
|
+
alignItems: "center",
|
|
6758
|
+
justifyContent: "center"
|
|
6759
|
+
}
|
|
6760
|
+
)
|
|
6761
|
+
] })
|
|
6747
6762
|
] }),
|
|
6748
6763
|
onClick
|
|
6749
6764
|
}
|
|
6750
6765
|
);
|
|
6751
6766
|
};
|
|
6752
6767
|
var QuickActionsSection = ({ mt, setCurrentContent }) => {
|
|
6753
|
-
const { account } = useWallet();
|
|
6768
|
+
const { account, smartAccount, connectedWallet } = useWallet();
|
|
6754
6769
|
const { totalBalance } = useBalances({
|
|
6755
6770
|
address: account?.address ?? ""
|
|
6756
6771
|
});
|
|
6757
6772
|
const { t } = reactI18next.useTranslation();
|
|
6773
|
+
const { data: upgradeRequired } = useUpgradeRequired(
|
|
6774
|
+
smartAccount?.address ?? "",
|
|
6775
|
+
connectedWallet?.address ?? "",
|
|
6776
|
+
3
|
|
6777
|
+
);
|
|
6778
|
+
const { getNotifications } = useNotifications();
|
|
6779
|
+
const notifications = getNotifications();
|
|
6780
|
+
const hasUnreadNotifications = notifications.some((n) => !n.isRead);
|
|
6781
|
+
const showRedDot = upgradeRequired || hasUnreadNotifications;
|
|
6758
6782
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "full", mt, spacing: 4, children: [
|
|
6759
6783
|
/* @__PURE__ */ jsxRuntime.jsx(react.Heading, { size: "xs", fontWeight: "500", w: "full", opacity: 0.5, children: t("Activities") }),
|
|
6760
6784
|
/* @__PURE__ */ jsxRuntime.jsx(react.Grid, { templateColumns: "repeat(3, 1fr)", gap: 2, w: "full", children: QUICK_ACTIONS.map((action) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6763,7 +6787,8 @@ var QuickActionsSection = ({ mt, setCurrentContent }) => {
|
|
|
6763
6787
|
icon: action.icon,
|
|
6764
6788
|
label: action.label,
|
|
6765
6789
|
onClick: () => action.onClick(setCurrentContent),
|
|
6766
|
-
isDisabled: action.isDisabled?.(totalBalance)
|
|
6790
|
+
isDisabled: action.isDisabled?.(totalBalance),
|
|
6791
|
+
showRedDot: showRedDot && action.label === "Settings"
|
|
6767
6792
|
},
|
|
6768
6793
|
action.label
|
|
6769
6794
|
)) })
|
|
@@ -6876,6 +6901,7 @@ var AccessAndSecurityContent = ({ setCurrentContent }) => {
|
|
|
6876
6901
|
const { t } = reactI18next.useTranslation();
|
|
6877
6902
|
const { exportWallet } = reactAuth.usePrivy();
|
|
6878
6903
|
const { showMfaEnrollmentModal } = reactAuth.useMfaEnrollment();
|
|
6904
|
+
const { setWalletRecovery } = reactAuth.useSetWalletRecovery();
|
|
6879
6905
|
const { connection, smartAccount, connectedWallet } = useWallet();
|
|
6880
6906
|
const { data: upgradeRequired } = useUpgradeRequired(
|
|
6881
6907
|
smartAccount?.address ?? "",
|
|
@@ -6922,6 +6948,38 @@ var AccessAndSecurityContent = ({ setCurrentContent }) => {
|
|
|
6922
6948
|
}
|
|
6923
6949
|
)
|
|
6924
6950
|
] }),
|
|
6951
|
+
upgradeRequired && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6952
|
+
ActionButton,
|
|
6953
|
+
{
|
|
6954
|
+
title: t("Upgrade Smart Account to V3"),
|
|
6955
|
+
description: t(
|
|
6956
|
+
"A new version is available for your account"
|
|
6957
|
+
),
|
|
6958
|
+
onClick: () => {
|
|
6959
|
+
setCurrentContent({
|
|
6960
|
+
type: "upgrade-smart-account",
|
|
6961
|
+
props: {
|
|
6962
|
+
setCurrentContent,
|
|
6963
|
+
initialContent: "access-and-security"
|
|
6964
|
+
}
|
|
6965
|
+
});
|
|
6966
|
+
},
|
|
6967
|
+
leftIcon: io5.IoCogSharp,
|
|
6968
|
+
extraContent: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6969
|
+
react.Box,
|
|
6970
|
+
{
|
|
6971
|
+
minWidth: "8px",
|
|
6972
|
+
height: "8px",
|
|
6973
|
+
bg: "red.500",
|
|
6974
|
+
borderRadius: "full",
|
|
6975
|
+
display: "flex",
|
|
6976
|
+
alignItems: "center",
|
|
6977
|
+
justifyContent: "center",
|
|
6978
|
+
ml: 2
|
|
6979
|
+
}
|
|
6980
|
+
)
|
|
6981
|
+
}
|
|
6982
|
+
),
|
|
6925
6983
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6926
6984
|
ActionButton,
|
|
6927
6985
|
{
|
|
@@ -6967,23 +7025,15 @@ var AccessAndSecurityContent = ({ setCurrentContent }) => {
|
|
|
6967
7025
|
leftIcon: hi2.HiOutlineShieldCheck
|
|
6968
7026
|
}
|
|
6969
7027
|
),
|
|
6970
|
-
|
|
7028
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6971
7029
|
ActionButton,
|
|
6972
7030
|
{
|
|
6973
|
-
title: t("
|
|
6974
|
-
description: t(
|
|
6975
|
-
"A new version is available for your account"
|
|
6976
|
-
),
|
|
7031
|
+
title: t("Manage Recovery"),
|
|
6977
7032
|
onClick: () => {
|
|
6978
|
-
|
|
6979
|
-
type: "upgrade-smart-account",
|
|
6980
|
-
props: {
|
|
6981
|
-
setCurrentContent,
|
|
6982
|
-
initialContent: "access-and-security"
|
|
6983
|
-
}
|
|
6984
|
-
});
|
|
7033
|
+
setWalletRecovery();
|
|
6985
7034
|
},
|
|
6986
|
-
|
|
7035
|
+
isDisabled: !connection.isConnectedWithSocialLogin,
|
|
7036
|
+
leftIcon: md.MdOutlineSettingsBackupRestore
|
|
6987
7037
|
}
|
|
6988
7038
|
)
|
|
6989
7039
|
]
|
|
@@ -7229,13 +7279,18 @@ var SettingsContent = ({
|
|
|
7229
7279
|
const contentRef = React10.useRef(null);
|
|
7230
7280
|
const { t } = reactI18next.useTranslation();
|
|
7231
7281
|
const { privy } = useVeChainKitConfig();
|
|
7232
|
-
const { connection, disconnect, account } = useWallet();
|
|
7282
|
+
const { connection, disconnect, account, smartAccount, connectedWallet } = useWallet();
|
|
7233
7283
|
const { getConnectionCache } = useCrossAppConnectionCache();
|
|
7234
7284
|
const connectionCache = getConnectionCache();
|
|
7235
7285
|
const { data: appInfo } = useFetchAppInfo(privy?.appId ?? "");
|
|
7236
7286
|
const { getNotifications } = useNotifications();
|
|
7237
7287
|
const notifications = getNotifications();
|
|
7238
7288
|
const hasUnreadNotifications = notifications.some((n) => !n.isRead);
|
|
7289
|
+
const { data: upgradeRequired } = useUpgradeRequired(
|
|
7290
|
+
smartAccount?.address ?? "",
|
|
7291
|
+
connectedWallet?.address ?? "",
|
|
7292
|
+
3
|
|
7293
|
+
);
|
|
7239
7294
|
React10.useEffect(() => {
|
|
7240
7295
|
if (contentRef.current) {
|
|
7241
7296
|
contentRef.current.scrollTop = 0;
|
|
@@ -7296,7 +7351,19 @@ var SettingsContent = ({
|
|
|
7296
7351
|
setCurrentContent("access-and-security");
|
|
7297
7352
|
},
|
|
7298
7353
|
leftIcon: io5.IoShieldOutline,
|
|
7299
|
-
rightIcon: md.MdOutlineNavigateNext
|
|
7354
|
+
rightIcon: md.MdOutlineNavigateNext,
|
|
7355
|
+
extraContent: upgradeRequired && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7356
|
+
react.Box,
|
|
7357
|
+
{
|
|
7358
|
+
minWidth: "8px",
|
|
7359
|
+
height: "8px",
|
|
7360
|
+
bg: "red.500",
|
|
7361
|
+
borderRadius: "full",
|
|
7362
|
+
display: "flex",
|
|
7363
|
+
alignItems: "center",
|
|
7364
|
+
justifyContent: "center"
|
|
7365
|
+
}
|
|
7366
|
+
)
|
|
7300
7367
|
}
|
|
7301
7368
|
),
|
|
7302
7369
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7334,17 +7401,13 @@ var SettingsContent = ({
|
|
|
7334
7401
|
extraContent: hasUnreadNotifications && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7335
7402
|
react.Box,
|
|
7336
7403
|
{
|
|
7337
|
-
minWidth: "
|
|
7338
|
-
height: "
|
|
7404
|
+
minWidth: "8px",
|
|
7405
|
+
height: "8px",
|
|
7339
7406
|
bg: "red.500",
|
|
7340
7407
|
borderRadius: "full",
|
|
7341
7408
|
display: "flex",
|
|
7342
7409
|
alignItems: "center",
|
|
7343
|
-
justifyContent: "center"
|
|
7344
|
-
ml: 2,
|
|
7345
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", color: "white", children: notifications.filter(
|
|
7346
|
-
(n) => !n.isRead
|
|
7347
|
-
).length })
|
|
7410
|
+
justifyContent: "center"
|
|
7348
7411
|
}
|
|
7349
7412
|
)
|
|
7350
7413
|
}
|
|
@@ -8301,6 +8364,10 @@ var SendTokenSummaryContent = ({
|
|
|
8301
8364
|
return selectedToken.symbol === "VET" ? transferVETReceipt : transferERC20Receipt;
|
|
8302
8365
|
};
|
|
8303
8366
|
const handleSend = async () => {
|
|
8367
|
+
if (upgradeRequired) {
|
|
8368
|
+
openUpgradeSmartAccountModal();
|
|
8369
|
+
return;
|
|
8370
|
+
}
|
|
8304
8371
|
try {
|
|
8305
8372
|
if (selectedToken.symbol === "VET") {
|
|
8306
8373
|
await transferVET();
|
|
@@ -8313,11 +8380,6 @@ var SendTokenSummaryContent = ({
|
|
|
8313
8380
|
};
|
|
8314
8381
|
const isTxWaitingConfirmation = transferERC20WaitingForWalletConfirmation || transferVETWaitingForWalletConfirmation;
|
|
8315
8382
|
const isSubmitting = isTxWaitingConfirmation || transferERC20Pending || transferVETPending;
|
|
8316
|
-
React10.useEffect(() => {
|
|
8317
|
-
if (upgradeRequired) {
|
|
8318
|
-
openUpgradeSmartAccountModal();
|
|
8319
|
-
}
|
|
8320
|
-
}, [upgradeRequired, openUpgradeSmartAccountModal]);
|
|
8321
8383
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8322
8384
|
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
8323
8385
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalHeader, { children: "Send" }),
|
|
@@ -8416,7 +8478,7 @@ var SendTokenSummaryContent = ({
|
|
|
8416
8478
|
transactionPendingText: t("Sending..."),
|
|
8417
8479
|
txReceipt: getTxReceipt(),
|
|
8418
8480
|
buttonText: t("Confirm"),
|
|
8419
|
-
isDisabled: isSubmitting
|
|
8481
|
+
isDisabled: isSubmitting
|
|
8420
8482
|
}
|
|
8421
8483
|
) })
|
|
8422
8484
|
] });
|
|
@@ -8882,17 +8944,16 @@ var ChooseNameSummaryContent = ({
|
|
|
8882
8944
|
}
|
|
8883
8945
|
});
|
|
8884
8946
|
const handleConfirm = async () => {
|
|
8947
|
+
if (upgradeRequired) {
|
|
8948
|
+
openUpgradeSmartAccountModal();
|
|
8949
|
+
return;
|
|
8950
|
+
}
|
|
8885
8951
|
try {
|
|
8886
8952
|
await sendTransaction();
|
|
8887
8953
|
} catch (error) {
|
|
8888
8954
|
console.error("Transaction failed:", error);
|
|
8889
8955
|
}
|
|
8890
8956
|
};
|
|
8891
|
-
React10.useEffect(() => {
|
|
8892
|
-
if (upgradeRequired) {
|
|
8893
|
-
openUpgradeSmartAccountModal();
|
|
8894
|
-
}
|
|
8895
|
-
}, [upgradeRequired, openUpgradeSmartAccountModal]);
|
|
8896
8957
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8897
8958
|
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
8898
8959
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalHeader, { children: t("Confirm Name") }),
|
|
@@ -8926,7 +8987,7 @@ var ChooseNameSummaryContent = ({
|
|
|
8926
8987
|
transactionPendingText: t("Claiming name..."),
|
|
8927
8988
|
txReceipt,
|
|
8928
8989
|
buttonText: t("Confirm"),
|
|
8929
|
-
isDisabled: isTransactionPending
|
|
8990
|
+
isDisabled: isTransactionPending
|
|
8930
8991
|
}
|
|
8931
8992
|
) })
|
|
8932
8993
|
] });
|
|
@@ -9311,6 +9372,7 @@ var en_default = {
|
|
|
9311
9372
|
Mainnet: "Mainnet",
|
|
9312
9373
|
"Manage Custom Tokens": "Manage Custom Tokens",
|
|
9313
9374
|
"Manage MFA": "Manage MFA",
|
|
9375
|
+
"Manage Recovery": "Manage Recovery",
|
|
9314
9376
|
"Manage multi-factor authentication settings for your wallet.": "Manage multi-factor authentication settings for your wallet.",
|
|
9315
9377
|
"Manage on VeBetterDAO": "Manage on VeBetterDAO",
|
|
9316
9378
|
"Manage passkey login": "Manage passkey login",
|
|
@@ -9792,6 +9854,7 @@ var de_default = {
|
|
|
9792
9854
|
Mainnet: "Mainnet",
|
|
9793
9855
|
"Manage Custom Tokens": "Benutzerdefinierte Token verwalten",
|
|
9794
9856
|
"Manage MFA": "MFA verwalten",
|
|
9857
|
+
"Manage Recovery": "Wiederherstellung verwalten",
|
|
9795
9858
|
"Manage multi-factor authentication settings for your wallet.": "Verwalten Sie die Einstellungen zur Multi-Faktor-Authentifizierung f\xFCr Ihr Wallet.",
|
|
9796
9859
|
"Manage on VeBetterDAO": "Verwalten auf VeBetterDAO",
|
|
9797
9860
|
"Manage passkey login": "Passkey-Anmeldung verwalten",
|
|
@@ -10273,6 +10336,7 @@ var it_default = {
|
|
|
10273
10336
|
Mainnet: "Mainnet",
|
|
10274
10337
|
"Manage Custom Tokens": "Gestisci Token Personalizzati",
|
|
10275
10338
|
"Manage MFA": "Gestisci MFA",
|
|
10339
|
+
"Manage Recovery": "Gestisci Recupero",
|
|
10276
10340
|
"Manage multi-factor authentication settings for your wallet.": "Gestisci le impostazioni di autenticazione a pi\xF9 fattori per il tuo portafoglio.",
|
|
10277
10341
|
"Manage on VeBetterDAO": "Gestisci su VeBetterDAO",
|
|
10278
10342
|
"Manage passkey login": "Gestisci login con chiave di accesso",
|
|
@@ -10754,6 +10818,7 @@ var fr_default = {
|
|
|
10754
10818
|
Mainnet: "Mainnet",
|
|
10755
10819
|
"Manage Custom Tokens": "G\xE9rer les jetons personnalis\xE9s",
|
|
10756
10820
|
"Manage MFA": "G\xE9rer la MFA",
|
|
10821
|
+
"Manage Recovery": "G\xE9rer la r\xE9cup\xE9ration",
|
|
10757
10822
|
"Manage multi-factor authentication settings for your wallet.": "G\xE9rez les param\xE8tres d'authentification \xE0 plusieurs facteurs pour votre portefeuille.",
|
|
10758
10823
|
"Manage on VeBetterDAO": "G\xE9rer sur VeBetterDAO",
|
|
10759
10824
|
"Manage passkey login": "G\xE9rer la connexion par cl\xE9 de passe",
|
|
@@ -11235,6 +11300,7 @@ var es_default = {
|
|
|
11235
11300
|
Mainnet: "Red principal",
|
|
11236
11301
|
"Manage Custom Tokens": "Gestionar tokens personalizados",
|
|
11237
11302
|
"Manage MFA": "Gestionar MFA",
|
|
11303
|
+
"Manage Recovery": "Gestionar la Recuperaci\xF3n",
|
|
11238
11304
|
"Manage multi-factor authentication settings for your wallet.": "Gestionar configuraciones de autenticaci\xF3n multifactor para tu billetera.",
|
|
11239
11305
|
"Manage on VeBetterDAO": "Gestionar en VeBetterDAO",
|
|
11240
11306
|
"Manage passkey login": "Administrar inicio de sesi\xF3n con llave de acceso",
|
|
@@ -11716,6 +11782,7 @@ var zh_default = {
|
|
|
11716
11782
|
Mainnet: "\u4E3B\u7F51",
|
|
11717
11783
|
"Manage Custom Tokens": "\u7BA1\u7406\u81EA\u5B9A\u4E49\u4EE3\u5E01",
|
|
11718
11784
|
"Manage MFA": "\u7BA1\u7406\u591A\u56E0\u7D20\u8BA4\u8BC1",
|
|
11785
|
+
"Manage Recovery": "\u7BA1\u7406\u6062\u590D",
|
|
11719
11786
|
"Manage multi-factor authentication settings for your wallet.": "\u7BA1\u7406\u60A8\u94B1\u5305\u7684\u591A\u56E0\u7D20\u8BA4\u8BC1\u8BBE\u7F6E\u3002",
|
|
11720
11787
|
"Manage on VeBetterDAO": "\u5728VeBetterDAO\u4E0A\u7BA1\u7406",
|
|
11721
11788
|
"Manage passkey login": "\u7BA1\u7406\u5BC6\u7801\u767B\u5F55",
|
|
@@ -12197,6 +12264,7 @@ var ja_default = {
|
|
|
12197
12264
|
Mainnet: "\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8",
|
|
12198
12265
|
"Manage Custom Tokens": "\u30AB\u30B9\u30BF\u30E0\u30C8\u30FC\u30AF\u30F3\u306E\u7BA1\u7406",
|
|
12199
12266
|
"Manage MFA": "MFA\u3092\u7BA1\u7406\u3059\u308B",
|
|
12267
|
+
"Manage Recovery": "\u30EA\u30AB\u30D0\u30EA\u30FC\u306E\u7BA1\u7406",
|
|
12200
12268
|
"Manage multi-factor authentication settings for your wallet.": "\u30A6\u30A9\u30EC\u30C3\u30C8\u306E\u591A\u8981\u7D20\u8A8D\u8A3C\u8A2D\u5B9A\u3092\u7BA1\u7406\u3059\u308B\u3002",
|
|
12201
12269
|
"Manage on VeBetterDAO": "VeBetterDAO\u3067\u7BA1\u7406",
|
|
12202
12270
|
"Manage passkey login": "\u30D1\u30B9\u30AD\u30FC\u306E\u30ED\u30B0\u30A4\u30F3\u3092\u7BA1\u7406",
|
|
@@ -13088,13 +13156,17 @@ var CustomizationSummaryContent = ({
|
|
|
13088
13156
|
"Your changes have been saved successfully."
|
|
13089
13157
|
),
|
|
13090
13158
|
onDone: () => {
|
|
13091
|
-
setCurrentContent("
|
|
13159
|
+
setCurrentContent("profile");
|
|
13092
13160
|
}
|
|
13093
13161
|
}
|
|
13094
13162
|
});
|
|
13095
13163
|
}
|
|
13096
13164
|
});
|
|
13097
13165
|
const onSubmit = async (data) => {
|
|
13166
|
+
if (upgradeRequired) {
|
|
13167
|
+
openUpgradeSmartAccountModal();
|
|
13168
|
+
return;
|
|
13169
|
+
}
|
|
13098
13170
|
try {
|
|
13099
13171
|
const domain2 = account?.domain ?? "";
|
|
13100
13172
|
const CHANGES_TO_TEXT_RECORDS = {
|
|
@@ -13133,11 +13205,6 @@ var CustomizationSummaryContent = ({
|
|
|
13133
13205
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "md", children: value })
|
|
13134
13206
|
] });
|
|
13135
13207
|
};
|
|
13136
|
-
React10.useEffect(() => {
|
|
13137
|
-
if (upgradeRequired) {
|
|
13138
|
-
openUpgradeSmartAccountModal();
|
|
13139
|
-
}
|
|
13140
|
-
}, [upgradeRequired, openUpgradeSmartAccountModal]);
|
|
13141
13208
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "form", onSubmit: handleSubmit(onSubmit), children: [
|
|
13142
13209
|
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
13143
13210
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalHeader, { children: t("Confirm Changes") }),
|
|
@@ -13178,7 +13245,7 @@ var CustomizationSummaryContent = ({
|
|
|
13178
13245
|
transactionPendingText: t("Saving changes..."),
|
|
13179
13246
|
txReceipt,
|
|
13180
13247
|
buttonText: t("Confirm"),
|
|
13181
|
-
isDisabled: isTransactionPending
|
|
13248
|
+
isDisabled: isTransactionPending
|
|
13182
13249
|
}
|
|
13183
13250
|
) })
|
|
13184
13251
|
] });
|
|
@@ -16928,6 +16995,21 @@ var useUpgradeSmartAccountModal = (style) => {
|
|
|
16928
16995
|
var UpgradeSmartAccountModalProvider = ({
|
|
16929
16996
|
children
|
|
16930
16997
|
}) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
16998
|
+
var useProfileModal = () => {
|
|
16999
|
+
const { openAccountModal, closeAccountModal, isAccountModalOpen } = useModal();
|
|
17000
|
+
const open = () => {
|
|
17001
|
+
openAccountModal("profile");
|
|
17002
|
+
};
|
|
17003
|
+
const close = () => {
|
|
17004
|
+
closeAccountModal();
|
|
17005
|
+
};
|
|
17006
|
+
return {
|
|
17007
|
+
open,
|
|
17008
|
+
close,
|
|
17009
|
+
isOpen: isAccountModalOpen
|
|
17010
|
+
};
|
|
17011
|
+
};
|
|
17012
|
+
var ProfileModalProvider = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
16931
17013
|
var ERC20Interface4 = chunk5GZ7N47F_cjs.ERC20__factory.createInterface();
|
|
16932
17014
|
var useTransferERC20 = ({
|
|
16933
17015
|
fromAddress,
|
|
@@ -17708,11 +17790,20 @@ var useVeChainKitConfig = () => {
|
|
|
17708
17790
|
};
|
|
17709
17791
|
var validateConfig = (props) => {
|
|
17710
17792
|
const errors = [];
|
|
17711
|
-
|
|
17712
|
-
|
|
17713
|
-
|
|
17714
|
-
|
|
17715
|
-
|
|
17793
|
+
const requiresFeeDelegation = props.privy !== void 0 || props.loginMethods?.some(
|
|
17794
|
+
(method35) => method35.method === "vechain" || method35.method === "ecosystem"
|
|
17795
|
+
);
|
|
17796
|
+
if (requiresFeeDelegation) {
|
|
17797
|
+
if (!props.feeDelegation) {
|
|
17798
|
+
errors.push(
|
|
17799
|
+
"feeDelegation configuration is required when using Privy or vechain login method"
|
|
17800
|
+
);
|
|
17801
|
+
} else {
|
|
17802
|
+
if (!props.feeDelegation || !props.feeDelegation.delegatorUrl) {
|
|
17803
|
+
errors.push(
|
|
17804
|
+
"feeDelegation.delegatorUrl is required when using Privy or vechain login method"
|
|
17805
|
+
);
|
|
17806
|
+
}
|
|
17716
17807
|
}
|
|
17717
17808
|
}
|
|
17718
17809
|
if (!props.network) {
|
|
@@ -17878,8 +17969,8 @@ var VeChainKitProvider = (props) => {
|
|
|
17878
17969
|
PrivyWalletProvider,
|
|
17879
17970
|
{
|
|
17880
17971
|
nodeUrl: network.nodeUrl ?? chunkRUIC653T_cjs.getConfig(network.type).nodeUrl,
|
|
17881
|
-
delegatorUrl: feeDelegation
|
|
17882
|
-
delegateAllTransactions: feeDelegation
|
|
17972
|
+
delegatorUrl: feeDelegation?.delegatorUrl ?? "",
|
|
17973
|
+
delegateAllTransactions: feeDelegation?.delegateAllTransactions ?? false,
|
|
17883
17974
|
children: /* @__PURE__ */ jsxRuntime.jsx(ModalProvider, { children })
|
|
17884
17975
|
}
|
|
17885
17976
|
)
|
|
@@ -18210,6 +18301,10 @@ Object.defineProperty(exports, "usePrivy", {
|
|
|
18210
18301
|
enumerable: true,
|
|
18211
18302
|
get: function () { return reactAuth.usePrivy; }
|
|
18212
18303
|
});
|
|
18304
|
+
Object.defineProperty(exports, "useSetWalletRecovery", {
|
|
18305
|
+
enumerable: true,
|
|
18306
|
+
get: function () { return reactAuth.useSetWalletRecovery; }
|
|
18307
|
+
});
|
|
18213
18308
|
Object.defineProperty(exports, "DAppKitWalletButton", {
|
|
18214
18309
|
enumerable: true,
|
|
18215
18310
|
get: function () { return dappKitReact.WalletButton; }
|
|
@@ -18286,6 +18381,7 @@ exports.PrivyButton = PrivyButton;
|
|
|
18286
18381
|
exports.PrivyWalletProvider = PrivyWalletProvider;
|
|
18287
18382
|
exports.ProfileCard = ProfileCard;
|
|
18288
18383
|
exports.ProfileContent = ProfileContent;
|
|
18384
|
+
exports.ProfileModalProvider = ProfileModalProvider;
|
|
18289
18385
|
exports.QuickActionsSection = QuickActionsSection;
|
|
18290
18386
|
exports.ReceiveModalProvider = ReceiveModalProvider;
|
|
18291
18387
|
exports.ReceiveTokenContent = ReceiveTokenContent;
|
|
@@ -18573,6 +18669,7 @@ exports.useParticipatedInGovernance = useParticipatedInGovernance;
|
|
|
18573
18669
|
exports.useParticipationScoreThreshold = useParticipationScoreThreshold;
|
|
18574
18670
|
exports.usePassportChecks = usePassportChecks;
|
|
18575
18671
|
exports.usePrivyWalletProvider = usePrivyWalletProvider;
|
|
18672
|
+
exports.useProfileModal = useProfileModal;
|
|
18576
18673
|
exports.useReceiveModal = useReceiveModal;
|
|
18577
18674
|
exports.useRefreshBalances = useRefreshBalances;
|
|
18578
18675
|
exports.useRefreshMetadata = useRefreshMetadata;
|