@embarkai/ui-kit 0.4.64 → 0.4.66
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/iframe/index.html +1 -1
- package/dist/iframe/main.js +1 -1
- package/dist/index.cjs +309 -308
- package/dist/index.d.cts +21 -4
- package/dist/index.d.ts +21 -4
- package/dist/index.js +158 -160
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -841,7 +841,7 @@ var init_iframe_mpc_client = __esm({
|
|
|
841
841
|
});
|
|
842
842
|
|
|
843
843
|
// src/internal/constants.ts
|
|
844
|
-
var import_lucide_react, LOCAL_COLOR_MODE_KEY, LOOCAL_BACKUP_STATUS_KEY, DEFAULT_AUTH_MENU_HEIGHT, DEFAULT_MAIN_MENU_HEIGHT, MAX_CONTENT_HEIGHT, MAIN_DIALOG_ANIMATION_SPEED, Y_ANIMATION_SETUP, BLOCKSCOUT_QUERY_STALE_TIME, BLOCKSCOUT_QUERY_GC_TIME, BLOCKSCOUT_REFRESH_DEBOUNCE, IPFS_GATEWAY, PROVIDERS_META
|
|
844
|
+
var import_lucide_react, LOCAL_COLOR_MODE_KEY, LOOCAL_BACKUP_STATUS_KEY, DEFAULT_AUTH_MENU_HEIGHT, DEFAULT_MAIN_MENU_HEIGHT, MAX_CONTENT_HEIGHT, MAIN_DIALOG_ANIMATION_SPEED, Y_ANIMATION_SETUP, BLOCKSCOUT_QUERY_STALE_TIME, BLOCKSCOUT_QUERY_GC_TIME, BLOCKSCOUT_REFRESH_DEBOUNCE, IPFS_GATEWAY, PROVIDERS_META;
|
|
845
845
|
var init_constants = __esm({
|
|
846
846
|
"src/internal/constants.ts"() {
|
|
847
847
|
import_lucide_react = require("lucide-react");
|
|
@@ -868,7 +868,6 @@ var init_constants = __esm({
|
|
|
868
868
|
// Alias for twitter (API uses 'x')
|
|
869
869
|
wallet: { name: "Wallet", icon: import_lucide_react.Wallet2, description: "External wallet (EOA)" }
|
|
870
870
|
};
|
|
871
|
-
WRAPPED_TOKENS = ["WETH", "WBTC", "WBNB", "WLUMIA"];
|
|
872
871
|
}
|
|
873
872
|
});
|
|
874
873
|
|
|
@@ -944,18 +943,58 @@ var init_useLayoutDataStore = __esm({
|
|
|
944
943
|
}
|
|
945
944
|
});
|
|
946
945
|
|
|
947
|
-
// src/internal/components/BalanceFeedProvider/
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
946
|
+
// src/internal/components/BalanceFeedProvider/constants.ts
|
|
947
|
+
var BALANCE_POLLING_INTERVAL, NATIVE_BALANCE_QUERY_KEY, CUSTOM_BALANCE_QUERY_KEY, ASSET_RATE_QUERY_KEY, SKIP_SYMBOLS, WRAPPED_TOKENS;
|
|
948
|
+
var init_constants2 = __esm({
|
|
949
|
+
"src/internal/components/BalanceFeedProvider/constants.ts"() {
|
|
950
|
+
BALANCE_POLLING_INTERVAL = 3e4;
|
|
951
|
+
NATIVE_BALANCE_QUERY_KEY = "embarkai-native-balance-query-key";
|
|
952
|
+
CUSTOM_BALANCE_QUERY_KEY = "embarkai-custom-balance-query-key";
|
|
953
|
+
ASSET_RATE_QUERY_KEY = "embarkai-asset-rate-query-key";
|
|
954
|
+
SKIP_SYMBOLS = ["TEST", "USDT", "P", "$P USDT"];
|
|
955
|
+
WRAPPED_TOKENS = {
|
|
956
|
+
WETH: "ETH"
|
|
957
|
+
};
|
|
957
958
|
}
|
|
959
|
+
});
|
|
960
|
+
|
|
961
|
+
// src/internal/components/BalanceFeedProvider/useAssetRate.ts
|
|
962
|
+
function checkWrapedTokenSymbol(symbol) {
|
|
963
|
+
return WRAPPED_TOKENS[symbol] || symbol;
|
|
964
|
+
}
|
|
965
|
+
async function getAssetRate(symbol, asSymbol) {
|
|
966
|
+
const asTarget = asSymbol || "USDT";
|
|
967
|
+
if (SKIP_SYMBOLS.includes(symbol) || symbol === asTarget) return { symbol, price: "1" };
|
|
968
|
+
const apiTicker = `${checkWrapedTokenSymbol(symbol)}${asTarget}`;
|
|
969
|
+
return await fetch(`${ASSET_API_URL}?symbol=${apiTicker}`).then(async (res) => await res.json()).catch((err) => {
|
|
970
|
+
console.warn("[ASSET RATE] Failed & fallbacked to price 1:", { symbol: apiTicker, error: err });
|
|
971
|
+
return { symbol, price: "1" };
|
|
972
|
+
});
|
|
958
973
|
}
|
|
974
|
+
function useAssetUsdtRate(assetSymbol, options) {
|
|
975
|
+
const { disabled, refetchInterval, staleTime } = options || {};
|
|
976
|
+
const address = useSession((st) => st.address);
|
|
977
|
+
return (0, import_react_query.useQuery)({
|
|
978
|
+
queryKey: [ASSET_RATE_QUERY_KEY, address, assetSymbol],
|
|
979
|
+
enabled: !disabled && !!address && !!assetSymbol,
|
|
980
|
+
// && !isProjectAsset && !isNft && !isSecurity
|
|
981
|
+
refetchInterval: refetchInterval || BALANCE_POLLING_INTERVAL * 2,
|
|
982
|
+
staleTime: staleTime || BALANCE_POLLING_INTERVAL * 2,
|
|
983
|
+
// keeps the data fresh for 1 minute before considering it stale
|
|
984
|
+
queryFn: async () => await getAssetRate(assetSymbol)
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
var import_react_query, ASSET_API_URL;
|
|
988
|
+
var init_useAssetRate = __esm({
|
|
989
|
+
"src/internal/components/BalanceFeedProvider/useAssetRate.ts"() {
|
|
990
|
+
init_SessionContext();
|
|
991
|
+
import_react_query = require("@tanstack/react-query");
|
|
992
|
+
init_constants2();
|
|
993
|
+
ASSET_API_URL = "https://api.binance.com/api/v3/ticker/price";
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
|
|
997
|
+
// src/internal/components/BalanceFeedProvider/BalanceFeedProvider.tsx
|
|
959
998
|
function BalanceFeedProvider() {
|
|
960
999
|
const config = useProviderConfig().config;
|
|
961
1000
|
const address = useSession((st) => st.address);
|
|
@@ -970,14 +1009,9 @@ function BalanceFeedProvider() {
|
|
|
970
1009
|
() => useLayoutDataStore.getState().setCryptoSymbol(chainConfig?.nativeCurrency?.symbol || "LUMIA"),
|
|
971
1010
|
[chainConfig]
|
|
972
1011
|
);
|
|
973
|
-
const { data: cryptoRate } = (
|
|
974
|
-
queryKey: [LUMIA_RATE_QUERY_KEY, address, balanceSymbol],
|
|
975
|
-
enabled: !!address && !!balanceSymbol,
|
|
976
|
-
refetchInterval: BALANCE_POLLING_INTERVAL * 2,
|
|
977
|
-
queryFn: async () => await getAssetRate(balanceSymbol, "USDT")
|
|
978
|
-
});
|
|
1012
|
+
const { data: cryptoRate } = useAssetUsdtRate(balanceSymbol);
|
|
979
1013
|
const isNativeBalanceFeedEnabled = !!balanceSymbol && !!chainConfig?.nativeCurrency.symbol && balanceSymbol === chainConfig?.nativeCurrency.symbol;
|
|
980
|
-
const { data: nativeBalance } = (0,
|
|
1014
|
+
const { data: nativeBalance } = (0, import_react_query2.useQuery)({
|
|
981
1015
|
enabled: !!isNativeBalanceFeedEnabled && !!address && !!publicClient,
|
|
982
1016
|
retry: false,
|
|
983
1017
|
refetchInterval: BALANCE_POLLING_INTERVAL,
|
|
@@ -1011,7 +1045,7 @@ function BalanceFeedProvider() {
|
|
|
1011
1045
|
symbol: projectAssetAssetSymbol
|
|
1012
1046
|
} = config.current?.projectAssets?.assets?.find((a) => a.symbol === config.current?.showBalanceAs) || {};
|
|
1013
1047
|
const isProjectAssetBalanceEnabled = !!balanceSymbol && !!projectAssetAssetSymbol && balanceSymbol === projectAssetAssetSymbol;
|
|
1014
|
-
const { data: projectAssetBalance } = (0,
|
|
1048
|
+
const { data: projectAssetBalance } = (0, import_react_query2.useQuery)({
|
|
1015
1049
|
retry: false,
|
|
1016
1050
|
refetchInterval: BALANCE_POLLING_INTERVAL,
|
|
1017
1051
|
enabled: !!address && !!isProjectAssetBalanceEnabled,
|
|
@@ -1035,7 +1069,7 @@ function BalanceFeedProvider() {
|
|
|
1035
1069
|
});
|
|
1036
1070
|
}, [isProjectAssetBalanceEnabled, projectAssetBalance]);
|
|
1037
1071
|
const isCustomAssetBalanceEnabled = !isNativeBalanceFeedEnabled && !isProjectAssetBalanceEnabled;
|
|
1038
|
-
const { data: customBalance } = (0,
|
|
1072
|
+
const { data: customBalance } = (0, import_react_query2.useQuery)({
|
|
1039
1073
|
enabled: !!isCustomAssetBalanceEnabled && !!balanceSymbol && !!chainConfig?.id && !!address && !!publicClient,
|
|
1040
1074
|
retry: false,
|
|
1041
1075
|
refetchInterval: BALANCE_POLLING_INTERVAL,
|
|
@@ -1083,21 +1117,18 @@ function BalanceFeedProvider() {
|
|
|
1083
1117
|
}, [isCustomAssetBalanceEnabled, customBalance, cryptoRate]);
|
|
1084
1118
|
return null;
|
|
1085
1119
|
}
|
|
1086
|
-
var import_read2,
|
|
1120
|
+
var import_read2, import_react_query2, import_react, import_viem2;
|
|
1087
1121
|
var init_BalanceFeedProvider = __esm({
|
|
1088
1122
|
"src/internal/components/BalanceFeedProvider/BalanceFeedProvider.tsx"() {
|
|
1089
1123
|
init_ProviderContext();
|
|
1090
1124
|
init_SessionContext();
|
|
1091
1125
|
import_read2 = require("@embarkai/core/read");
|
|
1092
|
-
|
|
1126
|
+
import_react_query2 = require("@tanstack/react-query");
|
|
1093
1127
|
import_react = require("react");
|
|
1094
1128
|
import_viem2 = require("viem");
|
|
1095
1129
|
init_useLayoutDataStore();
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
CUSTOM_BALANCE_QUERY_KEY = "embarkai-custom-balance-query-key";
|
|
1099
|
-
LUMIA_RATE_QUERY_KEY = "lembarkai-root-balance-rate-query-key";
|
|
1100
|
-
SKIP_SYMBOLS = ["TEST", "USDT", "P", "$P USDT"];
|
|
1130
|
+
init_constants2();
|
|
1131
|
+
init_useAssetRate();
|
|
1101
1132
|
}
|
|
1102
1133
|
});
|
|
1103
1134
|
|
|
@@ -1105,12 +1136,13 @@ var init_BalanceFeedProvider = __esm({
|
|
|
1105
1136
|
var init_BalanceFeedProvider2 = __esm({
|
|
1106
1137
|
"src/internal/components/BalanceFeedProvider/index.ts"() {
|
|
1107
1138
|
init_BalanceFeedProvider();
|
|
1139
|
+
init_useAssetRate();
|
|
1108
1140
|
}
|
|
1109
1141
|
});
|
|
1110
1142
|
|
|
1111
1143
|
// src/internal/clients/account/constants.ts
|
|
1112
1144
|
var PAYMASTER_VERIFICATION_GAS_LIMIT, PAYMASTER_POSTOP_GAS_LIMIT, MAX_BUNDLER_VERIFICATION_GAS, PAYMASTER_VERIFICATION_GAS, PAYMASTER_POSTOP_GAS, SALT_ZERO, SALT_ZERO_UINT256, COMPAT_CREATE_ABI, executeAbi, executeBatchAbi, entryPointDepositAbi;
|
|
1113
|
-
var
|
|
1145
|
+
var init_constants3 = __esm({
|
|
1114
1146
|
"src/internal/clients/account/constants.ts"() {
|
|
1115
1147
|
PAYMASTER_VERIFICATION_GAS_LIMIT = "0x249f0";
|
|
1116
1148
|
PAYMASTER_POSTOP_GAS_LIMIT = "0x186a0";
|
|
@@ -1243,12 +1275,12 @@ var init_helpers = __esm({
|
|
|
1243
1275
|
// src/internal/components/ChainSync/ChainSync.tsx
|
|
1244
1276
|
function ChainSync() {
|
|
1245
1277
|
const { config, callbacksRef } = useProviderConfig();
|
|
1246
|
-
const qc = (0,
|
|
1278
|
+
const qc = (0, import_react_query3.useQueryClient)();
|
|
1247
1279
|
const address = useSession((st) => st.address);
|
|
1248
1280
|
const session = useSession((st) => st.session);
|
|
1249
1281
|
const activeChainId = useSession((st) => st.activeChainId);
|
|
1250
1282
|
const prevChainId = (0, import_react2.useRef)(null);
|
|
1251
|
-
const { mutate: updateChain } = (0,
|
|
1283
|
+
const { mutate: updateChain } = (0, import_react_query3.useMutation)({
|
|
1252
1284
|
mutationFn: async (toChainId) => {
|
|
1253
1285
|
if (!toChainId) {
|
|
1254
1286
|
console.warn("[CHAIN_SYNC] No target chainId provided, skipping chain update");
|
|
@@ -1344,17 +1376,17 @@ function ChainSync() {
|
|
|
1344
1376
|
}, [address, activeChainId]);
|
|
1345
1377
|
return null;
|
|
1346
1378
|
}
|
|
1347
|
-
var import_read3,
|
|
1379
|
+
var import_read3, import_react_query3, import_lodash_es, import_react2;
|
|
1348
1380
|
var init_ChainSync = __esm({
|
|
1349
1381
|
"src/internal/components/ChainSync/ChainSync.tsx"() {
|
|
1350
1382
|
init_ProviderContext();
|
|
1351
1383
|
init_SessionContext();
|
|
1352
1384
|
import_read3 = require("@embarkai/core/read");
|
|
1353
|
-
|
|
1385
|
+
import_react_query3 = require("@tanstack/react-query");
|
|
1354
1386
|
import_lodash_es = require("lodash-es");
|
|
1355
1387
|
import_react2 = require("react");
|
|
1356
1388
|
init_auth();
|
|
1357
|
-
|
|
1389
|
+
init_constants3();
|
|
1358
1390
|
init_helpers();
|
|
1359
1391
|
init_useLayoutDataStore();
|
|
1360
1392
|
init_vaultClient();
|
|
@@ -1528,7 +1560,7 @@ var init_session = __esm({
|
|
|
1528
1560
|
import_accounts = require("viem/accounts");
|
|
1529
1561
|
import_read4 = require("@embarkai/core/read");
|
|
1530
1562
|
init_iframe_mpc_client();
|
|
1531
|
-
|
|
1563
|
+
init_constants3();
|
|
1532
1564
|
init_helpers();
|
|
1533
1565
|
init_register_smart_account_address();
|
|
1534
1566
|
}
|
|
@@ -1832,7 +1864,7 @@ var init_user_operations = __esm({
|
|
|
1832
1864
|
import_accounts2 = require("viem/accounts");
|
|
1833
1865
|
init_akHelpers();
|
|
1834
1866
|
init_iframe_mpc_client();
|
|
1835
|
-
|
|
1867
|
+
init_constants3();
|
|
1836
1868
|
init_helpers();
|
|
1837
1869
|
init_resolve_paymaster();
|
|
1838
1870
|
}
|
|
@@ -2002,14 +2034,14 @@ var init_deposit_for_smart_account = __esm({
|
|
|
2002
2034
|
import_viem5 = require("viem");
|
|
2003
2035
|
import_accounts4 = require("viem/accounts");
|
|
2004
2036
|
init_base2();
|
|
2005
|
-
|
|
2037
|
+
init_constants3();
|
|
2006
2038
|
}
|
|
2007
2039
|
});
|
|
2008
2040
|
|
|
2009
2041
|
// src/internal/clients/account/index.ts
|
|
2010
2042
|
var init_account = __esm({
|
|
2011
2043
|
"src/internal/clients/account/index.ts"() {
|
|
2012
|
-
|
|
2044
|
+
init_constants3();
|
|
2013
2045
|
init_session();
|
|
2014
2046
|
init_user_operations();
|
|
2015
2047
|
init_signing();
|
|
@@ -2540,7 +2572,7 @@ var init_useOpenPage = __esm({
|
|
|
2540
2572
|
// src/internal/hooks/useBackupStatusChanges.ts
|
|
2541
2573
|
function useBackupStatusChanges() {
|
|
2542
2574
|
const { open: openPage } = useOpenPage();
|
|
2543
|
-
const { mutate: handleBackupStatusChanged } = (0,
|
|
2575
|
+
const { mutate: handleBackupStatusChanged } = (0, import_react_query4.useMutation)({
|
|
2544
2576
|
mutationFn: async (event) => {
|
|
2545
2577
|
const customEvent = event;
|
|
2546
2578
|
console.log("[BACKUP STATUS] changed:", customEvent?.detail);
|
|
@@ -2581,12 +2613,12 @@ function useBackupStatusChanges() {
|
|
|
2581
2613
|
};
|
|
2582
2614
|
}, []);
|
|
2583
2615
|
}
|
|
2584
|
-
var
|
|
2616
|
+
var import_react_query4, import_react5, NEW_USER_TOUCHED_KEY;
|
|
2585
2617
|
var init_useBackupStatusChanges = __esm({
|
|
2586
2618
|
"src/internal/hooks/useBackupStatusChanges.ts"() {
|
|
2587
2619
|
init_SessionContext();
|
|
2588
2620
|
init_useOpenPage();
|
|
2589
|
-
|
|
2621
|
+
import_react_query4 = require("@tanstack/react-query");
|
|
2590
2622
|
import_react5 = require("react");
|
|
2591
2623
|
init_auth();
|
|
2592
2624
|
init_vaultClient();
|
|
@@ -6484,7 +6516,7 @@ var init_zh = __esm({
|
|
|
6484
6516
|
|
|
6485
6517
|
// src/i18n/constants.ts
|
|
6486
6518
|
var PASSPORT_TRANSLATIONS, PASSPORT_NAMESPACE, LOCAL_STORAGE_I18N_KEY;
|
|
6487
|
-
var
|
|
6519
|
+
var init_constants4 = __esm({
|
|
6488
6520
|
"src/i18n/constants.ts"() {
|
|
6489
6521
|
init_en();
|
|
6490
6522
|
init_ru();
|
|
@@ -6620,14 +6652,14 @@ var import_react_i18next;
|
|
|
6620
6652
|
var init_useT = __esm({
|
|
6621
6653
|
"src/i18n/useT.ts"() {
|
|
6622
6654
|
import_react_i18next = require("react-i18next");
|
|
6623
|
-
|
|
6655
|
+
init_constants4();
|
|
6624
6656
|
}
|
|
6625
6657
|
});
|
|
6626
6658
|
|
|
6627
6659
|
// src/i18n/index.ts
|
|
6628
6660
|
var init_i18n = __esm({
|
|
6629
6661
|
"src/i18n/index.ts"() {
|
|
6630
|
-
|
|
6662
|
+
init_constants4();
|
|
6631
6663
|
init_languages();
|
|
6632
6664
|
init_utils3();
|
|
6633
6665
|
init_useT();
|
|
@@ -7023,7 +7055,7 @@ function Email() {
|
|
|
7023
7055
|
const setIsLoading = useSession((st) => st.setIsLoading);
|
|
7024
7056
|
const isMobileView = useLayoutStore((st) => st.isMobileView);
|
|
7025
7057
|
const { email, alert: alert2, setEmail, setExpiresIn, setStep, setAlert } = useAuthStore();
|
|
7026
|
-
const { mutate: onSendVerificationCode } = (0,
|
|
7058
|
+
const { mutate: onSendVerificationCode } = (0, import_react_query5.useMutation)({
|
|
7027
7059
|
mutationFn: async (mail) => {
|
|
7028
7060
|
const isEmailValid = mail.length !== 0 && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(mail);
|
|
7029
7061
|
if (!isEmailValid) {
|
|
@@ -7136,14 +7168,14 @@ function Email() {
|
|
|
7136
7168
|
)
|
|
7137
7169
|
] });
|
|
7138
7170
|
}
|
|
7139
|
-
var
|
|
7171
|
+
var import_react_query5, import_lucide_react5, import_react13, import_jsx_runtime14;
|
|
7140
7172
|
var init_Email = __esm({
|
|
7141
7173
|
"src/internal/components/AuthMenu/SignInStep/Email.tsx"() {
|
|
7142
7174
|
init_initial();
|
|
7143
7175
|
init_ProviderContext();
|
|
7144
7176
|
init_SessionContext();
|
|
7145
7177
|
init_i18n();
|
|
7146
|
-
|
|
7178
|
+
import_react_query5 = require("@tanstack/react-query");
|
|
7147
7179
|
import_lucide_react5 = require("lucide-react");
|
|
7148
7180
|
import_react13 = require("react");
|
|
7149
7181
|
init_useLayoutStore();
|
|
@@ -7780,7 +7812,7 @@ var init_SignInStep2 = __esm({
|
|
|
7780
7812
|
|
|
7781
7813
|
// src/internal/components/KeyshareRestoreMenu/constants.ts
|
|
7782
7814
|
var AVAILABLE_CLOUD_PROVIDERS_QUERY_KEY, CHECK_BACKUP_QUERY_KEY;
|
|
7783
|
-
var
|
|
7815
|
+
var init_constants5 = __esm({
|
|
7784
7816
|
"src/internal/components/KeyshareRestoreMenu/constants.ts"() {
|
|
7785
7817
|
AVAILABLE_CLOUD_PROVIDERS_QUERY_KEY = "get-available-cloud-providers-query";
|
|
7786
7818
|
CHECK_BACKUP_QUERY_KEY = "check-backup-availability-query";
|
|
@@ -7790,7 +7822,7 @@ var init_constants4 = __esm({
|
|
|
7790
7822
|
// src/internal/components/AuthMenu/useAuthMenuHanders.ts
|
|
7791
7823
|
function useAuthMenuHandlers() {
|
|
7792
7824
|
const { config, callbacksRef } = useProviderConfig();
|
|
7793
|
-
const qc = (0,
|
|
7825
|
+
const qc = (0, import_react_query6.useQueryClient)();
|
|
7794
7826
|
const pendingLoginResponseRef = (0, import_react16.useRef)(null);
|
|
7795
7827
|
const [telegramCleanup, setTelegramCleanup] = (0, import_react16.useState)(null);
|
|
7796
7828
|
const usePaymaster = useSession((st) => st.usePaymaster);
|
|
@@ -7961,17 +7993,17 @@ function useAuthMenuHandlers() {
|
|
|
7961
7993
|
goBackToSignIn
|
|
7962
7994
|
};
|
|
7963
7995
|
}
|
|
7964
|
-
var
|
|
7996
|
+
var import_react_query6, import_react16;
|
|
7965
7997
|
var init_useAuthMenuHanders = __esm({
|
|
7966
7998
|
"src/internal/components/AuthMenu/useAuthMenuHanders.ts"() {
|
|
7967
7999
|
init_ProviderContext();
|
|
7968
8000
|
init_SessionContext();
|
|
7969
|
-
|
|
8001
|
+
import_react_query6 = require("@tanstack/react-query");
|
|
7970
8002
|
import_react16 = require("react");
|
|
7971
8003
|
init_auth();
|
|
7972
8004
|
init_useLayoutDataStore();
|
|
7973
8005
|
init_useLayoutStore();
|
|
7974
|
-
|
|
8006
|
+
init_constants5();
|
|
7975
8007
|
init_useAuthStore();
|
|
7976
8008
|
}
|
|
7977
8009
|
});
|
|
@@ -8153,7 +8185,7 @@ function VerifyStep(props) {
|
|
|
8153
8185
|
setAlert
|
|
8154
8186
|
} = useAuthStore();
|
|
8155
8187
|
const [resendCount, setResendCount] = (0, import_react18.useState)(0);
|
|
8156
|
-
const { mutate: onVerifyCode, isPending: isCodeVerifying } = (0,
|
|
8188
|
+
const { mutate: onVerifyCode, isPending: isCodeVerifying } = (0, import_react_query7.useMutation)({
|
|
8157
8189
|
mutationFn: async (code) => {
|
|
8158
8190
|
setIsLoading(true);
|
|
8159
8191
|
setAlert(null);
|
|
@@ -8222,7 +8254,7 @@ function VerifyStep(props) {
|
|
|
8222
8254
|
setIsLoading(false);
|
|
8223
8255
|
}
|
|
8224
8256
|
});
|
|
8225
|
-
const { mutate: onResendCode, isPending: isCodeResending } = (0,
|
|
8257
|
+
const { mutate: onResendCode, isPending: isCodeResending } = (0, import_react_query7.useMutation)({
|
|
8226
8258
|
mutationFn: async () => {
|
|
8227
8259
|
setAlert(null);
|
|
8228
8260
|
setIsLoading(true);
|
|
@@ -8301,14 +8333,14 @@ function VerifyStep(props) {
|
|
|
8301
8333
|
)
|
|
8302
8334
|
] });
|
|
8303
8335
|
}
|
|
8304
|
-
var
|
|
8336
|
+
var import_react_query7, import_lucide_react7, import_react18, import_jsx_runtime19;
|
|
8305
8337
|
var init_VerifyStep = __esm({
|
|
8306
8338
|
"src/internal/components/AuthMenu/VerifyStep/VerifyStep.tsx"() {
|
|
8307
8339
|
init_initial();
|
|
8308
8340
|
init_ProviderContext();
|
|
8309
8341
|
init_SessionContext();
|
|
8310
8342
|
init_i18n();
|
|
8311
|
-
|
|
8343
|
+
import_react_query7 = require("@tanstack/react-query");
|
|
8312
8344
|
import_lucide_react7 = require("lucide-react");
|
|
8313
8345
|
import_react18 = require("react");
|
|
8314
8346
|
init_icons();
|
|
@@ -9601,14 +9633,14 @@ var init_config = __esm({
|
|
|
9601
9633
|
// src/internal/components/BuyMenu/binance/BinanceSummary.tsx
|
|
9602
9634
|
function BinanceSummary(props) {
|
|
9603
9635
|
const { payment } = props;
|
|
9604
|
-
const qc = (0,
|
|
9636
|
+
const qc = (0, import_react_query8.useQueryClient)();
|
|
9605
9637
|
const { t } = useT();
|
|
9606
9638
|
const embarkaiAddress = useSession((st) => st.address);
|
|
9607
9639
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
9608
9640
|
const { selectedFiat, selectedCrypto, srcQueryAmount, redirecting, setRedirecting } = useBuyMenuStore();
|
|
9609
9641
|
const quoteData = useBinanceStore((st) => st.quoteData);
|
|
9610
9642
|
const cryptoToRecieve = Number(quoteData?.totalAmount || "0");
|
|
9611
|
-
const { mutate: checkoutFundWalletOrder, isPending: isFundWalletOrderCheckouting } = (0,
|
|
9643
|
+
const { mutate: checkoutFundWalletOrder, isPending: isFundWalletOrderCheckouting } = (0, import_react_query8.useMutation)({
|
|
9612
9644
|
mutationFn: async () => {
|
|
9613
9645
|
setRedirecting(true);
|
|
9614
9646
|
return await createPreorderMutation({
|
|
@@ -9717,14 +9749,14 @@ function BinanceSummary(props) {
|
|
|
9717
9749
|
)
|
|
9718
9750
|
] });
|
|
9719
9751
|
}
|
|
9720
|
-
var
|
|
9752
|
+
var import_react_query8, import_lucide_react12, import_jsx_runtime37;
|
|
9721
9753
|
var init_BinanceSummary = __esm({
|
|
9722
9754
|
"src/internal/components/BuyMenu/binance/BinanceSummary.tsx"() {
|
|
9723
9755
|
init_utils2();
|
|
9724
9756
|
init_SessionContext();
|
|
9725
9757
|
init_i18n();
|
|
9726
9758
|
init_priceFormatter();
|
|
9727
|
-
|
|
9759
|
+
import_react_query8 = require("@tanstack/react-query");
|
|
9728
9760
|
import_lucide_react12 = require("lucide-react");
|
|
9729
9761
|
init_button();
|
|
9730
9762
|
init_highlight();
|
|
@@ -10028,7 +10060,7 @@ function BinanceTxHistory() {
|
|
|
10028
10060
|
isFetching: isTxDataFetching,
|
|
10029
10061
|
hasNextPage,
|
|
10030
10062
|
fetchNextPage
|
|
10031
|
-
} = (0,
|
|
10063
|
+
} = (0, import_react_query9.useInfiniteQuery)({
|
|
10032
10064
|
initialPageParam: 1,
|
|
10033
10065
|
queryKey: [QUERY_KEYS2.binanceTransactions, walletAddress],
|
|
10034
10066
|
getNextPageParam: (lastPage) => lastPage.page < lastPage.pageCount ? lastPage.page + 1 : void 0,
|
|
@@ -10074,14 +10106,14 @@ function BinanceTxHistory() {
|
|
|
10074
10106
|
)
|
|
10075
10107
|
] });
|
|
10076
10108
|
}
|
|
10077
|
-
var
|
|
10109
|
+
var import_react_query9, import_dayjs, import_lodash_es8, import_lucide_react13, import_react24, import_jsx_runtime39, TRANSACTIONS_PAGESIZE, SHOW_STATUSES;
|
|
10078
10110
|
var init_BinanceTxHistory = __esm({
|
|
10079
10111
|
"src/internal/components/BuyMenu/binance/BinanceTxHistory.tsx"() {
|
|
10080
10112
|
init_tokens();
|
|
10081
10113
|
init_utils2();
|
|
10082
10114
|
init_SessionContext();
|
|
10083
10115
|
init_i18n();
|
|
10084
|
-
|
|
10116
|
+
import_react_query9 = require("@tanstack/react-query");
|
|
10085
10117
|
import_dayjs = __toESM(require("dayjs"), 1);
|
|
10086
10118
|
import_lodash_es8 = require("lodash-es");
|
|
10087
10119
|
import_lucide_react13 = require("lucide-react");
|
|
@@ -10102,7 +10134,7 @@ var init_BinanceTxHistory = __esm({
|
|
|
10102
10134
|
|
|
10103
10135
|
// src/internal/components/BuyMenu/binance/useBinanceSseTracing.ts
|
|
10104
10136
|
function useBinanceSseTxTracing(walletAddress) {
|
|
10105
|
-
const qc = (0,
|
|
10137
|
+
const qc = (0, import_react_query10.useQueryClient)();
|
|
10106
10138
|
const debounceRef = (0, import_react25.useRef)(null);
|
|
10107
10139
|
(0, import_react25.useEffect)(() => {
|
|
10108
10140
|
if (!walletAddress) return;
|
|
@@ -10126,10 +10158,10 @@ function useBinanceSseTxTracing(walletAddress) {
|
|
|
10126
10158
|
};
|
|
10127
10159
|
}, [walletAddress, qc]);
|
|
10128
10160
|
}
|
|
10129
|
-
var
|
|
10161
|
+
var import_react_query10, import_react25;
|
|
10130
10162
|
var init_useBinanceSseTracing = __esm({
|
|
10131
10163
|
"src/internal/components/BuyMenu/binance/useBinanceSseTracing.ts"() {
|
|
10132
|
-
|
|
10164
|
+
import_react_query10 = require("@tanstack/react-query");
|
|
10133
10165
|
import_react25 = require("react");
|
|
10134
10166
|
init_iframe_manager();
|
|
10135
10167
|
init_queryKeys();
|
|
@@ -10148,7 +10180,7 @@ var init_utils6 = __esm({
|
|
|
10148
10180
|
|
|
10149
10181
|
// src/internal/components/BuyMenu/binance/Binance.tsx
|
|
10150
10182
|
function Binance() {
|
|
10151
|
-
const qc = (0,
|
|
10183
|
+
const qc = (0, import_react_query11.useQueryClient)();
|
|
10152
10184
|
const { t } = useT();
|
|
10153
10185
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
10154
10186
|
const walletAddress = useSession((st) => st.address);
|
|
@@ -10172,13 +10204,13 @@ function Binance() {
|
|
|
10172
10204
|
useBuyMenuStore.getState().setRenderKey(`${selectedCrypto}-${selectedFiat}-${Date.now()}`);
|
|
10173
10205
|
}, [isCurrurenciesSelected]);
|
|
10174
10206
|
useBinanceSseTxTracing(walletAddress);
|
|
10175
|
-
const { data: tradingPairsData, isLoading: isTradingPairsLoading } = (0,
|
|
10207
|
+
const { data: tradingPairsData, isLoading: isTradingPairsLoading } = (0, import_react_query11.useQuery)({
|
|
10176
10208
|
retry: false,
|
|
10177
10209
|
enabled: !!walletAddress,
|
|
10178
10210
|
queryKey: [QUERY_KEYS2.binanceTradingPairs, walletAddress],
|
|
10179
10211
|
queryFn: async () => await getTradingPairsQuery()
|
|
10180
10212
|
});
|
|
10181
|
-
const { data: networksData = null, isLoading: isNetworksDataLoading } = (0,
|
|
10213
|
+
const { data: networksData = null, isLoading: isNetworksDataLoading } = (0, import_react_query11.useQuery)({
|
|
10182
10214
|
retry: false,
|
|
10183
10215
|
enabled: !!walletAddress,
|
|
10184
10216
|
queryKey: [QUERY_KEYS2.binanceNetworks, walletAddress],
|
|
@@ -10187,7 +10219,7 @@ function Binance() {
|
|
|
10187
10219
|
const networkAvailableCryptoList = networksData?.data?.filter(
|
|
10188
10220
|
(ntw) => ntw.networks.map((n) => n.network).includes(CHAIN_ID_TO_BINANCE_NETWORK_TICKER[chainConfig.id] || "UNSUPPORTED")
|
|
10189
10221
|
) || [];
|
|
10190
|
-
const { data: paymentModesData = null, isFetching: isPaymentModesLoading } = (0,
|
|
10222
|
+
const { data: paymentModesData = null, isFetching: isPaymentModesLoading } = (0, import_react_query11.useQuery)({
|
|
10191
10223
|
retry: false,
|
|
10192
10224
|
enabled: !!walletAddress && !!selectedCrypto && !!selectedFiat,
|
|
10193
10225
|
// && srcQueryAmount > 0,
|
|
@@ -10205,7 +10237,7 @@ function Binance() {
|
|
|
10205
10237
|
(0, import_react26.useEffect)(() => {
|
|
10206
10238
|
useBuyMenuStore.getState().setMinAmount(Number(selectedPaymentMode?.fiatMinLimit || "0"));
|
|
10207
10239
|
}, [selectedPaymentMode]);
|
|
10208
|
-
const { mutate: estimateQuote, isPending: isQuoteEstimating } = (0,
|
|
10240
|
+
const { mutate: estimateQuote, isPending: isQuoteEstimating } = (0, import_react_query11.useMutation)({
|
|
10209
10241
|
mutationFn: async () => {
|
|
10210
10242
|
return await getQuoteQuery({
|
|
10211
10243
|
fiatCurrency: selectedFiat,
|
|
@@ -10367,13 +10399,13 @@ function Binance() {
|
|
|
10367
10399
|
)
|
|
10368
10400
|
] });
|
|
10369
10401
|
}
|
|
10370
|
-
var
|
|
10402
|
+
var import_react_query11, import_lucide_react14, import_react26, import_jsx_runtime40, PREFERRED_PAYMENT_METHOD, PREFERRED_FIATS, PREFERRED_CRYPTOS;
|
|
10371
10403
|
var init_Binance = __esm({
|
|
10372
10404
|
"src/internal/components/BuyMenu/binance/Binance.tsx"() {
|
|
10373
10405
|
init_utils2();
|
|
10374
10406
|
init_SessionContext();
|
|
10375
10407
|
init_i18n();
|
|
10376
|
-
|
|
10408
|
+
import_react_query11 = require("@tanstack/react-query");
|
|
10377
10409
|
import_lucide_react14 = require("lucide-react");
|
|
10378
10410
|
import_react26 = require("react");
|
|
10379
10411
|
init_button();
|
|
@@ -10468,7 +10500,7 @@ function FinchPaySummary(props) {
|
|
|
10468
10500
|
const walletAddress = useSession((st) => st.address);
|
|
10469
10501
|
const redirecting = useBuyMenuStore((st) => st.redirecting);
|
|
10470
10502
|
const srcQueryAmount = useBuyMenuStore((st) => st.srcQueryAmount);
|
|
10471
|
-
const { mutate: checkoutFundWalletOrder, isPending: isFundWalletOrderCheckouting } = (0,
|
|
10503
|
+
const { mutate: checkoutFundWalletOrder, isPending: isFundWalletOrderCheckouting } = (0, import_react_query12.useMutation)({
|
|
10472
10504
|
mutationFn: async () => {
|
|
10473
10505
|
useBuyMenuStore.getState().setRedirecting(true);
|
|
10474
10506
|
return createWidgetUrlMutation({
|
|
@@ -10552,14 +10584,14 @@ function FinchPaySummary(props) {
|
|
|
10552
10584
|
)
|
|
10553
10585
|
] });
|
|
10554
10586
|
}
|
|
10555
|
-
var
|
|
10587
|
+
var import_react_query12, import_lucide_react15, import_jsx_runtime41;
|
|
10556
10588
|
var init_FinchPaySummary = __esm({
|
|
10557
10589
|
"src/internal/components/BuyMenu/finchpay/FinchPaySummary.tsx"() {
|
|
10558
10590
|
init_utils2();
|
|
10559
10591
|
init_SessionContext();
|
|
10560
10592
|
init_i18n();
|
|
10561
10593
|
init_priceFormatter();
|
|
10562
|
-
|
|
10594
|
+
import_react_query12 = require("@tanstack/react-query");
|
|
10563
10595
|
import_lucide_react15 = require("lucide-react");
|
|
10564
10596
|
init_button();
|
|
10565
10597
|
init_highlight();
|
|
@@ -10656,7 +10688,7 @@ function FinchPayTxHistory() {
|
|
|
10656
10688
|
isFetching: isTxDataFetching,
|
|
10657
10689
|
hasNextPage,
|
|
10658
10690
|
fetchNextPage
|
|
10659
|
-
} = (0,
|
|
10691
|
+
} = (0, import_react_query13.useInfiniteQuery)({
|
|
10660
10692
|
initialPageParam: 1,
|
|
10661
10693
|
queryKey: [QUERY_KEYS2.finchPayTransactionList, walletAddress],
|
|
10662
10694
|
getNextPageParam: (lastPage) => lastPage.page < lastPage.pageCount ? lastPage.page + 1 : void 0,
|
|
@@ -10726,13 +10758,13 @@ function FinchPayTxHistory() {
|
|
|
10726
10758
|
] })
|
|
10727
10759
|
] });
|
|
10728
10760
|
}
|
|
10729
|
-
var
|
|
10761
|
+
var import_react_query13, import_dayjs2, import_lucide_react16, import_react27, import_jsx_runtime42, TRANSACTIONS_PAGESIZE2;
|
|
10730
10762
|
var init_FinchPayTxHistory = __esm({
|
|
10731
10763
|
"src/internal/components/BuyMenu/finchpay/FinchPayTxHistory.tsx"() {
|
|
10732
10764
|
init_utils2();
|
|
10733
10765
|
init_SessionContext();
|
|
10734
10766
|
init_i18n();
|
|
10735
|
-
|
|
10767
|
+
import_react_query13 = require("@tanstack/react-query");
|
|
10736
10768
|
import_dayjs2 = __toESM(require("dayjs"), 1);
|
|
10737
10769
|
import_lucide_react16 = require("lucide-react");
|
|
10738
10770
|
import_react27 = require("react");
|
|
@@ -10761,7 +10793,7 @@ var init_networks = __esm({
|
|
|
10761
10793
|
|
|
10762
10794
|
// src/internal/components/BuyMenu/finchpay/useFinchpaySseTxTracing.ts
|
|
10763
10795
|
function useFinchpaySseTxTracing(walletAddress) {
|
|
10764
|
-
const qc = (0,
|
|
10796
|
+
const qc = (0, import_react_query14.useQueryClient)();
|
|
10765
10797
|
const debounceRef = (0, import_react28.useRef)(null);
|
|
10766
10798
|
(0, import_react28.useEffect)(() => {
|
|
10767
10799
|
if (!walletAddress) return;
|
|
@@ -10785,10 +10817,10 @@ function useFinchpaySseTxTracing(walletAddress) {
|
|
|
10785
10817
|
};
|
|
10786
10818
|
}, [walletAddress, qc]);
|
|
10787
10819
|
}
|
|
10788
|
-
var
|
|
10820
|
+
var import_react_query14, import_react28;
|
|
10789
10821
|
var init_useFinchpaySseTxTracing = __esm({
|
|
10790
10822
|
"src/internal/components/BuyMenu/finchpay/useFinchpaySseTxTracing.ts"() {
|
|
10791
|
-
|
|
10823
|
+
import_react_query14 = require("@tanstack/react-query");
|
|
10792
10824
|
import_react28 = require("react");
|
|
10793
10825
|
init_iframe_manager();
|
|
10794
10826
|
init_queryKeys();
|
|
@@ -10814,7 +10846,7 @@ var init_utils7 = __esm({
|
|
|
10814
10846
|
|
|
10815
10847
|
// src/internal/components/BuyMenu/finchpay/FinchPay.tsx
|
|
10816
10848
|
function FinchPay() {
|
|
10817
|
-
const qc = (0,
|
|
10849
|
+
const qc = (0, import_react_query15.useQueryClient)();
|
|
10818
10850
|
const { t, i18n } = useT();
|
|
10819
10851
|
const resolvedLanguage = i18n.resolvedLanguage || "en";
|
|
10820
10852
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
@@ -10835,7 +10867,7 @@ function FinchPay() {
|
|
|
10835
10867
|
data: currenciesData = { networks: [], coins: [], fiats: [], currentNetworkCoins: [] },
|
|
10836
10868
|
isLoading: isCurrenciesLoading,
|
|
10837
10869
|
error: currenciesError
|
|
10838
|
-
} = (0,
|
|
10870
|
+
} = (0, import_react_query15.useQuery)({
|
|
10839
10871
|
retry: false,
|
|
10840
10872
|
enabled: !!walletAddress,
|
|
10841
10873
|
queryKey: [QUERY_KEYS2.finchPayCurrencies, walletAddress],
|
|
@@ -10876,7 +10908,7 @@ function FinchPay() {
|
|
|
10876
10908
|
data: limitsData,
|
|
10877
10909
|
isLoading: isLimitsLoading,
|
|
10878
10910
|
error: limitsError
|
|
10879
|
-
} = (0,
|
|
10911
|
+
} = (0, import_react_query15.useQuery)({
|
|
10880
10912
|
retry: false,
|
|
10881
10913
|
enabled: !!walletAddress && !!selectedFiat && !!selectedCryptoMeta?.ticker,
|
|
10882
10914
|
queryKey: [QUERY_KEYS2.finchPayLimits, selectedFiat || null, selectedCryptoMeta?.ticker || null],
|
|
@@ -10899,7 +10931,7 @@ function FinchPay() {
|
|
|
10899
10931
|
data: estimateData = null,
|
|
10900
10932
|
isLoading: isEstimateLoading,
|
|
10901
10933
|
error: estimateError
|
|
10902
|
-
} = (0,
|
|
10934
|
+
} = (0, import_react_query15.useQuery)({
|
|
10903
10935
|
retry: false,
|
|
10904
10936
|
enabled: !!selectedCrypto && !!selectedFiat && !!walletAddress && srcQueryAmount > 0 && minimum > 0 && srcQueryAmount >= minimum,
|
|
10905
10937
|
queryKey: [
|
|
@@ -11057,14 +11089,14 @@ function FinchPay() {
|
|
|
11057
11089
|
)
|
|
11058
11090
|
] });
|
|
11059
11091
|
}
|
|
11060
|
-
var
|
|
11092
|
+
var import_react_query15, import_lucide_react17, import_react29, import_jsx_runtime43;
|
|
11061
11093
|
var init_FinchPay = __esm({
|
|
11062
11094
|
"src/internal/components/BuyMenu/finchpay/FinchPay.tsx"() {
|
|
11063
11095
|
init_priceFormatter();
|
|
11064
11096
|
init_utils2();
|
|
11065
11097
|
init_SessionContext();
|
|
11066
11098
|
init_i18n();
|
|
11067
|
-
|
|
11099
|
+
import_react_query15 = require("@tanstack/react-query");
|
|
11068
11100
|
import_lucide_react17 = require("lucide-react");
|
|
11069
11101
|
import_react29 = require("react");
|
|
11070
11102
|
init_button();
|
|
@@ -11729,7 +11761,7 @@ function ChainsMenu() {
|
|
|
11729
11761
|
);
|
|
11730
11762
|
}, [isTestnets]);
|
|
11731
11763
|
const activeDefaultPaymasterAddress = (0, import_read15.getChainConfig)(activeChainId)?.paymasterAddress;
|
|
11732
|
-
const { data: activePaymasterData, isLoading: isActivePaymasterDataLoading } = (0,
|
|
11764
|
+
const { data: activePaymasterData, isLoading: isActivePaymasterDataLoading } = (0, import_react_query16.useQuery)({
|
|
11733
11765
|
queryKey: ["chain-paymaster", config.current.projectId, activeChainId],
|
|
11734
11766
|
queryFn: async () => {
|
|
11735
11767
|
if (!activeChainId) {
|
|
@@ -11797,7 +11829,7 @@ function ChainsMenu() {
|
|
|
11797
11829
|
}
|
|
11798
11830
|
);
|
|
11799
11831
|
}
|
|
11800
|
-
var import_core2, import_read15,
|
|
11832
|
+
var import_core2, import_read15, import_react_query16, import_lucide_react20, import_react31, import_jsx_runtime53;
|
|
11801
11833
|
var init_ChainsMenu = __esm({
|
|
11802
11834
|
"src/internal/components/ChainsMenu/ChainsMenu.tsx"() {
|
|
11803
11835
|
init_networks3();
|
|
@@ -11806,7 +11838,7 @@ var init_ChainsMenu = __esm({
|
|
|
11806
11838
|
init_useT();
|
|
11807
11839
|
import_core2 = require("@embarkai/core");
|
|
11808
11840
|
import_read15 = require("@embarkai/core/read");
|
|
11809
|
-
|
|
11841
|
+
import_react_query16 = require("@tanstack/react-query");
|
|
11810
11842
|
import_lucide_react20 = require("lucide-react");
|
|
11811
11843
|
import_react31 = require("react");
|
|
11812
11844
|
init_resolve_paymaster();
|
|
@@ -11944,14 +11976,14 @@ async function unlinkDevice(deviceId) {
|
|
|
11944
11976
|
}
|
|
11945
11977
|
}
|
|
11946
11978
|
function useDevices() {
|
|
11947
|
-
return (0,
|
|
11979
|
+
return (0, import_react_query17.useQuery)({
|
|
11948
11980
|
queryKey: [DEVICES_QUERY_KEY],
|
|
11949
11981
|
queryFn: getDevices
|
|
11950
11982
|
});
|
|
11951
11983
|
}
|
|
11952
11984
|
function useLinkDevice() {
|
|
11953
|
-
const qc = (0,
|
|
11954
|
-
return (0,
|
|
11985
|
+
const qc = (0, import_react_query17.useQueryClient)();
|
|
11986
|
+
return (0, import_react_query17.useMutation)({
|
|
11955
11987
|
mutationFn: (code) => linkDevice(code),
|
|
11956
11988
|
onSuccess: () => {
|
|
11957
11989
|
qc.invalidateQueries({ queryKey: [DEVICES_QUERY_KEY] });
|
|
@@ -11959,18 +11991,18 @@ function useLinkDevice() {
|
|
|
11959
11991
|
});
|
|
11960
11992
|
}
|
|
11961
11993
|
function useUnlinkDevice() {
|
|
11962
|
-
const qc = (0,
|
|
11963
|
-
return (0,
|
|
11994
|
+
const qc = (0, import_react_query17.useQueryClient)();
|
|
11995
|
+
return (0, import_react_query17.useMutation)({
|
|
11964
11996
|
mutationFn: (deviceId) => unlinkDevice(deviceId),
|
|
11965
11997
|
onSuccess: () => {
|
|
11966
11998
|
qc.invalidateQueries({ queryKey: [DEVICES_QUERY_KEY] });
|
|
11967
11999
|
}
|
|
11968
12000
|
});
|
|
11969
12001
|
}
|
|
11970
|
-
var
|
|
12002
|
+
var import_react_query17, DEVICES_QUERY_KEY;
|
|
11971
12003
|
var init_devices = __esm({
|
|
11972
12004
|
"src/internal/clients/devices.ts"() {
|
|
11973
|
-
|
|
12005
|
+
import_react_query17 = require("@tanstack/react-query");
|
|
11974
12006
|
init_httpClient();
|
|
11975
12007
|
DEVICES_QUERY_KEY = "devices";
|
|
11976
12008
|
}
|
|
@@ -13739,7 +13771,7 @@ var init_cloudStorage = __esm({
|
|
|
13739
13771
|
|
|
13740
13772
|
// src/internal/components/KeyshareRestoreMenu/hooks/useCreateBackup.ts
|
|
13741
13773
|
function useCreateBackup() {
|
|
13742
|
-
const qc = (0,
|
|
13774
|
+
const qc = (0, import_react_query18.useQueryClient)();
|
|
13743
13775
|
const session = useSession((st) => st.session);
|
|
13744
13776
|
const address = useSession((st) => st.address);
|
|
13745
13777
|
const hasServerVault = useSession((st) => st.hasServerVault);
|
|
@@ -13757,7 +13789,7 @@ function useCreateBackup() {
|
|
|
13757
13789
|
const onBackupSuccess = (0, import_react37.useCallback)(() => {
|
|
13758
13790
|
console.log("[EMBARKAI BACKUP] Backup created successfully");
|
|
13759
13791
|
}, [hasServerVault]);
|
|
13760
|
-
const { mutate: createPasswordBackup, isPending: isPasswordBackupCreating } = (0,
|
|
13792
|
+
const { mutate: createPasswordBackup, isPending: isPasswordBackupCreating } = (0, import_react_query18.useMutation)({
|
|
13761
13793
|
mutationFn: async () => {
|
|
13762
13794
|
const iframeManager = getIframeManager();
|
|
13763
13795
|
if (!iframeManager) {
|
|
@@ -13802,7 +13834,7 @@ function useCreateBackup() {
|
|
|
13802
13834
|
qc.invalidateQueries({ queryKey: [CHECK_BACKUP_QUERY_KEY, address] });
|
|
13803
13835
|
}
|
|
13804
13836
|
});
|
|
13805
|
-
const { mutate: createLocalBackup, isPending: isLocalBackupCreating } = (0,
|
|
13837
|
+
const { mutate: createLocalBackup, isPending: isLocalBackupCreating } = (0, import_react_query18.useMutation)({
|
|
13806
13838
|
mutationFn: async () => {
|
|
13807
13839
|
const iframeManager = getIframeManager();
|
|
13808
13840
|
if (!usePasskey && !restorePassword) {
|
|
@@ -13836,7 +13868,7 @@ function useCreateBackup() {
|
|
|
13836
13868
|
qc.invalidateQueries({ queryKey: [CHECK_BACKUP_QUERY_KEY, address] });
|
|
13837
13869
|
}
|
|
13838
13870
|
});
|
|
13839
|
-
const { mutate: createPasskey, isPending: isPasskeyCreating } = (0,
|
|
13871
|
+
const { mutate: createPasskey, isPending: isPasskeyCreating } = (0, import_react_query18.useMutation)({
|
|
13840
13872
|
mutationFn: async () => {
|
|
13841
13873
|
useRestoreStore.getState().setIsCreatingPasskey(true);
|
|
13842
13874
|
const { linkPasskeyWithWebAuthn: linkPasskeyWithWebAuthn2 } = await Promise.resolve().then(() => (init_passkey2(), passkey_exports2));
|
|
@@ -13863,7 +13895,7 @@ function useCreateBackup() {
|
|
|
13863
13895
|
}
|
|
13864
13896
|
}
|
|
13865
13897
|
});
|
|
13866
|
-
const { mutate: createCloudBackup, isPending: isCloudBackupCreating } = (0,
|
|
13898
|
+
const { mutate: createCloudBackup, isPending: isCloudBackupCreating } = (0, import_react_query18.useMutation)({
|
|
13867
13899
|
mutationFn: async () => {
|
|
13868
13900
|
const iframeManager = getIframeManager();
|
|
13869
13901
|
const encryptedData = await iframeManager.encryptBackupData(passportUserId);
|
|
@@ -13914,16 +13946,16 @@ function useCreateBackup() {
|
|
|
13914
13946
|
createPasskey
|
|
13915
13947
|
};
|
|
13916
13948
|
}
|
|
13917
|
-
var
|
|
13949
|
+
var import_react_query18, import_react37;
|
|
13918
13950
|
var init_useCreateBackup = __esm({
|
|
13919
13951
|
"src/internal/components/KeyshareRestoreMenu/hooks/useCreateBackup.ts"() {
|
|
13920
13952
|
init_SessionContext();
|
|
13921
|
-
|
|
13953
|
+
import_react_query18 = require("@tanstack/react-query");
|
|
13922
13954
|
import_react37 = require("react");
|
|
13923
13955
|
init_auth();
|
|
13924
13956
|
init_useLayoutStore();
|
|
13925
13957
|
init_iframe_manager();
|
|
13926
|
-
|
|
13958
|
+
init_constants5();
|
|
13927
13959
|
init_hooks();
|
|
13928
13960
|
}
|
|
13929
13961
|
});
|
|
@@ -13942,7 +13974,7 @@ function useRestoreAccount() {
|
|
|
13942
13974
|
setRestoreFile
|
|
13943
13975
|
} = useRestoreStore();
|
|
13944
13976
|
const { onRestoreSuccess } = useOnRestoreSuccess();
|
|
13945
|
-
const { mutate: restoreFromServer2, isPending: isRestoringFromServer } = (0,
|
|
13977
|
+
const { mutate: restoreFromServer2, isPending: isRestoringFromServer } = (0, import_react_query19.useMutation)({
|
|
13946
13978
|
mutationFn: async () => {
|
|
13947
13979
|
setError(null);
|
|
13948
13980
|
setSuccess(null);
|
|
@@ -13981,7 +14013,7 @@ function useRestoreAccount() {
|
|
|
13981
14013
|
setError(errorMsg);
|
|
13982
14014
|
}
|
|
13983
14015
|
});
|
|
13984
|
-
const { mutate: restoreFromFile, isPending: isRestoringFromFile } = (0,
|
|
14016
|
+
const { mutate: restoreFromFile, isPending: isRestoringFromFile } = (0, import_react_query19.useMutation)({
|
|
13985
14017
|
mutationFn: async () => {
|
|
13986
14018
|
if (!restoreFile) {
|
|
13987
14019
|
throw new Error("Please select a backup file");
|
|
@@ -14015,7 +14047,7 @@ function useRestoreAccount() {
|
|
|
14015
14047
|
setError(errorMsg);
|
|
14016
14048
|
}
|
|
14017
14049
|
});
|
|
14018
|
-
const { mutate: restoreFromCloud, isPending: isRestoringFromCloud } = (0,
|
|
14050
|
+
const { mutate: restoreFromCloud, isPending: isRestoringFromCloud } = (0, import_react_query19.useMutation)({
|
|
14019
14051
|
mutationFn: async () => {
|
|
14020
14052
|
alert("Cloud restore not implemented yet");
|
|
14021
14053
|
return null;
|
|
@@ -14034,11 +14066,11 @@ function useRestoreAccount() {
|
|
|
14034
14066
|
isRestoringFromCloud
|
|
14035
14067
|
};
|
|
14036
14068
|
}
|
|
14037
|
-
var
|
|
14069
|
+
var import_react_query19;
|
|
14038
14070
|
var init_useRestoreAccount = __esm({
|
|
14039
14071
|
"src/internal/components/KeyshareRestoreMenu/hooks/useRestoreAccount.ts"() {
|
|
14040
14072
|
init_SessionContext();
|
|
14041
|
-
|
|
14073
|
+
import_react_query19 = require("@tanstack/react-query");
|
|
14042
14074
|
init_useOnRestoreSuccess();
|
|
14043
14075
|
init_useRestoreStore();
|
|
14044
14076
|
}
|
|
@@ -14542,7 +14574,7 @@ var init_File = __esm({
|
|
|
14542
14574
|
function Server(props) {
|
|
14543
14575
|
const { isLoading, mode = "restore", serverHandler, createPasskeyHandler } = props;
|
|
14544
14576
|
const address = useSession((st) => st.address);
|
|
14545
|
-
const qc = (0,
|
|
14577
|
+
const qc = (0, import_react_query20.useQueryClient)();
|
|
14546
14578
|
const { t } = useT();
|
|
14547
14579
|
const usePasskey = useRestoreStore((st) => st.usePasskey);
|
|
14548
14580
|
const setUsePasskey = useRestoreStore((st) => st.setUsePasskey);
|
|
@@ -14582,19 +14614,19 @@ function Server(props) {
|
|
|
14582
14614
|
] })
|
|
14583
14615
|
] });
|
|
14584
14616
|
}
|
|
14585
|
-
var
|
|
14617
|
+
var import_react_query20, import_dayjs3, import_lucide_react31, import_react41, import_jsx_runtime63;
|
|
14586
14618
|
var init_Server = __esm({
|
|
14587
14619
|
"src/internal/components/KeyshareRestoreMenu/methods/Server.tsx"() {
|
|
14588
14620
|
init_SessionContext();
|
|
14589
14621
|
init_useT();
|
|
14590
14622
|
init_icons();
|
|
14591
|
-
|
|
14623
|
+
import_react_query20 = require("@tanstack/react-query");
|
|
14592
14624
|
import_dayjs3 = __toESM(require("dayjs"), 1);
|
|
14593
14625
|
import_lucide_react31 = require("lucide-react");
|
|
14594
14626
|
import_react41 = require("react");
|
|
14595
14627
|
init_highlight();
|
|
14596
14628
|
init_PasswordPasskey();
|
|
14597
|
-
|
|
14629
|
+
init_constants5();
|
|
14598
14630
|
init_hooks();
|
|
14599
14631
|
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
14600
14632
|
}
|
|
@@ -14744,7 +14776,7 @@ function Cloud2(props) {
|
|
|
14744
14776
|
data: cloudProviders = [],
|
|
14745
14777
|
isLoading: isCloudProvidersLoading,
|
|
14746
14778
|
error: cloudProvidersError
|
|
14747
|
-
} = (0,
|
|
14779
|
+
} = (0, import_react_query21.useQuery)({
|
|
14748
14780
|
retry: false,
|
|
14749
14781
|
enabled: !!passportUserId,
|
|
14750
14782
|
queryKey: [AVAILABLE_CLOUD_PROVIDERS_QUERY_KEY, passportUserId],
|
|
@@ -14818,17 +14850,17 @@ function Cloud2(props) {
|
|
|
14818
14850
|
)
|
|
14819
14851
|
] });
|
|
14820
14852
|
}
|
|
14821
|
-
var
|
|
14853
|
+
var import_react_query21, import_lucide_react33, import_react42, import_jsx_runtime65;
|
|
14822
14854
|
var init_Cloud = __esm({
|
|
14823
14855
|
"src/internal/components/KeyshareRestoreMenu/methods/Cloud.tsx"() {
|
|
14824
14856
|
init_SessionContext();
|
|
14825
|
-
|
|
14857
|
+
import_react_query21 = require("@tanstack/react-query");
|
|
14826
14858
|
import_lucide_react33 = require("lucide-react");
|
|
14827
14859
|
import_react42 = require("react");
|
|
14828
14860
|
init_button();
|
|
14829
14861
|
init_select();
|
|
14830
14862
|
init_PasswordPasskey();
|
|
14831
|
-
|
|
14863
|
+
init_constants5();
|
|
14832
14864
|
init_useRestoreStore();
|
|
14833
14865
|
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
14834
14866
|
}
|
|
@@ -14998,13 +15030,13 @@ var init_methods = __esm({
|
|
|
14998
15030
|
});
|
|
14999
15031
|
|
|
15000
15032
|
// src/internal/components/KeyshareRestoreMenu/KeyshareRestoreMenu.tsx
|
|
15001
|
-
var
|
|
15033
|
+
var import_react_query22, import_lucide_react35, import_react44, import_wagmi, import_jsx_runtime67, RESTORE_COMPONENTS, KeyshareRestoreMenu;
|
|
15002
15034
|
var init_KeyshareRestoreMenu = __esm({
|
|
15003
15035
|
"src/internal/components/KeyshareRestoreMenu/KeyshareRestoreMenu.tsx"() {
|
|
15004
15036
|
init_ProviderContext();
|
|
15005
15037
|
init_SessionContext();
|
|
15006
15038
|
init_i18n();
|
|
15007
|
-
|
|
15039
|
+
import_react_query22 = require("@tanstack/react-query");
|
|
15008
15040
|
import_lucide_react35 = require("lucide-react");
|
|
15009
15041
|
import_react44 = require("react");
|
|
15010
15042
|
import_wagmi = require("wagmi");
|
|
@@ -15017,7 +15049,7 @@ var init_KeyshareRestoreMenu = __esm({
|
|
|
15017
15049
|
init_highlight();
|
|
15018
15050
|
init_switch();
|
|
15019
15051
|
init_components2();
|
|
15020
|
-
|
|
15052
|
+
init_constants5();
|
|
15021
15053
|
init_hooks();
|
|
15022
15054
|
init_useOnRestoreSuccess();
|
|
15023
15055
|
init_methods();
|
|
@@ -15029,7 +15061,7 @@ var init_KeyshareRestoreMenu = __esm({
|
|
|
15029
15061
|
guardian: Guardian
|
|
15030
15062
|
};
|
|
15031
15063
|
KeyshareRestoreMenu = () => {
|
|
15032
|
-
const qc = (0,
|
|
15064
|
+
const qc = (0, import_react_query22.useQueryClient)();
|
|
15033
15065
|
const { callbacksRef } = useProviderConfig();
|
|
15034
15066
|
const { t } = useT();
|
|
15035
15067
|
const address = useSession((st) => st.address);
|
|
@@ -15071,7 +15103,7 @@ var init_KeyshareRestoreMenu = __esm({
|
|
|
15071
15103
|
restoreFromCloud,
|
|
15072
15104
|
isRestoringFromCloud
|
|
15073
15105
|
} = useRestoreAccount();
|
|
15074
|
-
const { data: serverRecoveryStatus, isLoading: isBackupStatusLoading } = (0,
|
|
15106
|
+
const { data: serverRecoveryStatus, isLoading: isBackupStatusLoading } = (0, import_react_query22.useQuery)({
|
|
15075
15107
|
retry: false,
|
|
15076
15108
|
queryKey: [CHECK_BACKUP_QUERY_KEY, address],
|
|
15077
15109
|
queryFn: async () => await getShareRecoveryStats()
|
|
@@ -15080,7 +15112,7 @@ var init_KeyshareRestoreMenu = __esm({
|
|
|
15080
15112
|
(0, import_react44.useEffect)(() => {
|
|
15081
15113
|
if (!!hasServerBackup) useRestoreStore.getState().setMethod("server");
|
|
15082
15114
|
}, [hasServerBackup]);
|
|
15083
|
-
const { mutate: disconnect, isPending: isDisconnecting } = (0,
|
|
15115
|
+
const { mutate: disconnect, isPending: isDisconnecting } = (0, import_react_query22.useMutation)({
|
|
15084
15116
|
mutationFn: async () => {
|
|
15085
15117
|
const { setStatus, setIsLoading } = useSession.getState();
|
|
15086
15118
|
const { setError, setMethod } = useRestoreStore.getState();
|
|
@@ -15243,7 +15275,7 @@ function KeyshareBackupMenu() {
|
|
|
15243
15275
|
setMethod(null);
|
|
15244
15276
|
};
|
|
15245
15277
|
}, []);
|
|
15246
|
-
const { data: serverRecoveryStatus, isLoading: isRecoveryLoading } = (0,
|
|
15278
|
+
const { data: serverRecoveryStatus, isLoading: isRecoveryLoading } = (0, import_react_query23.useQuery)({
|
|
15247
15279
|
retry: false,
|
|
15248
15280
|
enabled: !!address,
|
|
15249
15281
|
queryKey: [CHECK_BACKUP_QUERY_KEY, address],
|
|
@@ -15369,12 +15401,12 @@ function KeyshareBackupMenu() {
|
|
|
15369
15401
|
}
|
|
15370
15402
|
);
|
|
15371
15403
|
}
|
|
15372
|
-
var
|
|
15404
|
+
var import_react_query23, import_lucide_react36, import_react45, import_jsx_runtime68, COMPONENTS;
|
|
15373
15405
|
var init_KeyshareBackupMenu = __esm({
|
|
15374
15406
|
"src/internal/components/KeyshareRestoreMenu/KeyshareBackupMenu.tsx"() {
|
|
15375
15407
|
init_SessionContext();
|
|
15376
15408
|
init_i18n();
|
|
15377
|
-
|
|
15409
|
+
import_react_query23 = require("@tanstack/react-query");
|
|
15378
15410
|
import_lucide_react36 = require("lucide-react");
|
|
15379
15411
|
import_react45 = require("react");
|
|
15380
15412
|
init_useLayoutDataStore();
|
|
@@ -15385,7 +15417,7 @@ var init_KeyshareBackupMenu = __esm({
|
|
|
15385
15417
|
init_highlight();
|
|
15386
15418
|
init_switch();
|
|
15387
15419
|
init_components2();
|
|
15388
|
-
|
|
15420
|
+
init_constants5();
|
|
15389
15421
|
init_hooks();
|
|
15390
15422
|
init_methods();
|
|
15391
15423
|
import_jsx_runtime68 = require("react/jsx-runtime");
|
|
@@ -15685,18 +15717,18 @@ var init_KycMenu = __esm({
|
|
|
15685
15717
|
// src/internal/hooks/useUserProfile.ts
|
|
15686
15718
|
function useUserProfile() {
|
|
15687
15719
|
const address = useSession((st) => st.address);
|
|
15688
|
-
return (0,
|
|
15720
|
+
return (0, import_react_query24.useQuery)({
|
|
15689
15721
|
queryKey: [QUERY_KEYS.userProfile, address],
|
|
15690
15722
|
queryFn: getUserProfile,
|
|
15691
15723
|
enabled: !!address,
|
|
15692
15724
|
retry: false
|
|
15693
15725
|
});
|
|
15694
15726
|
}
|
|
15695
|
-
var
|
|
15727
|
+
var import_react_query24;
|
|
15696
15728
|
var init_useUserProfile = __esm({
|
|
15697
15729
|
"src/internal/hooks/useUserProfile.ts"() {
|
|
15698
15730
|
init_SessionContext();
|
|
15699
|
-
|
|
15731
|
+
import_react_query24 = require("@tanstack/react-query");
|
|
15700
15732
|
init_profile();
|
|
15701
15733
|
}
|
|
15702
15734
|
});
|
|
@@ -15851,7 +15883,7 @@ var init_common = __esm({
|
|
|
15851
15883
|
// src/internal/components/ManageWalletMenu/hooks/useProvidersList.ts
|
|
15852
15884
|
function useProvidersList() {
|
|
15853
15885
|
const address = useSession((st) => st.address);
|
|
15854
|
-
return (0,
|
|
15886
|
+
return (0, import_react_query25.useQuery)({
|
|
15855
15887
|
retry: false,
|
|
15856
15888
|
// hook is invoked on multiple pages to preload cache
|
|
15857
15889
|
enabled: !!address,
|
|
@@ -15860,11 +15892,11 @@ function useProvidersList() {
|
|
|
15860
15892
|
queryFn: async () => getLinkedProviders()
|
|
15861
15893
|
});
|
|
15862
15894
|
}
|
|
15863
|
-
var
|
|
15895
|
+
var import_react_query25, PROVIDERS_QUERY_KEY;
|
|
15864
15896
|
var init_useProvidersList = __esm({
|
|
15865
15897
|
"src/internal/components/ManageWalletMenu/hooks/useProvidersList.ts"() {
|
|
15866
15898
|
init_SessionContext();
|
|
15867
|
-
|
|
15899
|
+
import_react_query25 = require("@tanstack/react-query");
|
|
15868
15900
|
init_common();
|
|
15869
15901
|
PROVIDERS_QUERY_KEY = "lumia-passport-providers-query";
|
|
15870
15902
|
}
|
|
@@ -15924,9 +15956,9 @@ var init_MainMenu2 = __esm({
|
|
|
15924
15956
|
|
|
15925
15957
|
// src/modules/linkedProfiles.ts
|
|
15926
15958
|
function useLinkedProfiles() {
|
|
15927
|
-
const qc = (0,
|
|
15959
|
+
const qc = (0, import_react_query26.useQueryClient)();
|
|
15928
15960
|
const address = useSession((st) => st.address);
|
|
15929
|
-
const { data, isFetching, isLoading, error } = (0,
|
|
15961
|
+
const { data, isFetching, isLoading, error } = (0, import_react_query26.useQuery)({
|
|
15930
15962
|
retry: false,
|
|
15931
15963
|
enabled: !!address,
|
|
15932
15964
|
queryKey: [LINKED_PROFILES_QUERY_KEY, address],
|
|
@@ -15951,10 +15983,10 @@ function useLinkedProfiles() {
|
|
|
15951
15983
|
}, [qc, address]);
|
|
15952
15984
|
return { profiles, avatar, isLoading, isFetching, error, refresh };
|
|
15953
15985
|
}
|
|
15954
|
-
var
|
|
15986
|
+
var import_react_query26, import_react49, LINKED_PROFILES_QUERY_KEY;
|
|
15955
15987
|
var init_linkedProfiles = __esm({
|
|
15956
15988
|
"src/modules/linkedProfiles.ts"() {
|
|
15957
|
-
|
|
15989
|
+
import_react_query26 = require("@tanstack/react-query");
|
|
15958
15990
|
import_react49 = require("react");
|
|
15959
15991
|
init_SessionContext();
|
|
15960
15992
|
init_auth();
|
|
@@ -15999,7 +16031,7 @@ function EmailForm() {
|
|
|
15999
16031
|
const isLoading = useSession((st) => st.isLoading);
|
|
16000
16032
|
const setIsLoading = useSession((st) => st.setIsLoading);
|
|
16001
16033
|
const { email, setEmail, setAlert, setEmailCodeExpiresIn, setEmailStep } = useManageWalletStore();
|
|
16002
|
-
const { mutate: onSendVerificationCode } = (0,
|
|
16034
|
+
const { mutate: onSendVerificationCode } = (0, import_react_query27.useMutation)({
|
|
16003
16035
|
mutationFn: async () => {
|
|
16004
16036
|
if (!email) return;
|
|
16005
16037
|
setIsLoading(true);
|
|
@@ -16084,14 +16116,14 @@ function EmailForm() {
|
|
|
16084
16116
|
)
|
|
16085
16117
|
] });
|
|
16086
16118
|
}
|
|
16087
|
-
var
|
|
16119
|
+
var import_react_query27, import_lucide_react41, import_jsx_runtime74;
|
|
16088
16120
|
var init_EmailForm = __esm({
|
|
16089
16121
|
"src/internal/components/ManageWalletMenu/EmailForm.tsx"() {
|
|
16090
16122
|
init_initial();
|
|
16091
16123
|
init_ProviderContext();
|
|
16092
16124
|
init_SessionContext();
|
|
16093
16125
|
init_i18n();
|
|
16094
|
-
|
|
16126
|
+
import_react_query27 = require("@tanstack/react-query");
|
|
16095
16127
|
import_lucide_react41 = require("lucide-react");
|
|
16096
16128
|
init_projectId();
|
|
16097
16129
|
init_button();
|
|
@@ -16139,7 +16171,7 @@ function useSendVerificationCode() {
|
|
|
16139
16171
|
const setAlert = useManageWalletStore((st) => st.setAlert);
|
|
16140
16172
|
const setLinkIsLoading = useManageWalletStore((st) => st.setLinkIsLoading);
|
|
16141
16173
|
const setEmailCodeExpiresIn = useManageWalletStore((st) => st.setEmailCodeExpiresIn);
|
|
16142
|
-
return (0,
|
|
16174
|
+
return (0, import_react_query28.useMutation)({
|
|
16143
16175
|
mutationFn: async (email) => {
|
|
16144
16176
|
if (!email) {
|
|
16145
16177
|
throw new Error("Email is required");
|
|
@@ -16160,10 +16192,10 @@ function useSendVerificationCode() {
|
|
|
16160
16192
|
}
|
|
16161
16193
|
});
|
|
16162
16194
|
}
|
|
16163
|
-
var
|
|
16195
|
+
var import_react_query28;
|
|
16164
16196
|
var init_useSendVerificationCode = __esm({
|
|
16165
16197
|
"src/internal/components/ManageWalletMenu/hooks/useSendVerificationCode.ts"() {
|
|
16166
|
-
|
|
16198
|
+
import_react_query28 = require("@tanstack/react-query");
|
|
16167
16199
|
init_email();
|
|
16168
16200
|
init_useStore();
|
|
16169
16201
|
}
|
|
@@ -16172,7 +16204,7 @@ var init_useSendVerificationCode = __esm({
|
|
|
16172
16204
|
// src/internal/components/ManageWalletMenu/hooks/useVerifyCode.ts
|
|
16173
16205
|
function useVerifyCode() {
|
|
16174
16206
|
const { callbacksRef } = useProviderConfig();
|
|
16175
|
-
const qc = (0,
|
|
16207
|
+
const qc = (0, import_react_query29.useQueryClient)();
|
|
16176
16208
|
const address = useSession((st) => st.address);
|
|
16177
16209
|
const setIsLoading = useSession((st) => st.setIsLoading);
|
|
16178
16210
|
const {
|
|
@@ -16186,7 +16218,7 @@ function useVerifyCode() {
|
|
|
16186
16218
|
setLinkIsLoading,
|
|
16187
16219
|
setAlert
|
|
16188
16220
|
} = useManageWalletStore();
|
|
16189
|
-
return (0,
|
|
16221
|
+
return (0, import_react_query29.useMutation)({
|
|
16190
16222
|
mutationFn: async (codeToVerify) => {
|
|
16191
16223
|
const code = codeToVerify ?? emailCode;
|
|
16192
16224
|
if (!code) {
|
|
@@ -16224,13 +16256,13 @@ function useVerifyCode() {
|
|
|
16224
16256
|
}
|
|
16225
16257
|
});
|
|
16226
16258
|
}
|
|
16227
|
-
var
|
|
16259
|
+
var import_react_query29;
|
|
16228
16260
|
var init_useVerifyCode = __esm({
|
|
16229
16261
|
"src/internal/components/ManageWalletMenu/hooks/useVerifyCode.ts"() {
|
|
16230
16262
|
init_ProviderContext();
|
|
16231
16263
|
init_SessionContext();
|
|
16232
16264
|
init_linkedProfiles();
|
|
16233
|
-
|
|
16265
|
+
import_react_query29 = require("@tanstack/react-query");
|
|
16234
16266
|
init_email();
|
|
16235
16267
|
init_useProvidersList();
|
|
16236
16268
|
init_useStore();
|
|
@@ -16249,7 +16281,7 @@ function normalizePasskeyLinkError(msg) {
|
|
|
16249
16281
|
return msg;
|
|
16250
16282
|
}
|
|
16251
16283
|
function AddProvider() {
|
|
16252
|
-
const qc = (0,
|
|
16284
|
+
const qc = (0, import_react_query30.useQueryClient)();
|
|
16253
16285
|
const { callbacksRef } = useProviderConfig();
|
|
16254
16286
|
const address = useSession((st) => st.address);
|
|
16255
16287
|
const { t } = useT();
|
|
@@ -16378,14 +16410,14 @@ function AddProvider() {
|
|
|
16378
16410
|
] })
|
|
16379
16411
|
] });
|
|
16380
16412
|
}
|
|
16381
|
-
var
|
|
16413
|
+
var import_react_query30, import_jsx_runtime75;
|
|
16382
16414
|
var init_AddProvider = __esm({
|
|
16383
16415
|
"src/internal/components/ManageWalletMenu/AddProvider.tsx"() {
|
|
16384
16416
|
init_ProviderContext();
|
|
16385
16417
|
init_SessionContext();
|
|
16386
16418
|
init_i18n();
|
|
16387
16419
|
init_linkedProfiles();
|
|
16388
|
-
|
|
16420
|
+
import_react_query30 = require("@tanstack/react-query");
|
|
16389
16421
|
init_icons();
|
|
16390
16422
|
init_passkey2();
|
|
16391
16423
|
init_useLayoutDataStore();
|
|
@@ -16437,7 +16469,7 @@ function normalizeSocialLinkError(message) {
|
|
|
16437
16469
|
return message;
|
|
16438
16470
|
}
|
|
16439
16471
|
function useLinkSocial() {
|
|
16440
|
-
const qc = (0,
|
|
16472
|
+
const qc = (0, import_react_query31.useQueryClient)();
|
|
16441
16473
|
const address = useSession((st) => st.address);
|
|
16442
16474
|
const {
|
|
16443
16475
|
config: { current: config },
|
|
@@ -16523,14 +16555,14 @@ function useLinkSocial() {
|
|
|
16523
16555
|
}
|
|
16524
16556
|
}, [providerType, linkIsLoading, socialLinkStarted, isWalletLinking, handleLinkSocialProvider]);
|
|
16525
16557
|
}
|
|
16526
|
-
var
|
|
16558
|
+
var import_react_query31, import_react50;
|
|
16527
16559
|
var init_useLinkSocial = __esm({
|
|
16528
16560
|
"src/internal/components/ManageWalletMenu/hooks/useLinkSocial.ts"() {
|
|
16529
16561
|
init_useLayoutDataStore();
|
|
16530
16562
|
init_ProviderContext();
|
|
16531
16563
|
init_SessionContext();
|
|
16532
16564
|
init_linkedProfiles();
|
|
16533
|
-
|
|
16565
|
+
import_react_query31 = require("@tanstack/react-query");
|
|
16534
16566
|
import_react50 = __toESM(require("react"), 1);
|
|
16535
16567
|
init_auth();
|
|
16536
16568
|
init_telegramBrowser();
|
|
@@ -16595,7 +16627,7 @@ function useLinkTelegram() {
|
|
|
16595
16627
|
config: { current: config },
|
|
16596
16628
|
callbacksRef
|
|
16597
16629
|
} = useProviderConfig();
|
|
16598
|
-
const qc = (0,
|
|
16630
|
+
const qc = (0, import_react_query32.useQueryClient)();
|
|
16599
16631
|
const address = useSession((st) => st.address);
|
|
16600
16632
|
const isWalletLinking = useLayoutDataStore((st) => st.isWalletLinking);
|
|
16601
16633
|
const { providerType, linkIsLoading, setLinkIsLoading, setProviderType, setAlert } = useManageWalletStore();
|
|
@@ -16671,13 +16703,13 @@ function useLinkTelegram() {
|
|
|
16671
16703
|
}
|
|
16672
16704
|
}, [providerType]);
|
|
16673
16705
|
}
|
|
16674
|
-
var
|
|
16706
|
+
var import_react_query32, import_react51;
|
|
16675
16707
|
var init_useLinkTelegram = __esm({
|
|
16676
16708
|
"src/internal/components/ManageWalletMenu/hooks/useLinkTelegram.ts"() {
|
|
16677
16709
|
init_ProviderContext();
|
|
16678
16710
|
init_SessionContext();
|
|
16679
16711
|
init_linkedProfiles();
|
|
16680
|
-
|
|
16712
|
+
import_react_query32 = require("@tanstack/react-query");
|
|
16681
16713
|
import_react51 = require("react");
|
|
16682
16714
|
init_telegram2();
|
|
16683
16715
|
init_useLayoutDataStore();
|
|
@@ -16971,7 +17003,7 @@ var init_ManageWallet = __esm({
|
|
|
16971
17003
|
|
|
16972
17004
|
// src/internal/components/ManageWalletMenu/UnlinkProviderMenu.tsx
|
|
16973
17005
|
function UnlinkProviderMenu() {
|
|
16974
|
-
const qc = (0,
|
|
17006
|
+
const qc = (0, import_react_query33.useQueryClient)();
|
|
16975
17007
|
const address = useSession((st) => st.address);
|
|
16976
17008
|
const { callbacksRef } = useProviderConfig();
|
|
16977
17009
|
const { disconnect: disconnectExternalWallet } = (0, import_wagmi2.useDisconnect)();
|
|
@@ -16980,7 +17012,7 @@ function UnlinkProviderMenu() {
|
|
|
16980
17012
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
16981
17013
|
const { confirmUnlink, setConfirmUnlink, setAlert } = useManageWalletStore();
|
|
16982
17014
|
const [confirmInput, setConfirmInput] = (0, import_react53.useState)("");
|
|
16983
|
-
const { mutate: handleUnlinkProvider, isPending: isProviderUnlinking } = (0,
|
|
17015
|
+
const { mutate: handleUnlinkProvider, isPending: isProviderUnlinking } = (0, import_react_query33.useMutation)({
|
|
16984
17016
|
mutationFn: async () => {
|
|
16985
17017
|
if (!confirmUnlink) {
|
|
16986
17018
|
throw new Error("No provider to unlink");
|
|
@@ -17061,7 +17093,7 @@ function UnlinkProviderMenu() {
|
|
|
17061
17093
|
] })
|
|
17062
17094
|
] });
|
|
17063
17095
|
}
|
|
17064
|
-
var
|
|
17096
|
+
var import_react_query33, import_lucide_react45, import_react53, import_wagmi2, import_jsx_runtime79;
|
|
17065
17097
|
var init_UnlinkProviderMenu = __esm({
|
|
17066
17098
|
"src/internal/components/ManageWalletMenu/UnlinkProviderMenu.tsx"() {
|
|
17067
17099
|
init_useLayoutDataStore();
|
|
@@ -17069,7 +17101,7 @@ var init_UnlinkProviderMenu = __esm({
|
|
|
17069
17101
|
init_SessionContext();
|
|
17070
17102
|
init_useT();
|
|
17071
17103
|
init_linkedProfiles();
|
|
17072
|
-
|
|
17104
|
+
import_react_query33 = require("@tanstack/react-query");
|
|
17073
17105
|
import_lucide_react45 = require("lucide-react");
|
|
17074
17106
|
import_react53 = require("react");
|
|
17075
17107
|
import_wagmi2 = require("wagmi");
|
|
@@ -17196,7 +17228,7 @@ function useNicknameAvailability(currentNickname) {
|
|
|
17196
17228
|
if (!currentNickname) return;
|
|
17197
17229
|
useNicknameStore.getState().setNicknameValue(currentNickname);
|
|
17198
17230
|
}, [currentNickname]);
|
|
17199
|
-
const { mutate: checkAvailability, isPending: isCheckingAvailability } = (0,
|
|
17231
|
+
const { mutate: checkAvailability, isPending: isCheckingAvailability } = (0, import_react_query34.useMutation)({
|
|
17200
17232
|
mutationFn: async (newNickname) => {
|
|
17201
17233
|
useNicknameStore.getState().setError(null);
|
|
17202
17234
|
useNicknameStore.getState().setAvailability(null);
|
|
@@ -17228,11 +17260,11 @@ function useNicknameAvailability(currentNickname) {
|
|
|
17228
17260
|
}, [nicknameValue, currentNickname, debouncedCheckAvailability]);
|
|
17229
17261
|
return { isCheckingAvailability };
|
|
17230
17262
|
}
|
|
17231
|
-
var
|
|
17263
|
+
var import_react_query34, import_lodash_es10, import_react54, DEBOUNCE_MS;
|
|
17232
17264
|
var init_useNicknameAvailability = __esm({
|
|
17233
17265
|
"src/internal/components/NicknameMenu/useNicknameAvailability.ts"() {
|
|
17234
17266
|
init_i18n();
|
|
17235
|
-
|
|
17267
|
+
import_react_query34 = require("@tanstack/react-query");
|
|
17236
17268
|
import_lodash_es10 = require("lodash-es");
|
|
17237
17269
|
import_react54 = require("react");
|
|
17238
17270
|
init_nickname();
|
|
@@ -17247,7 +17279,7 @@ var init_useNicknameAvailability = __esm({
|
|
|
17247
17279
|
function NicknameEditForm(props) {
|
|
17248
17280
|
const { isInitialUser, nicknameInfo } = props;
|
|
17249
17281
|
const { handle: currentNickname, canChange } = nicknameInfo || { handle: "", canChange: false };
|
|
17250
|
-
const qc = (0,
|
|
17282
|
+
const qc = (0, import_react_query35.useQueryClient)();
|
|
17251
17283
|
const { t } = useT();
|
|
17252
17284
|
const address = useSession((st) => st.address);
|
|
17253
17285
|
const { callbacksRef } = useProviderConfig();
|
|
@@ -17263,7 +17295,7 @@ function NicknameEditForm(props) {
|
|
|
17263
17295
|
isSuccess: isNicknameChangeSuccess,
|
|
17264
17296
|
// error: nicknameChangeError,
|
|
17265
17297
|
reset
|
|
17266
|
-
} = (0,
|
|
17298
|
+
} = (0, import_react_query35.useMutation)({
|
|
17267
17299
|
mutationFn: (handle) => changeNickname(handle),
|
|
17268
17300
|
onSuccess: () => {
|
|
17269
17301
|
qc.invalidateQueries({ queryKey: [QUERY_KEYS.nicknameInfo] });
|
|
@@ -17382,13 +17414,13 @@ function NicknameEditForm(props) {
|
|
|
17382
17414
|
!!canChange && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "w-full flex items-center leadding-4 text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:nicknameMenu.hint") })
|
|
17383
17415
|
] });
|
|
17384
17416
|
}
|
|
17385
|
-
var
|
|
17417
|
+
var import_react_query35, import_lucide_react46, import_react55, import_jsx_runtime80;
|
|
17386
17418
|
var init_NicknameEditForm = __esm({
|
|
17387
17419
|
"src/internal/components/NicknameMenu/NicknameEditForm.tsx"() {
|
|
17388
17420
|
init_ProviderContext();
|
|
17389
17421
|
init_SessionContext();
|
|
17390
17422
|
init_i18n();
|
|
17391
|
-
|
|
17423
|
+
import_react_query35 = require("@tanstack/react-query");
|
|
17392
17424
|
import_lucide_react46 = require("lucide-react");
|
|
17393
17425
|
import_react55 = require("react");
|
|
17394
17426
|
init_icons();
|
|
@@ -17419,7 +17451,7 @@ function NicknameMenu() {
|
|
|
17419
17451
|
data: nicknameInfo,
|
|
17420
17452
|
isLoading: isNicknameInfoLoading,
|
|
17421
17453
|
error: nicknameInfoError
|
|
17422
|
-
} = (0,
|
|
17454
|
+
} = (0, import_react_query36.useQuery)({
|
|
17423
17455
|
retry: 1,
|
|
17424
17456
|
enabled: !!address,
|
|
17425
17457
|
queryKey: [QUERY_KEYS.nicknameInfo, address],
|
|
@@ -17500,13 +17532,13 @@ function NicknameMenu() {
|
|
|
17500
17532
|
}
|
|
17501
17533
|
);
|
|
17502
17534
|
}
|
|
17503
|
-
var
|
|
17535
|
+
var import_react_query36, import_dayjs4, import_lucide_react47, import_jsx_runtime81;
|
|
17504
17536
|
var init_NicknameMenu = __esm({
|
|
17505
17537
|
"src/internal/components/NicknameMenu/NicknameMenu.tsx"() {
|
|
17506
17538
|
init_SessionContext();
|
|
17507
17539
|
init_useOpenPage();
|
|
17508
17540
|
init_i18n();
|
|
17509
|
-
|
|
17541
|
+
import_react_query36 = require("@tanstack/react-query");
|
|
17510
17542
|
import_dayjs4 = __toESM(require("dayjs"), 1);
|
|
17511
17543
|
import_lucide_react47 = require("lucide-react");
|
|
17512
17544
|
init_nickname();
|
|
@@ -17577,7 +17609,7 @@ var init_useResolvedPublicClient = __esm({
|
|
|
17577
17609
|
|
|
17578
17610
|
// src/internal/hooks/useBlockscoutAssets/constants.ts
|
|
17579
17611
|
var NATIVE_BALANCE_QUERY_KEY2, WATCH_TOKENS_QUERY_KEY, BLOCKSCOUT_QUERY_KEY, ERC3643_DETECTION_QUERY_KEY, BALANCE_DEFAULT_QUERY_CFG, ERC3643_ABI;
|
|
17580
|
-
var
|
|
17612
|
+
var init_constants6 = __esm({
|
|
17581
17613
|
"src/internal/hooks/useBlockscoutAssets/constants.ts"() {
|
|
17582
17614
|
init_constants();
|
|
17583
17615
|
NATIVE_BALANCE_QUERY_KEY2 = "chain-native-coin-balance-query";
|
|
@@ -17606,7 +17638,7 @@ var init_constants5 = __esm({
|
|
|
17606
17638
|
// src/internal/hooks/useBlockscoutAssets/useNativeBalance.ts
|
|
17607
17639
|
function useNativeBalance(options) {
|
|
17608
17640
|
const { enabled, address, chainId, publicClient, nativeCurrency } = options;
|
|
17609
|
-
return (0,
|
|
17641
|
+
return (0, import_react_query37.useQuery)({
|
|
17610
17642
|
enabled: enabled && !!address && !!publicClient && !!nativeCurrency?.symbol,
|
|
17611
17643
|
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17612
17644
|
queryKey: [NATIVE_BALANCE_QUERY_KEY2, chainId, address],
|
|
@@ -17621,12 +17653,12 @@ function useNativeBalance(options) {
|
|
|
17621
17653
|
}
|
|
17622
17654
|
});
|
|
17623
17655
|
}
|
|
17624
|
-
var
|
|
17656
|
+
var import_react_query37, import_viem6;
|
|
17625
17657
|
var init_useNativeBalance = __esm({
|
|
17626
17658
|
"src/internal/hooks/useBlockscoutAssets/useNativeBalance.ts"() {
|
|
17627
|
-
|
|
17659
|
+
import_react_query37 = require("@tanstack/react-query");
|
|
17628
17660
|
import_viem6 = require("viem");
|
|
17629
|
-
|
|
17661
|
+
init_constants6();
|
|
17630
17662
|
}
|
|
17631
17663
|
});
|
|
17632
17664
|
|
|
@@ -17639,7 +17671,7 @@ function useWatchTokens(options) {
|
|
|
17639
17671
|
const tokensForChain = chainId ? allWatchTokens?.[chainId] || [] : [];
|
|
17640
17672
|
return tokensForChain;
|
|
17641
17673
|
}, [config, chainId]);
|
|
17642
|
-
return (0,
|
|
17674
|
+
return (0, import_react_query38.useQuery)({
|
|
17643
17675
|
enabled: !!publicClient && !!address && enabled && watchTokens.length > 0,
|
|
17644
17676
|
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17645
17677
|
queryKey: [WATCH_TOKENS_QUERY_KEY, chainId, address, watchTokens.map((t) => t.address).join(",")],
|
|
@@ -17702,14 +17734,14 @@ function useWatchTokens(options) {
|
|
|
17702
17734
|
}
|
|
17703
17735
|
});
|
|
17704
17736
|
}
|
|
17705
|
-
var
|
|
17737
|
+
var import_react_query38, import_react57, import_viem7;
|
|
17706
17738
|
var init_useWatchTokens = __esm({
|
|
17707
17739
|
"src/internal/hooks/useBlockscoutAssets/useWatchTokens.ts"() {
|
|
17708
17740
|
init_ProviderContext();
|
|
17709
|
-
|
|
17741
|
+
import_react_query38 = require("@tanstack/react-query");
|
|
17710
17742
|
import_react57 = require("react");
|
|
17711
17743
|
import_viem7 = require("viem");
|
|
17712
|
-
|
|
17744
|
+
init_constants6();
|
|
17713
17745
|
}
|
|
17714
17746
|
});
|
|
17715
17747
|
|
|
@@ -17848,7 +17880,7 @@ var init_utils8 = __esm({
|
|
|
17848
17880
|
// src/internal/hooks/useBlockscoutAssets/useBlockscoutAssets.ts
|
|
17849
17881
|
function useBlockscoutAssets(options) {
|
|
17850
17882
|
const { address, chainId, enabled = true, detectSecurityTokens = true } = options;
|
|
17851
|
-
const qc = (0,
|
|
17883
|
+
const qc = (0, import_react_query39.useQueryClient)();
|
|
17852
17884
|
const { chainConfig, publicClient, resolvedChainId } = useResolvedPublicClient(chainId, "useBlockscoutAssets");
|
|
17853
17885
|
const {
|
|
17854
17886
|
//
|
|
@@ -17886,7 +17918,7 @@ function useBlockscoutAssets(options) {
|
|
|
17886
17918
|
data: coreTokenBalances = [],
|
|
17887
17919
|
isLoading: coreTokensLoading,
|
|
17888
17920
|
isFetching: coreTokensFetching
|
|
17889
|
-
} = (0,
|
|
17921
|
+
} = (0, import_react_query39.useQuery)({
|
|
17890
17922
|
enabled: !!address && enabled && !blockscoutClient && !customTokenBalancesQuery && !customTokenBalancesQueryKey,
|
|
17891
17923
|
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17892
17924
|
queryKey: [`NON-${BLOCKSCOUT_QUERY_KEY}`, resolvedChainId, address],
|
|
@@ -17902,7 +17934,7 @@ function useBlockscoutAssets(options) {
|
|
|
17902
17934
|
data: customItems = [],
|
|
17903
17935
|
isLoading: customLoading,
|
|
17904
17936
|
isFetching: customFetching
|
|
17905
|
-
} = (0,
|
|
17937
|
+
} = (0, import_react_query39.useQuery)({
|
|
17906
17938
|
enabled: !!address && enabled && !blockscoutClient && !!customTokenBalancesQuery && !!customTokenBalancesQueryKey,
|
|
17907
17939
|
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17908
17940
|
queryKey: customTokenBalancesQueryKey,
|
|
@@ -17915,7 +17947,7 @@ function useBlockscoutAssets(options) {
|
|
|
17915
17947
|
isFetching: blockscoutFetching,
|
|
17916
17948
|
error: blockscoutError,
|
|
17917
17949
|
dataUpdatedAt
|
|
17918
|
-
} = (0,
|
|
17950
|
+
} = (0, import_react_query39.useQuery)({
|
|
17919
17951
|
enabled: !!address && enabled && !!blockscoutClient && !customTokenBalancesQuery && !customTokenBalancesQueryKey,
|
|
17920
17952
|
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17921
17953
|
queryKey: [BLOCKSCOUT_QUERY_KEY, resolvedChainId, blockscoutApiUrl, address],
|
|
@@ -17926,7 +17958,7 @@ function useBlockscoutAssets(options) {
|
|
|
17926
17958
|
data: nftItems,
|
|
17927
17959
|
isLoading: nftsLoading,
|
|
17928
17960
|
isFetching: nftsFetching
|
|
17929
|
-
} = (0,
|
|
17961
|
+
} = (0, import_react_query39.useQuery)({
|
|
17930
17962
|
enabled: !!address && enabled && !!blockscoutClient,
|
|
17931
17963
|
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17932
17964
|
queryKey: [BLOCKSCOUT_QUERY_KEY, "nfts", resolvedChainId, blockscoutApiUrl, address],
|
|
@@ -17936,7 +17968,7 @@ function useBlockscoutAssets(options) {
|
|
|
17936
17968
|
if (!blockscoutItems) return [];
|
|
17937
17969
|
return blockscoutItems.filter((tb) => tb.token.type === "ERC-20").map((tb) => tb.token.address_hash);
|
|
17938
17970
|
}, [blockscoutItems]);
|
|
17939
|
-
const { data: erc3643Results } = (0,
|
|
17971
|
+
const { data: erc3643Results } = (0, import_react_query39.useQuery)({
|
|
17940
17972
|
queryKey: [ERC3643_DETECTION_QUERY_KEY, resolvedChainId, address, erc20TokenAddresses],
|
|
17941
17973
|
queryFn: async () => {
|
|
17942
17974
|
if (!publicClient || erc20TokenAddresses.length === 0) {
|
|
@@ -18118,17 +18150,17 @@ function useBlockscoutAssets(options) {
|
|
|
18118
18150
|
lastUpdated: dataUpdatedAt || null
|
|
18119
18151
|
};
|
|
18120
18152
|
}
|
|
18121
|
-
var import_clients2,
|
|
18153
|
+
var import_clients2, import_react_query39, import_react58;
|
|
18122
18154
|
var init_useBlockscoutAssets = __esm({
|
|
18123
18155
|
"src/internal/hooks/useBlockscoutAssets/useBlockscoutAssets.ts"() {
|
|
18124
18156
|
init_ProviderContext();
|
|
18125
18157
|
import_clients2 = require("@embarkai/core/clients");
|
|
18126
|
-
|
|
18158
|
+
import_react_query39 = require("@tanstack/react-query");
|
|
18127
18159
|
import_react58 = require("react");
|
|
18128
18160
|
init_initial();
|
|
18129
18161
|
init_constants();
|
|
18130
18162
|
init_useResolvedPublicClient();
|
|
18131
|
-
|
|
18163
|
+
init_constants6();
|
|
18132
18164
|
init_useNativeBalance();
|
|
18133
18165
|
init_useWatchTokens();
|
|
18134
18166
|
init_utils8();
|
|
@@ -18233,34 +18265,6 @@ function isSecurityToken(asset) {
|
|
|
18233
18265
|
function isProjectAssetConfig(asset) {
|
|
18234
18266
|
return "balanceQueryKey" in asset && "balanceQuery" in asset;
|
|
18235
18267
|
}
|
|
18236
|
-
function isAssetRateAvailable(symbol) {
|
|
18237
|
-
switch (symbol) {
|
|
18238
|
-
// list of prohibited symbols without market data on Binance
|
|
18239
|
-
// case 'XYZ':
|
|
18240
|
-
// case 'ABC':
|
|
18241
|
-
case "P":
|
|
18242
|
-
return false;
|
|
18243
|
-
default:
|
|
18244
|
-
return true;
|
|
18245
|
-
}
|
|
18246
|
-
}
|
|
18247
|
-
function checkWrapedTokenSymbol(symbol) {
|
|
18248
|
-
if (WRAPPED_TOKENS.includes(symbol)) {
|
|
18249
|
-
return symbol.slice(1);
|
|
18250
|
-
}
|
|
18251
|
-
return symbol.toUpperCase();
|
|
18252
|
-
}
|
|
18253
|
-
async function getAssetRate2(symbol) {
|
|
18254
|
-
if (SKIP_SYMBOLS2.includes(symbol)) return { symbol, price: "0" };
|
|
18255
|
-
if (symbol === "USDT") return { symbol, price: "1" };
|
|
18256
|
-
const assetURL = `https://api.binance.com/api/v3/ticker/price?symbol=${checkWrapedTokenSymbol(symbol)}USDT`;
|
|
18257
|
-
try {
|
|
18258
|
-
const response = await fetch(assetURL);
|
|
18259
|
-
return await response.json();
|
|
18260
|
-
} catch {
|
|
18261
|
-
return { symbol, price: "0" };
|
|
18262
|
-
}
|
|
18263
|
-
}
|
|
18264
18268
|
async function resolveAssetRate(symbol, address, customAssetRateQuery) {
|
|
18265
18269
|
if (customAssetRateQuery) {
|
|
18266
18270
|
try {
|
|
@@ -18273,8 +18277,7 @@ async function resolveAssetRate(symbol, address, customAssetRateQuery) {
|
|
|
18273
18277
|
console.warn("[PortfolioItem] Custom asset rate query failed:", error);
|
|
18274
18278
|
}
|
|
18275
18279
|
}
|
|
18276
|
-
|
|
18277
|
-
return getAssetRate2(symbol);
|
|
18280
|
+
return getAssetRate(symbol);
|
|
18278
18281
|
}
|
|
18279
18282
|
function PortfolioItemImage(props) {
|
|
18280
18283
|
const { asset } = props;
|
|
@@ -18322,7 +18325,7 @@ function PortfolioItem(props) {
|
|
|
18322
18325
|
queryKey: asset.balanceQueryKey,
|
|
18323
18326
|
queryFn: asset.balanceQuery
|
|
18324
18327
|
} : void 0;
|
|
18325
|
-
const { data: projectAssetBalance } = (0,
|
|
18328
|
+
const { data: projectAssetBalance } = (0, import_react_query40.useQuery)({
|
|
18326
18329
|
enabled: !!projectAssetQuery,
|
|
18327
18330
|
retry: false,
|
|
18328
18331
|
queryKey: projectAssetQuery?.queryKey ?? ["project-asset-balance-disabled", asset.symbol],
|
|
@@ -18332,18 +18335,19 @@ function PortfolioItem(props) {
|
|
|
18332
18335
|
const isSecurity = isSecurityToken(asset);
|
|
18333
18336
|
const embeddedRate = Number(asset.exchangeRateUsd || 0);
|
|
18334
18337
|
const hasEmbeddedRate = Number.isFinite(embeddedRate) && embeddedRate > 0;
|
|
18335
|
-
const { data: assetRate, isLoading: isRateLoading } = (0,
|
|
18336
|
-
enabled: !!address && !hasEmbeddedRate && !isProjectAsset && !isNft && !isSecurity
|
|
18338
|
+
const { data: assetRate, isLoading: isRateLoading } = (0, import_react_query40.useQuery)({
|
|
18339
|
+
enabled: !!address && !hasEmbeddedRate && !isProjectAsset && !isNft && !isSecurity,
|
|
18340
|
+
// (!!customAssetRateQuery || !!isAssetRateAvailable(asset.symbol)),
|
|
18337
18341
|
retry: false,
|
|
18338
18342
|
staleTime: 4 * 60 * 1e3,
|
|
18339
|
-
queryKey: customAssetRateQuery && customAssetRateQueryKey ? customAssetRateQueryKey : [
|
|
18343
|
+
queryKey: customAssetRateQuery && customAssetRateQueryKey ? customAssetRateQueryKey : [PORTFOLIO_ASSET_RATE_QUERY_KEY, address, asset.address, asset.symbol],
|
|
18340
18344
|
// customAssetRateQueryKey
|
|
18341
18345
|
queryFn: async () => await resolveAssetRate(asset.symbol, asset.address, customAssetRateQuery)
|
|
18342
18346
|
});
|
|
18343
18347
|
const hasProjectAssetBalance = isProjectAsset && projectAssetBalance != null;
|
|
18344
18348
|
const renderBalance = hasProjectAssetBalance ? projectAssetBalance.cryptoFormatted : Number((0, import_viem10.formatUnits)(BigInt(asset?.balance || "0"), asset?.decimals || 18));
|
|
18345
18349
|
const resolvedRate = hasEmbeddedRate ? embeddedRate : Number(assetRate?.price || 0);
|
|
18346
|
-
const usdRenderBalance = resolvedRate > 0 ? renderBalance * resolvedRate : 0;
|
|
18350
|
+
const usdRenderBalance = resolvedRate > 0 && resolvedRate !== 1 ? renderBalance * resolvedRate : 0;
|
|
18347
18351
|
const shortContractAddress = asset.address ? truncateMiddle(asset.address, 6, 4) : null;
|
|
18348
18352
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
18349
18353
|
"div",
|
|
@@ -18404,12 +18408,11 @@ function PortfolioItem(props) {
|
|
|
18404
18408
|
}
|
|
18405
18409
|
);
|
|
18406
18410
|
}
|
|
18407
|
-
var
|
|
18411
|
+
var import_react_query40, import_lucide_react48, import_viem10, import_jsx_runtime83, PORTFOLIO_ASSET_RATE_QUERY_KEY;
|
|
18408
18412
|
var init_PortfolioItem = __esm({
|
|
18409
18413
|
"src/internal/components/PortfolioMenu/PortfolioItem.tsx"() {
|
|
18410
18414
|
init_ProviderContext();
|
|
18411
|
-
|
|
18412
|
-
import_react_query39 = require("@tanstack/react-query");
|
|
18415
|
+
import_react_query40 = require("@tanstack/react-query");
|
|
18413
18416
|
import_lucide_react48 = require("lucide-react");
|
|
18414
18417
|
import_viem10 = require("viem");
|
|
18415
18418
|
init_no_image();
|
|
@@ -18418,10 +18421,10 @@ var init_PortfolioItem = __esm({
|
|
|
18418
18421
|
init_priceFormatter();
|
|
18419
18422
|
init_utils2();
|
|
18420
18423
|
init_truncateMiddle();
|
|
18424
|
+
init_BalanceFeedProvider2();
|
|
18421
18425
|
init_BalanceView2();
|
|
18422
18426
|
import_jsx_runtime83 = require("react/jsx-runtime");
|
|
18423
|
-
|
|
18424
|
-
ASSETS_RATES_QUERY_KEY = "lumia-passport-assets-rates-query-key";
|
|
18427
|
+
PORTFOLIO_ASSET_RATE_QUERY_KEY = "embarkai-portfolio-asset-rate-query-key";
|
|
18425
18428
|
}
|
|
18426
18429
|
});
|
|
18427
18430
|
|
|
@@ -18429,7 +18432,7 @@ var init_PortfolioItem = __esm({
|
|
|
18429
18432
|
function PortfolioMenu() {
|
|
18430
18433
|
const { assets: projectAssets = [] } = useProviderConfig().config.current?.projectAssets || {};
|
|
18431
18434
|
const { t } = useT();
|
|
18432
|
-
const qc = (0,
|
|
18435
|
+
const qc = (0, import_react_query41.useQueryClient)();
|
|
18433
18436
|
const address = useSession((st) => st.address);
|
|
18434
18437
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
18435
18438
|
const {
|
|
@@ -18500,13 +18503,13 @@ function PortfolioMenu() {
|
|
|
18500
18503
|
}
|
|
18501
18504
|
);
|
|
18502
18505
|
}
|
|
18503
|
-
var
|
|
18506
|
+
var import_react_query41, import_lucide_react49, import_react59, import_jsx_runtime84;
|
|
18504
18507
|
var init_PortfolioMenu = __esm({
|
|
18505
18508
|
"src/internal/components/PortfolioMenu/PortfolioMenu.tsx"() {
|
|
18506
18509
|
init_ProviderContext();
|
|
18507
18510
|
init_SessionContext();
|
|
18508
18511
|
init_i18n();
|
|
18509
|
-
|
|
18512
|
+
import_react_query41 = require("@tanstack/react-query");
|
|
18510
18513
|
import_lucide_react49 = require("lucide-react");
|
|
18511
18514
|
import_react59 = require("react");
|
|
18512
18515
|
init_useBlockscoutAssets2();
|
|
@@ -18756,7 +18759,7 @@ var init_useSecurityStore = __esm({
|
|
|
18756
18759
|
|
|
18757
18760
|
// src/internal/components/SecurityMenu/constants.ts
|
|
18758
18761
|
var KEYSHARE_RECOVERY_STATS_QUERY, CONNECTED_TRUSTED_APPS_QUERY;
|
|
18759
|
-
var
|
|
18762
|
+
var init_constants7 = __esm({
|
|
18760
18763
|
"src/internal/components/SecurityMenu/constants.ts"() {
|
|
18761
18764
|
KEYSHARE_RECOVERY_STATS_QUERY = "keyshare-recovery-stats-query";
|
|
18762
18765
|
CONNECTED_TRUSTED_APPS_QUERY = "connected-trusted-apps-query";
|
|
@@ -18767,7 +18770,7 @@ var init_constants6 = __esm({
|
|
|
18767
18770
|
function useConnectedApps() {
|
|
18768
18771
|
const session = useSession((st) => st.session);
|
|
18769
18772
|
const userId = session?.mpcUserId || null;
|
|
18770
|
-
return (0,
|
|
18773
|
+
return (0, import_react_query42.useQuery)({
|
|
18771
18774
|
retry: false,
|
|
18772
18775
|
enabled: !!userId,
|
|
18773
18776
|
queryKey: [CONNECTED_TRUSTED_APPS_QUERY, userId],
|
|
@@ -18780,13 +18783,13 @@ function useConnectedApps() {
|
|
|
18780
18783
|
}
|
|
18781
18784
|
});
|
|
18782
18785
|
}
|
|
18783
|
-
var
|
|
18786
|
+
var import_react_query42;
|
|
18784
18787
|
var init_useConnectedApps = __esm({
|
|
18785
18788
|
"src/internal/components/SecurityMenu/ConnectedApps/useConnectedApps.ts"() {
|
|
18786
18789
|
init_SessionContext();
|
|
18787
|
-
|
|
18790
|
+
import_react_query42 = require("@tanstack/react-query");
|
|
18788
18791
|
init_httpClient();
|
|
18789
|
-
|
|
18792
|
+
init_constants7();
|
|
18790
18793
|
}
|
|
18791
18794
|
});
|
|
18792
18795
|
|
|
@@ -18925,10 +18928,10 @@ var init_ConnectedApps = __esm({
|
|
|
18925
18928
|
// src/internal/components/SecurityMenu/ConnectedApps/UntrustApplication.tsx
|
|
18926
18929
|
function UntrustApplication() {
|
|
18927
18930
|
const { t } = useT();
|
|
18928
|
-
const qc = (0,
|
|
18931
|
+
const qc = (0, import_react_query43.useQueryClient)();
|
|
18929
18932
|
const userId = useSession((st) => st?.session?.mpcUserId);
|
|
18930
18933
|
const appToUntrust = useSecurityStore((st) => st.appToUntrust);
|
|
18931
|
-
const { mutate: handleUntrustApp, isPending: isUntrustingApp } = (0,
|
|
18934
|
+
const { mutate: handleUntrustApp, isPending: isUntrustingApp } = (0, import_react_query43.useMutation)({
|
|
18932
18935
|
mutationFn: async () => {
|
|
18933
18936
|
if (!userId || !appToUntrust) return;
|
|
18934
18937
|
const iframeManager = getIframeManager();
|
|
@@ -19004,17 +19007,17 @@ function UntrustApplication() {
|
|
|
19004
19007
|
] })
|
|
19005
19008
|
] });
|
|
19006
19009
|
}
|
|
19007
|
-
var
|
|
19010
|
+
var import_react_query43, import_lucide_react52, import_jsx_runtime87;
|
|
19008
19011
|
var init_UntrustApplication = __esm({
|
|
19009
19012
|
"src/internal/components/SecurityMenu/ConnectedApps/UntrustApplication.tsx"() {
|
|
19010
19013
|
init_SessionContext();
|
|
19011
19014
|
init_i18n();
|
|
19012
|
-
|
|
19015
|
+
import_react_query43 = require("@tanstack/react-query");
|
|
19013
19016
|
import_lucide_react52 = require("lucide-react");
|
|
19014
19017
|
init_iframe_manager();
|
|
19015
19018
|
init_button();
|
|
19016
19019
|
init_highlight();
|
|
19017
|
-
|
|
19020
|
+
init_constants7();
|
|
19018
19021
|
init_useSecurityStore();
|
|
19019
19022
|
import_jsx_runtime87 = require("react/jsx-runtime");
|
|
19020
19023
|
}
|
|
@@ -19131,7 +19134,7 @@ var init_LastBackup = __esm({
|
|
|
19131
19134
|
function useKeyshareRecoveryStats() {
|
|
19132
19135
|
const session = useSession((st) => st.session);
|
|
19133
19136
|
const userId = session?.mpcUserId || null;
|
|
19134
|
-
return (0,
|
|
19137
|
+
return (0, import_react_query44.useQuery)({
|
|
19135
19138
|
enabled: !!userId,
|
|
19136
19139
|
queryKey: [KEYSHARE_RECOVERY_STATS_QUERY, userId],
|
|
19137
19140
|
queryFn: async () => {
|
|
@@ -19148,15 +19151,15 @@ function useKeyshareRecoveryStats() {
|
|
|
19148
19151
|
}
|
|
19149
19152
|
});
|
|
19150
19153
|
}
|
|
19151
|
-
var
|
|
19154
|
+
var import_react_query44;
|
|
19152
19155
|
var init_useKeyshareRecoveryStats = __esm({
|
|
19153
19156
|
"src/internal/components/SecurityMenu/Keyshare/useKeyshareRecoveryStats.ts"() {
|
|
19154
19157
|
init_SessionContext();
|
|
19155
|
-
|
|
19158
|
+
import_react_query44 = require("@tanstack/react-query");
|
|
19156
19159
|
init_keyshare();
|
|
19157
19160
|
init_iframe_manager();
|
|
19158
19161
|
init_vaultClient();
|
|
19159
|
-
|
|
19162
|
+
init_constants7();
|
|
19160
19163
|
}
|
|
19161
19164
|
});
|
|
19162
19165
|
|
|
@@ -19591,7 +19594,7 @@ function SenderSelector(props) {
|
|
|
19591
19594
|
(0, import_react63.useEffect)(() => {
|
|
19592
19595
|
useFlowSelectorStore.getState().setRenderKey(`sender-selected-${Date.now()}`);
|
|
19593
19596
|
}, [walletMessage]);
|
|
19594
|
-
const { mutate: loginDirectWallet, isPending: isDirectWalletLoggingIn } = (0,
|
|
19597
|
+
const { mutate: loginDirectWallet, isPending: isDirectWalletLoggingIn } = (0, import_react_query45.useMutation)({
|
|
19595
19598
|
mutationFn: async (walletProfile) => {
|
|
19596
19599
|
if (!walletProfile?.meta?.walletName || !walletProfile?.externalId || !walletProfile?.meta?.walletType) {
|
|
19597
19600
|
console.error("[SENDER SELECTOR] Invalid wallet profile:", walletProfile);
|
|
@@ -19719,13 +19722,13 @@ function SenderSelector(props) {
|
|
|
19719
19722
|
] })
|
|
19720
19723
|
] });
|
|
19721
19724
|
}
|
|
19722
|
-
var import_rainbowkit,
|
|
19725
|
+
var import_rainbowkit, import_react_query45, import_react63, import_wagmi3, import_jsx_runtime92;
|
|
19723
19726
|
var init_SenderSelector = __esm({
|
|
19724
19727
|
"src/internal/components/SendMenu/hyperbridge/components/SenderSelector.tsx"() {
|
|
19725
19728
|
init_ProviderContext();
|
|
19726
19729
|
init_i18n();
|
|
19727
19730
|
import_rainbowkit = require("@rainbow-me/rainbowkit");
|
|
19728
|
-
|
|
19731
|
+
import_react_query45 = require("@tanstack/react-query");
|
|
19729
19732
|
import_react63 = require("react");
|
|
19730
19733
|
import_wagmi3 = require("wagmi");
|
|
19731
19734
|
init_wallet();
|
|
@@ -20197,7 +20200,7 @@ function useHyperlaneHistory() {
|
|
|
20197
20200
|
const page = useLayoutDataStore((st) => st.page);
|
|
20198
20201
|
const flow = useFlowSelectorStore((st) => st.flow);
|
|
20199
20202
|
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
20200
|
-
const query = (0,
|
|
20203
|
+
const query = (0, import_react_query46.useInfiniteQuery)({
|
|
20201
20204
|
retry: false,
|
|
20202
20205
|
initialPageParam: 1,
|
|
20203
20206
|
refetchInterval: TX_HISTORY_POLLING_INTERVAL,
|
|
@@ -20223,11 +20226,11 @@ function useHyperlaneHistory() {
|
|
|
20223
20226
|
}, [isBridgeTxHistoryLoading, txList]);
|
|
20224
20227
|
return { query, txList };
|
|
20225
20228
|
}
|
|
20226
|
-
var
|
|
20229
|
+
var import_react_query46, import_lodash_es12, import_react65, HYPERLANE_HISTORY_QUERY_KEY, TX_HISTORY_PAGE_SIZE, TX_HISTORY_POLLING_INTERVAL;
|
|
20227
20230
|
var init_useHyperlaneHistory = __esm({
|
|
20228
20231
|
"src/internal/components/SendMenu/hyperbridge/hooks/useHyperlaneHistory.ts"() {
|
|
20229
20232
|
init_SessionContext();
|
|
20230
|
-
|
|
20233
|
+
import_react_query46 = require("@tanstack/react-query");
|
|
20231
20234
|
import_lodash_es12 = require("lodash-es");
|
|
20232
20235
|
import_react65 = require("react");
|
|
20233
20236
|
init_useLayoutDataStore();
|
|
@@ -20256,7 +20259,7 @@ var init_useOperationHashesStore = __esm({
|
|
|
20256
20259
|
|
|
20257
20260
|
// src/internal/components/SendMenu/hyperbridge/hooks/useBridge.ts
|
|
20258
20261
|
function useBridge() {
|
|
20259
|
-
const qc = (0,
|
|
20262
|
+
const qc = (0, import_react_query47.useQueryClient)();
|
|
20260
20263
|
const { t } = useT();
|
|
20261
20264
|
const address = useSession((st) => st.address);
|
|
20262
20265
|
const { data: walletClient } = (0, import_wagmi4.useWalletClient)();
|
|
@@ -20275,7 +20278,7 @@ function useBridge() {
|
|
|
20275
20278
|
setOriginChain(destinationChain);
|
|
20276
20279
|
setDestinationChain(originChain);
|
|
20277
20280
|
}, []);
|
|
20278
|
-
const { mutate: estimateQuote } = (0,
|
|
20281
|
+
const { mutate: estimateQuote } = (0, import_react_query47.useMutation)({
|
|
20279
20282
|
mutationFn: async (amountToBridge) => {
|
|
20280
20283
|
useFlowSelectorStore.getState().setError(null);
|
|
20281
20284
|
useFlowSelectorStore.getState().setIsUiLocked(true);
|
|
@@ -20343,7 +20346,7 @@ function useBridge() {
|
|
|
20343
20346
|
})
|
|
20344
20347
|
);
|
|
20345
20348
|
}, []);
|
|
20346
|
-
const { mutate: bridgeAsset, isPending: isAssetBridging } = (0,
|
|
20349
|
+
const { mutate: bridgeAsset, isPending: isAssetBridging } = (0, import_react_query47.useMutation)({
|
|
20347
20350
|
mutationFn: async () => {
|
|
20348
20351
|
const {
|
|
20349
20352
|
hyperRoute,
|
|
@@ -20438,13 +20441,13 @@ function useBridge() {
|
|
|
20438
20441
|
isAssetBridging
|
|
20439
20442
|
};
|
|
20440
20443
|
}
|
|
20441
|
-
var
|
|
20444
|
+
var import_react_query47, import_react66, import_wagmi4;
|
|
20442
20445
|
var init_useBridge = __esm({
|
|
20443
20446
|
"src/internal/components/SendMenu/hyperbridge/hooks/useBridge.ts"() {
|
|
20444
20447
|
init_SessionContext();
|
|
20445
20448
|
init_i18n();
|
|
20446
20449
|
init_useExternalWalletStore();
|
|
20447
|
-
|
|
20450
|
+
import_react_query47 = require("@tanstack/react-query");
|
|
20448
20451
|
import_react66 = require("react");
|
|
20449
20452
|
import_wagmi4 = require("wagmi");
|
|
20450
20453
|
init_useLayoutStore();
|
|
@@ -20469,7 +20472,7 @@ function useHyperlaneRoutes() {
|
|
|
20469
20472
|
data: hyperlaneWarpRoutes = [],
|
|
20470
20473
|
isLoading: isLoadingWarpRoutes,
|
|
20471
20474
|
error: errorWarpRoutes
|
|
20472
|
-
} = (0,
|
|
20475
|
+
} = (0, import_react_query48.useQuery)({
|
|
20473
20476
|
retry: false,
|
|
20474
20477
|
enabled: !!address && page === "send" /* SEND */ && flow === "bridge",
|
|
20475
20478
|
queryKey: [HYPERLANE_WARP_ROUTES_QUERY_KEY, address],
|
|
@@ -20507,11 +20510,11 @@ function useHyperlaneRoutes() {
|
|
|
20507
20510
|
}, [hyperRoute, hyperlaneWarpRoutes]);
|
|
20508
20511
|
return { hyperlaneWarpRoutes, isLoadingWarpRoutes };
|
|
20509
20512
|
}
|
|
20510
|
-
var
|
|
20513
|
+
var import_react_query48, import_react67, HYPERLANE_WARP_ROUTES_QUERY_KEY;
|
|
20511
20514
|
var init_useHyperlaneRoutes = __esm({
|
|
20512
20515
|
"src/internal/components/SendMenu/hyperbridge/hooks/useHyperlaneRoutes.ts"() {
|
|
20513
20516
|
init_SessionContext();
|
|
20514
|
-
|
|
20517
|
+
import_react_query48 = require("@tanstack/react-query");
|
|
20515
20518
|
import_react67 = require("react");
|
|
20516
20519
|
init_useLayoutDataStore();
|
|
20517
20520
|
init_useFlowSelector();
|
|
@@ -20581,14 +20584,8 @@ var init_ResolveChainIcon = __esm({
|
|
|
20581
20584
|
});
|
|
20582
20585
|
|
|
20583
20586
|
// src/internal/components/SendMenu/hyperbridge/hooks/useBridgeBalance.ts
|
|
20584
|
-
function checkWrapedTokenSymbol2(symbol) {
|
|
20585
|
-
if (WRAPPED_TOKENS.includes(symbol)) {
|
|
20586
|
-
return symbol.slice(1);
|
|
20587
|
-
}
|
|
20588
|
-
return symbol.toUpperCase();
|
|
20589
|
-
}
|
|
20590
20587
|
function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
20591
|
-
const qc = (0,
|
|
20588
|
+
const qc = (0, import_react_query49.useQueryClient)();
|
|
20592
20589
|
const { t } = useT();
|
|
20593
20590
|
const address = useSession((st) => st.address);
|
|
20594
20591
|
const directWalletAddress = useExternalWalletStore((st) => st.externalAddress);
|
|
@@ -20612,10 +20609,10 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20612
20609
|
enabled: bridgeSender === "embarkai-wallet" && !!selectedWarpRoute && !!address && !!originChain,
|
|
20613
20610
|
address
|
|
20614
20611
|
});
|
|
20615
|
-
const embarkTokenBalanace = assets.find((a) => selectedWarpRoute?.symbol ===
|
|
20612
|
+
const embarkTokenBalanace = assets.find((a) => selectedWarpRoute?.symbol === checkWrapedTokenSymbol(a.symbol));
|
|
20616
20613
|
const originChainMeta = CHAINS_UI_META[originChain];
|
|
20617
20614
|
const isSelectedTokenNative = selectedWarpRoute?.symbol?.toUpperCase() === originChainMeta?.chain?.nativeCurrency?.symbol?.toUpperCase();
|
|
20618
|
-
const { data: externalBalanceData, isLoading: isExternalBalanceLoading } = (0,
|
|
20615
|
+
const { data: externalBalanceData, isLoading: isExternalBalanceLoading } = (0, import_react_query49.useQuery)({
|
|
20619
20616
|
retry: false,
|
|
20620
20617
|
enabled: bridgeSender === "direct-wallet" && !isSelectedTokenNative && !!directWalletAddress && !!routeTokenAddress && !!originChain,
|
|
20621
20618
|
queryKey: [EXTERNAL_WALLET_BRIDGING_BALANCE_QUERY, originChain, directWalletAddress, routeTokenAddress],
|
|
@@ -20658,7 +20655,7 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20658
20655
|
return { value, decimals, symbol, formatted };
|
|
20659
20656
|
}
|
|
20660
20657
|
});
|
|
20661
|
-
const { data: externalNativeBalanceData, isLoading: isExternalNativeBalanceLoading } = (0,
|
|
20658
|
+
const { data: externalNativeBalanceData, isLoading: isExternalNativeBalanceLoading } = (0, import_react_query49.useQuery)({
|
|
20662
20659
|
retry: false,
|
|
20663
20660
|
enabled: bridgeSender === "direct-wallet" && isSelectedTokenNative && !!directWalletAddress && !!originChain,
|
|
20664
20661
|
queryKey: [EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY, originChain, directWalletAddress],
|
|
@@ -20720,19 +20717,19 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20720
20717
|
isRouteTokenBalanceLoading: isAssetsLoading || isExternalBalanceLoading || isExternalNativeBalanceLoading
|
|
20721
20718
|
};
|
|
20722
20719
|
}
|
|
20723
|
-
var import_core6,
|
|
20720
|
+
var import_core6, import_react_query49, import_react69, import_viem14, import_wagmi5, EXTERNAL_WALLET_BRIDGING_BALANCE_QUERY, EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY;
|
|
20724
20721
|
var init_useBridgeBalance = __esm({
|
|
20725
20722
|
"src/internal/components/SendMenu/hyperbridge/hooks/useBridgeBalance.ts"() {
|
|
20726
|
-
init_constants();
|
|
20727
20723
|
init_SessionContext();
|
|
20728
20724
|
init_i18n();
|
|
20729
20725
|
import_core6 = require("@embarkai/core");
|
|
20730
|
-
|
|
20726
|
+
import_react_query49 = require("@tanstack/react-query");
|
|
20731
20727
|
import_react69 = require("react");
|
|
20732
20728
|
import_viem14 = require("viem");
|
|
20733
20729
|
import_wagmi5 = require("wagmi");
|
|
20734
20730
|
init_useBlockscoutAssets2();
|
|
20735
20731
|
init_useExternalWalletStore();
|
|
20732
|
+
init_BalanceFeedProvider2();
|
|
20736
20733
|
init_useFlowSelector();
|
|
20737
20734
|
init_chains();
|
|
20738
20735
|
init_useBridgeStore();
|
|
@@ -21373,7 +21370,7 @@ function HistoryItem(props) {
|
|
|
21373
21370
|
txStatus
|
|
21374
21371
|
} = props;
|
|
21375
21372
|
const { t } = useT();
|
|
21376
|
-
const qc = (0,
|
|
21373
|
+
const qc = (0, import_react_query50.useQueryClient)();
|
|
21377
21374
|
const address = useSession((st) => st.address);
|
|
21378
21375
|
const warpRoutes = qc.getQueryData([HYPERLANE_WARP_ROUTES_QUERY_KEY, address]);
|
|
21379
21376
|
const assetWarpRoute = warpRoutes?.find((route) => {
|
|
@@ -21498,12 +21495,12 @@ function HistoryStep() {
|
|
|
21498
21495
|
)
|
|
21499
21496
|
] });
|
|
21500
21497
|
}
|
|
21501
|
-
var
|
|
21498
|
+
var import_react_query50, import_dayjs7, import_lucide_react61, import_jsx_runtime100, P_CN3;
|
|
21502
21499
|
var init_HistoryStep = __esm({
|
|
21503
21500
|
"src/internal/components/SendMenu/hyperbridge/steps/HistoryStep.tsx"() {
|
|
21504
21501
|
init_SessionContext();
|
|
21505
21502
|
init_i18n();
|
|
21506
|
-
|
|
21503
|
+
import_react_query50 = require("@tanstack/react-query");
|
|
21507
21504
|
import_dayjs7 = __toESM(require("dayjs"), 1);
|
|
21508
21505
|
import_lucide_react61 = require("lucide-react");
|
|
21509
21506
|
init_tokens();
|
|
@@ -21845,7 +21842,7 @@ function useNicknameResolve(input, options) {
|
|
|
21845
21842
|
clearTimeout(timer);
|
|
21846
21843
|
};
|
|
21847
21844
|
}, [normalized, isNicknameInput, enabled]);
|
|
21848
|
-
const query = (0,
|
|
21845
|
+
const query = (0, import_react_query51.useQuery)({
|
|
21849
21846
|
queryKey: [...QUERY_KEYS.nicknameResolve(debouncedInput), chainId],
|
|
21850
21847
|
queryFn: async () => await resolveNickname(debouncedInput, chainId),
|
|
21851
21848
|
enabled: enabled && isNicknameInput && debouncedInput.length > 0,
|
|
@@ -21878,10 +21875,10 @@ function useNicknameResolve(input, options) {
|
|
|
21878
21875
|
resolvedAddress
|
|
21879
21876
|
};
|
|
21880
21877
|
}
|
|
21881
|
-
var
|
|
21878
|
+
var import_react_query51, import_react75, DEBOUNCE_MS2;
|
|
21882
21879
|
var init_useNicknameResolve = __esm({
|
|
21883
21880
|
"src/hooks/useNicknameResolve.ts"() {
|
|
21884
|
-
|
|
21881
|
+
import_react_query51 = require("@tanstack/react-query");
|
|
21885
21882
|
import_react75 = require("react");
|
|
21886
21883
|
init_nickname();
|
|
21887
21884
|
init_profile();
|
|
@@ -22434,7 +22431,7 @@ function isNftAsset4(asset) {
|
|
|
22434
22431
|
function useTokenBalance(asset) {
|
|
22435
22432
|
const address = useSession((st) => st.address);
|
|
22436
22433
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
22437
|
-
return (0,
|
|
22434
|
+
return (0, import_react_query52.useQuery)({
|
|
22438
22435
|
retry: false,
|
|
22439
22436
|
enabled: !!address && !!chainConfig?.id && !!asset?.symbol,
|
|
22440
22437
|
refetchInterval: 5e3,
|
|
@@ -22498,11 +22495,11 @@ function useTokenBalance(asset) {
|
|
|
22498
22495
|
}
|
|
22499
22496
|
});
|
|
22500
22497
|
}
|
|
22501
|
-
var
|
|
22498
|
+
var import_react_query52, import_viem18, SEND_TOKEN_BALANCE_QUERY_KEY;
|
|
22502
22499
|
var init_useTokenBalance = __esm({
|
|
22503
22500
|
"src/internal/components/SendMenu/send/useTokenBalance.ts"() {
|
|
22504
22501
|
init_SessionContext();
|
|
22505
|
-
|
|
22502
|
+
import_react_query52 = require("@tanstack/react-query");
|
|
22506
22503
|
import_viem18 = require("viem");
|
|
22507
22504
|
SEND_TOKEN_BALANCE_QUERY_KEY = "current-chain-send-token-balance-query";
|
|
22508
22505
|
}
|
|
@@ -22730,7 +22727,7 @@ function ConfirmSendStep(props) {
|
|
|
22730
22727
|
const isNft = isNftAsset3(selectedAsset);
|
|
22731
22728
|
const isSecurity = isSecurityToken2(selectedAsset);
|
|
22732
22729
|
const effectiveAddress = isNicknameInput ? resolvedAddress : recipient;
|
|
22733
|
-
const { mutate: handleConfirm, isPending: isTransactionPending } = (0,
|
|
22730
|
+
const { mutate: handleConfirm, isPending: isTransactionPending } = (0, import_react_query53.useMutation)({
|
|
22734
22731
|
mutationFn: async () => {
|
|
22735
22732
|
if (!effectiveAddress || !selectedAsset) return;
|
|
22736
22733
|
setTxStep("pending");
|
|
@@ -22884,12 +22881,12 @@ function ConfirmSendStep(props) {
|
|
|
22884
22881
|
)
|
|
22885
22882
|
] });
|
|
22886
22883
|
}
|
|
22887
|
-
var
|
|
22884
|
+
var import_react_query53, import_lucide_react67, import_jsx_runtime109;
|
|
22888
22885
|
var init_ConfirmSendStep = __esm({
|
|
22889
22886
|
"src/internal/components/SendMenu/send/sendSteps/ConfirmSendStep.tsx"() {
|
|
22890
22887
|
init_SessionContext();
|
|
22891
22888
|
init_i18n();
|
|
22892
|
-
|
|
22889
|
+
import_react_query53 = require("@tanstack/react-query");
|
|
22893
22890
|
import_lucide_react67 = require("lucide-react");
|
|
22894
22891
|
init_priceFormatter();
|
|
22895
22892
|
init_utils2();
|
|
@@ -23299,7 +23296,7 @@ var init_pro_mode = __esm({
|
|
|
23299
23296
|
|
|
23300
23297
|
// src/internal/components/SettingsMenu/constants.ts
|
|
23301
23298
|
var import_lucide_react70, NAV_BUTTONS;
|
|
23302
|
-
var
|
|
23299
|
+
var init_constants8 = __esm({
|
|
23303
23300
|
"src/internal/components/SettingsMenu/constants.ts"() {
|
|
23304
23301
|
import_lucide_react70 = require("lucide-react");
|
|
23305
23302
|
init_icons();
|
|
@@ -23355,7 +23352,7 @@ function SettingsMenu() {
|
|
|
23355
23352
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
23356
23353
|
const settingsButtons = useSettingsButtons();
|
|
23357
23354
|
useProvidersList();
|
|
23358
|
-
(0,
|
|
23355
|
+
(0, import_react_query54.useQuery)({
|
|
23359
23356
|
retry: 1,
|
|
23360
23357
|
enabled: !!address,
|
|
23361
23358
|
queryKey: [QUERY_KEYS.nicknameInfo, address],
|
|
@@ -23397,13 +23394,13 @@ function SettingsMenu() {
|
|
|
23397
23394
|
}
|
|
23398
23395
|
);
|
|
23399
23396
|
}
|
|
23400
|
-
var
|
|
23397
|
+
var import_react_query54, import_lucide_react71, import_react82, import_jsx_runtime112;
|
|
23401
23398
|
var init_SettingsMenu = __esm({
|
|
23402
23399
|
"src/internal/components/SettingsMenu/SettingsMenu.tsx"() {
|
|
23403
23400
|
init_ProviderContext();
|
|
23404
23401
|
init_SessionContext();
|
|
23405
23402
|
init_i18n();
|
|
23406
|
-
|
|
23403
|
+
import_react_query54 = require("@tanstack/react-query");
|
|
23407
23404
|
import_lucide_react71 = require("lucide-react");
|
|
23408
23405
|
import_react82 = require("react");
|
|
23409
23406
|
init_nickname();
|
|
@@ -23414,7 +23411,7 @@ var init_SettingsMenu = __esm({
|
|
|
23414
23411
|
init_utils2();
|
|
23415
23412
|
init_useProvidersList();
|
|
23416
23413
|
init_button();
|
|
23417
|
-
|
|
23414
|
+
init_constants8();
|
|
23418
23415
|
import_jsx_runtime112 = require("react/jsx-runtime");
|
|
23419
23416
|
}
|
|
23420
23417
|
});
|
|
@@ -24271,7 +24268,7 @@ var init_TransactionsGroup = __esm({
|
|
|
24271
24268
|
|
|
24272
24269
|
// src/internal/components/TransactionsMenu/TransactionsMenu.tsx
|
|
24273
24270
|
function TransactionsMenu() {
|
|
24274
|
-
const qc = (0,
|
|
24271
|
+
const qc = (0, import_react_query55.useQueryClient)();
|
|
24275
24272
|
const address = useSession((st) => st.address);
|
|
24276
24273
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
24277
24274
|
const { t } = useT();
|
|
@@ -24284,7 +24281,7 @@ function TransactionsMenu() {
|
|
|
24284
24281
|
isLoading: isTxHistoryLoading,
|
|
24285
24282
|
isFetching: isTxHistoryFetching,
|
|
24286
24283
|
error: txHistoryError
|
|
24287
|
-
} = (0,
|
|
24284
|
+
} = (0, import_react_query55.useQuery)({
|
|
24288
24285
|
retry: false,
|
|
24289
24286
|
enabled: !!address && !!chainConfig?.id && historySupported,
|
|
24290
24287
|
queryKey: [TRANSACTIONS_HISTORY_QUERY_KEY, chainConfig.id, address],
|
|
@@ -24339,12 +24336,12 @@ function TransactionsMenu() {
|
|
|
24339
24336
|
}
|
|
24340
24337
|
);
|
|
24341
24338
|
}
|
|
24342
|
-
var
|
|
24339
|
+
var import_react_query55, import_lucide_react74, import_react83, import_jsx_runtime115;
|
|
24343
24340
|
var init_TransactionsMenu = __esm({
|
|
24344
24341
|
"src/internal/components/TransactionsMenu/TransactionsMenu.tsx"() {
|
|
24345
24342
|
init_SessionContext();
|
|
24346
24343
|
init_i18n();
|
|
24347
|
-
|
|
24344
|
+
import_react_query55 = require("@tanstack/react-query");
|
|
24348
24345
|
import_lucide_react74 = require("lucide-react");
|
|
24349
24346
|
import_react83 = require("react");
|
|
24350
24347
|
init_useLayoutDataStore();
|
|
@@ -24635,7 +24632,7 @@ var init_package = __esm({
|
|
|
24635
24632
|
"package.json"() {
|
|
24636
24633
|
package_default = {
|
|
24637
24634
|
name: "@embarkai/ui-kit",
|
|
24638
|
-
version: "0.4.
|
|
24635
|
+
version: "0.4.66",
|
|
24639
24636
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
24640
24637
|
type: "module",
|
|
24641
24638
|
main: "./dist/index.cjs",
|
|
@@ -24737,7 +24734,7 @@ var init_package = __esm({
|
|
|
24737
24734
|
|
|
24738
24735
|
// src/internal/components/Footer/Footer.tsx
|
|
24739
24736
|
function Footer() {
|
|
24740
|
-
const qc = (0,
|
|
24737
|
+
const qc = (0, import_react_query56.useQueryClient)();
|
|
24741
24738
|
const { callbacksRef, config } = useProviderConfig();
|
|
24742
24739
|
const { t } = useT();
|
|
24743
24740
|
const address = useSession((st) => st.address);
|
|
@@ -24754,7 +24751,7 @@ function Footer() {
|
|
|
24754
24751
|
}
|
|
24755
24752
|
}
|
|
24756
24753
|
});
|
|
24757
|
-
const { mutate: disconnect, isPending: isDisconnecting } = (0,
|
|
24754
|
+
const { mutate: disconnect, isPending: isDisconnecting } = (0, import_react_query56.useMutation)({
|
|
24758
24755
|
mutationFn: async (disconnectAddress) => {
|
|
24759
24756
|
if (!disconnectAddress) throw new Error("No address to disconnect");
|
|
24760
24757
|
const { setError, setStatus, setIsLoading } = useSession.getState();
|
|
@@ -24847,7 +24844,7 @@ function Footer() {
|
|
|
24847
24844
|
}
|
|
24848
24845
|
);
|
|
24849
24846
|
}
|
|
24850
|
-
var
|
|
24847
|
+
var import_react_query56, import_lucide_react75, import_wagmi7, import_jsx_runtime117;
|
|
24851
24848
|
var init_Footer = __esm({
|
|
24852
24849
|
"src/internal/components/Footer/Footer.tsx"() {
|
|
24853
24850
|
init_package();
|
|
@@ -24855,7 +24852,7 @@ var init_Footer = __esm({
|
|
|
24855
24852
|
init_ProviderContext();
|
|
24856
24853
|
init_SessionContext();
|
|
24857
24854
|
init_i18n();
|
|
24858
|
-
|
|
24855
|
+
import_react_query56 = require("@tanstack/react-query");
|
|
24859
24856
|
import_lucide_react75 = require("lucide-react");
|
|
24860
24857
|
import_wagmi7 = require("wagmi");
|
|
24861
24858
|
init_auth();
|
|
@@ -24864,7 +24861,7 @@ var init_Footer = __esm({
|
|
|
24864
24861
|
init_useLayoutStore();
|
|
24865
24862
|
init_utils2();
|
|
24866
24863
|
init_useExternalWalletStore();
|
|
24867
|
-
|
|
24864
|
+
init_constants5();
|
|
24868
24865
|
init_button();
|
|
24869
24866
|
import_jsx_runtime117 = require("react/jsx-runtime");
|
|
24870
24867
|
}
|
|
@@ -25327,7 +25324,7 @@ var init_TssManager = __esm({
|
|
|
25327
25324
|
|
|
25328
25325
|
// src/internal/components/WalletConnectHandler.tsx
|
|
25329
25326
|
function WalletConnectHandler() {
|
|
25330
|
-
const qc = (0,
|
|
25327
|
+
const qc = (0, import_react_query57.useQueryClient)();
|
|
25331
25328
|
const { callbacksRef } = useProviderConfig();
|
|
25332
25329
|
const passportWalletAddress = useSession((st) => st.address);
|
|
25333
25330
|
const { address: walletAddress, isConnected, chain, connector } = (0, import_wagmi8.useAccount)();
|
|
@@ -25455,7 +25452,7 @@ function WalletConnectHandler() {
|
|
|
25455
25452
|
}
|
|
25456
25453
|
}, [isWalletLinking, setIsWalletLinking, disconnect]);
|
|
25457
25454
|
const isAuthFlow = !passportWalletAddress;
|
|
25458
|
-
const { mutate: handleWalletSign, isPending: isWalletSigning } = (0,
|
|
25455
|
+
const { mutate: handleWalletSign, isPending: isWalletSigning } = (0, import_react_query57.useMutation)({
|
|
25459
25456
|
mutationFn: async (payload) => {
|
|
25460
25457
|
const { chainId, signingWalletAddress } = payload;
|
|
25461
25458
|
if (!signingWalletAddress || !chainId) {
|
|
@@ -25588,14 +25585,14 @@ function WalletConnectHandler() {
|
|
|
25588
25585
|
]);
|
|
25589
25586
|
return null;
|
|
25590
25587
|
}
|
|
25591
|
-
var import_rainbowkit2,
|
|
25588
|
+
var import_rainbowkit2, import_react_query57, import_react90, import_wagmi8;
|
|
25592
25589
|
var init_WalletConnectHandler = __esm({
|
|
25593
25590
|
"src/internal/components/WalletConnectHandler.tsx"() {
|
|
25594
25591
|
init_ProviderContext();
|
|
25595
25592
|
init_SessionContext();
|
|
25596
25593
|
init_linkedProfiles();
|
|
25597
25594
|
import_rainbowkit2 = require("@rainbow-me/rainbowkit");
|
|
25598
|
-
|
|
25595
|
+
import_react_query57 = require("@tanstack/react-query");
|
|
25599
25596
|
import_react90 = __toESM(require("react"), 1);
|
|
25600
25597
|
import_wagmi8 = require("wagmi");
|
|
25601
25598
|
init_wallet();
|
|
@@ -28620,13 +28617,14 @@ __export(index_exports, {
|
|
|
28620
28617
|
UserOperationTimeoutError: () => UserOperationTimeoutError,
|
|
28621
28618
|
UserRejectedError: () => UserRejectedError,
|
|
28622
28619
|
WALLET_ICONS: () => WALLET_ICONS,
|
|
28623
|
-
|
|
28620
|
+
checkWrapedTokenSymbol: () => checkWrapedTokenSymbol,
|
|
28624
28621
|
combineI18NResources: () => combineI18NResources,
|
|
28625
28622
|
createAccountAbstractionError: () => createAccountAbstractionError,
|
|
28626
28623
|
deployAccount: () => deployAccount,
|
|
28627
28624
|
destroyIframeManager: () => destroyIframeManager,
|
|
28628
28625
|
generateFingerprint: () => generateFingerprint,
|
|
28629
28626
|
getAllSmartAccounts: () => getAllSmartAccounts,
|
|
28627
|
+
getAssetRate: () => getAssetRate,
|
|
28630
28628
|
getAvailableLanguages: () => getAvailableLanguages,
|
|
28631
28629
|
getExplorerUrl: () => getExplorerUrl,
|
|
28632
28630
|
getIframeManager: () => getIframeManager,
|
|
@@ -28652,6 +28650,7 @@ __export(index_exports, {
|
|
|
28652
28650
|
useAccountSession: () => useAccountSession,
|
|
28653
28651
|
useActiveChainId: () => useActiveChainId,
|
|
28654
28652
|
useAddress: () => useAddress,
|
|
28653
|
+
useAssetUsdtRate: () => useAssetUsdtRate,
|
|
28655
28654
|
useAssets: () => useAssets,
|
|
28656
28655
|
useBalance: () => useBalance,
|
|
28657
28656
|
useBlockscoutAssets: () => useBlockscoutAssets,
|
|
@@ -29953,6 +29952,7 @@ init_bundler();
|
|
|
29953
29952
|
init_auth();
|
|
29954
29953
|
init_profile();
|
|
29955
29954
|
init_SecurityMenu2();
|
|
29955
|
+
init_BalanceFeedProvider2();
|
|
29956
29956
|
init_linkedProfiles();
|
|
29957
29957
|
init_nickname_fingerprint();
|
|
29958
29958
|
init_errors();
|
|
@@ -30253,7 +30253,6 @@ init_tokens();
|
|
|
30253
30253
|
init_wallets();
|
|
30254
30254
|
|
|
30255
30255
|
// src/index.ts
|
|
30256
|
-
init_constants();
|
|
30257
30256
|
init_i18n();
|
|
30258
30257
|
|
|
30259
30258
|
// src/internal/exportedQueryKeys.ts
|
|
@@ -30298,13 +30297,14 @@ autorun();
|
|
|
30298
30297
|
UserOperationTimeoutError,
|
|
30299
30298
|
UserRejectedError,
|
|
30300
30299
|
WALLET_ICONS,
|
|
30301
|
-
|
|
30300
|
+
checkWrapedTokenSymbol,
|
|
30302
30301
|
combineI18NResources,
|
|
30303
30302
|
createAccountAbstractionError,
|
|
30304
30303
|
deployAccount,
|
|
30305
30304
|
destroyIframeManager,
|
|
30306
30305
|
generateFingerprint,
|
|
30307
30306
|
getAllSmartAccounts,
|
|
30307
|
+
getAssetRate,
|
|
30308
30308
|
getAvailableLanguages,
|
|
30309
30309
|
getExplorerUrl,
|
|
30310
30310
|
getIframeManager,
|
|
@@ -30330,6 +30330,7 @@ autorun();
|
|
|
30330
30330
|
useAccountSession,
|
|
30331
30331
|
useActiveChainId,
|
|
30332
30332
|
useAddress,
|
|
30333
|
+
useAssetUsdtRate,
|
|
30333
30334
|
useAssets,
|
|
30334
30335
|
useBalance,
|
|
30335
30336
|
useBlockscoutAssets,
|