@vechain/vechain-kit 1.6.0 → 1.6.1

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