@ecency/wallets 1.5.0 → 1.5.2

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.
@@ -211,7 +211,14 @@ function useGetExternalWalletBalanceQuery(currency, address) {
211
211
  function useSeedPhrase(username) {
212
212
  return reactQuery.useQuery({
213
213
  queryKey: ["ecency-wallets", "seed", username],
214
- queryFn: async () => bip39__default.default.generateMnemonic(128)
214
+ queryFn: async () => bip39__default.default.generateMnemonic(128),
215
+ // CRITICAL: Prevent seed regeneration - cache forever
216
+ // Once generated, the seed must NEVER change to ensure consistency between:
217
+ // 1. Displayed seed phrase
218
+ // 2. Downloaded seed file
219
+ // 3. Keys sent to API for account creation
220
+ staleTime: Infinity,
221
+ gcTime: Infinity
215
222
  });
216
223
  }
217
224
  var options = {
@@ -1452,12 +1459,13 @@ async function withdrawVestingRouteHive(payload) {
1452
1459
  return hs__default.default.sendOperation(operation, { callback: `https://ecency.com/@${params.from_account}/wallet` }, () => {
1453
1460
  });
1454
1461
  }
1455
- function useClaimRewards(username, onSuccess) {
1462
+ function useClaimRewards(username, accessToken, onSuccess) {
1456
1463
  const { data } = reactQuery.useQuery(sdk.getAccountFullQueryOptions(username));
1457
1464
  const queryClient = reactQuery.useQueryClient();
1458
1465
  return sdk.useBroadcastMutation(
1459
1466
  ["assets", "hive", "claim-rewards", data?.name],
1460
1467
  username,
1468
+ accessToken,
1461
1469
  () => {
1462
1470
  if (!data) {
1463
1471
  throw new Error("Failed to fetch account while claiming balance");
@@ -4210,10 +4218,14 @@ function getGroupedChainTokens(tokens, defaultShow) {
4210
4218
  )
4211
4219
  );
4212
4220
  }
4213
- function useSaveWalletInformationToMetadata(username, options2) {
4221
+ function useSaveWalletInformationToMetadata(username, accessToken, auth, options2) {
4214
4222
  const queryClient = reactQuery.useQueryClient();
4215
4223
  const { data: accountData } = reactQuery.useQuery(sdk.getAccountFullQueryOptions(username));
4216
- const { mutateAsync: updateProfile } = sdk.useAccountUpdate(username);
4224
+ const { mutateAsync: updateProfile } = sdk.useAccountUpdate(
4225
+ username,
4226
+ accessToken,
4227
+ auth
4228
+ );
4217
4229
  return reactQuery.useMutation({
4218
4230
  mutationKey: [
4219
4231
  "ecency-wallets",