@vechain/vechain-kit 1.6.0 → 1.6.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.
package/dist/index.js CHANGED
@@ -4159,6 +4159,7 @@ var useSendTransaction = ({
4159
4159
  }
4160
4160
  return "success";
4161
4161
  }
4162
+ return "waitingConfirmation";
4162
4163
  }
4163
4164
  return "ready";
4164
4165
  }, [
@@ -5983,7 +5984,7 @@ var AddressDisplay = ({
5983
5984
  // package.json
5984
5985
  var package_default = {
5985
5986
  name: "@vechain/vechain-kit",
5986
- version: "1.6.0",
5987
+ version: "1.6.2",
5987
5988
  private: false,
5988
5989
  homepage: "https://github.com/vechain/vechain-kit",
5989
5990
  repository: "github:vechain/vechain-kit",
@@ -14567,7 +14568,7 @@ var CustomizationContent = ({
14567
14568
  reason: "back_button"
14568
14569
  });
14569
14570
  }
14570
- setCurrentContent("profile");
14571
+ setCurrentContent(initialContentSource);
14571
14572
  };
14572
14573
  return /* @__PURE__ */ jsxs(Box, { children: [
14573
14574
  /* @__PURE__ */ jsxs(StickyHeaderContainer, { children: [
@@ -14925,12 +14926,8 @@ var CustomizationSummaryContent = ({
14925
14926
  onDoneRedirectContent
14926
14927
  }) => {
14927
14928
  const { t } = useTranslation();
14928
- const { darkMode: isDark } = useVeChainKitConfig();
14929
+ const { darkMode: isDark, network } = useVeChainKitConfig();
14929
14930
  const { account, connectedWallet } = useWallet();
14930
- const { refresh: refreshMetadata } = useRefreshMetadata(
14931
- account?.domain ?? "",
14932
- account?.address ?? ""
14933
- );
14934
14931
  const { data: upgradeRequired } = useUpgradeRequired(
14935
14932
  account?.address ?? "",
14936
14933
  connectedWallet?.address ?? "",
@@ -14945,6 +14942,7 @@ var CustomizationSummaryContent = ({
14945
14942
  });
14946
14943
  const domain = account?.domain ?? "";
14947
14944
  const { data: resolverAddress } = useGetResolverAddress(domain);
14945
+ const queryClient = useQueryClient();
14948
14946
  const {
14949
14947
  sendTransaction: updateTextRecord,
14950
14948
  txReceipt,
@@ -14977,7 +14975,7 @@ var CustomizationSummaryContent = ({
14977
14975
  }
14978
14976
  });
14979
14977
  try {
14980
- await refreshMetadata();
14978
+ await refresh();
14981
14979
  } catch (error) {
14982
14980
  console.error("Error refreshing data:", error);
14983
14981
  }
@@ -15070,6 +15068,22 @@ var CustomizationSummaryContent = ({
15070
15068
  }
15071
15069
  });
15072
15070
  };
15071
+ const refresh = async () => {
15072
+ queryClient.setQueryData(
15073
+ getAvatarQueryKey(domain, network.type),
15074
+ convertUriToUrl("ipfs://" + changes.avatarIpfsHash, network.type)
15075
+ );
15076
+ queryClient.setQueryData(
15077
+ getAvatarOfAddressQueryKey(account?.address ?? ""),
15078
+ convertUriToUrl("ipfs://" + changes.avatarIpfsHash, network.type)
15079
+ );
15080
+ await queryClient.invalidateQueries({
15081
+ queryKey: getTextRecordsQueryKey(domain, network.type)
15082
+ });
15083
+ await queryClient.refetchQueries({
15084
+ queryKey: getTextRecordsQueryKey(domain, network.type)
15085
+ });
15086
+ };
15073
15087
  return /* @__PURE__ */ jsxs(Box, { as: "form", onSubmit: handleSubmit(onSubmit), children: [
15074
15088
  /* @__PURE__ */ jsxs(StickyHeaderContainer, { children: [
15075
15089
  /* @__PURE__ */ jsx(ModalHeader, { children: t("Confirm Changes") }),
@@ -15149,7 +15163,8 @@ var ProfileContent = ({
15149
15163
  setCurrentContent({
15150
15164
  type: "account-customization",
15151
15165
  props: {
15152
- setCurrentContent
15166
+ setCurrentContent,
15167
+ initialContentSource: "profile"
15153
15168
  }
15154
15169
  });
15155
15170
  },