@ecency/wallets 1.5.1 → 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.
@@ -122,7 +122,10 @@ declare function useImportWallet(username: string, currency: EcencyWalletCurrenc
122
122
  * Basically, this mutation is a convenient wrapper for update profile operation
123
123
  */
124
124
  type SaveWalletInformationOptions = Pick<UseMutationOptions<unknown, Error, EcencyTokenMetadata[]>, "onSuccess" | "onError">;
125
- declare function useSaveWalletInformationToMetadata(username: string, options?: SaveWalletInformationOptions): _tanstack_react_query.UseMutationResult<unknown, Error, EcencyTokenMetadata[], unknown>;
125
+ declare function useSaveWalletInformationToMetadata(username: string, accessToken?: string, auth?: {
126
+ postingKey?: string | null;
127
+ loginType?: string | null;
128
+ }, options?: SaveWalletInformationOptions): _tanstack_react_query.UseMutationResult<unknown, Error, EcencyTokenMetadata[], unknown>;
126
129
 
127
130
  declare function getHiveAssetGeneralInfoQueryOptions(username: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<{
128
131
  name: string;
@@ -876,7 +879,7 @@ declare function withdrawVestingRouteHive<T extends HiveBasedAssetSignType>(payl
876
879
  key: PrivateKey;
877
880
  } : Payload<T>): Promise<unknown>;
878
881
 
879
- declare function useClaimRewards(username: string, onSuccess: () => void): ReturnType<typeof useBroadcastMutation<void>>;
882
+ declare function useClaimRewards(username: string, accessToken: string | undefined, onSuccess: () => void): ReturnType<typeof useBroadcastMutation<void>>;
880
883
 
881
884
  interface PayloadBase {
882
885
  from: string;
@@ -1433,12 +1433,13 @@ async function withdrawVestingRouteHive(payload) {
1433
1433
  return hs.sendOperation(operation, { callback: `https://ecency.com/@${params.from_account}/wallet` }, () => {
1434
1434
  });
1435
1435
  }
1436
- function useClaimRewards(username, onSuccess) {
1436
+ function useClaimRewards(username, accessToken, onSuccess) {
1437
1437
  const { data } = useQuery(getAccountFullQueryOptions(username));
1438
1438
  const queryClient = useQueryClient();
1439
1439
  return useBroadcastMutation(
1440
1440
  ["assets", "hive", "claim-rewards", data?.name],
1441
1441
  username,
1442
+ accessToken,
1442
1443
  () => {
1443
1444
  if (!data) {
1444
1445
  throw new Error("Failed to fetch account while claiming balance");
@@ -4191,10 +4192,14 @@ function getGroupedChainTokens(tokens, defaultShow) {
4191
4192
  )
4192
4193
  );
4193
4194
  }
4194
- function useSaveWalletInformationToMetadata(username, options2) {
4195
+ function useSaveWalletInformationToMetadata(username, accessToken, auth, options2) {
4195
4196
  const queryClient = useQueryClient();
4196
4197
  const { data: accountData } = useQuery(getAccountFullQueryOptions(username));
4197
- const { mutateAsync: updateProfile } = useAccountUpdate(username);
4198
+ const { mutateAsync: updateProfile } = useAccountUpdate(
4199
+ username,
4200
+ accessToken,
4201
+ auth
4202
+ );
4198
4203
  return useMutation({
4199
4204
  mutationKey: [
4200
4205
  "ecency-wallets",