@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.cjs CHANGED
@@ -4165,6 +4165,7 @@ var useSendTransaction = ({
4165
4165
  }
4166
4166
  return "success";
4167
4167
  }
4168
+ return "waitingConfirmation";
4168
4169
  }
4169
4170
  return "ready";
4170
4171
  }, [
@@ -5989,7 +5990,7 @@ var AddressDisplay = ({
5989
5990
  // package.json
5990
5991
  var package_default = {
5991
5992
  name: "@vechain/vechain-kit",
5992
- version: "1.6.0",
5993
+ version: "1.6.2",
5993
5994
  private: false,
5994
5995
  homepage: "https://github.com/vechain/vechain-kit",
5995
5996
  repository: "github:vechain/vechain-kit",
@@ -14573,7 +14574,7 @@ var CustomizationContent = ({
14573
14574
  reason: "back_button"
14574
14575
  });
14575
14576
  }
14576
- setCurrentContent("profile");
14577
+ setCurrentContent(initialContentSource);
14577
14578
  };
14578
14579
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
14579
14580
  /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
@@ -14931,12 +14932,8 @@ var CustomizationSummaryContent = ({
14931
14932
  onDoneRedirectContent
14932
14933
  }) => {
14933
14934
  const { t } = reactI18next.useTranslation();
14934
- const { darkMode: isDark } = useVeChainKitConfig();
14935
+ const { darkMode: isDark, network } = useVeChainKitConfig();
14935
14936
  const { account, connectedWallet } = useWallet();
14936
- const { refresh: refreshMetadata } = useRefreshMetadata(
14937
- account?.domain ?? "",
14938
- account?.address ?? ""
14939
- );
14940
14937
  const { data: upgradeRequired } = useUpgradeRequired(
14941
14938
  account?.address ?? "",
14942
14939
  connectedWallet?.address ?? "",
@@ -14951,6 +14948,7 @@ var CustomizationSummaryContent = ({
14951
14948
  });
14952
14949
  const domain = account?.domain ?? "";
14953
14950
  const { data: resolverAddress } = useGetResolverAddress(domain);
14951
+ const queryClient = reactQuery.useQueryClient();
14954
14952
  const {
14955
14953
  sendTransaction: updateTextRecord,
14956
14954
  txReceipt,
@@ -14983,7 +14981,7 @@ var CustomizationSummaryContent = ({
14983
14981
  }
14984
14982
  });
14985
14983
  try {
14986
- await refreshMetadata();
14984
+ await refresh();
14987
14985
  } catch (error) {
14988
14986
  console.error("Error refreshing data:", error);
14989
14987
  }
@@ -15076,6 +15074,22 @@ var CustomizationSummaryContent = ({
15076
15074
  }
15077
15075
  });
15078
15076
  };
15077
+ const refresh = async () => {
15078
+ queryClient.setQueryData(
15079
+ getAvatarQueryKey(domain, network.type),
15080
+ chunkIHFWUAH2_cjs.convertUriToUrl("ipfs://" + changes.avatarIpfsHash, network.type)
15081
+ );
15082
+ queryClient.setQueryData(
15083
+ getAvatarOfAddressQueryKey(account?.address ?? ""),
15084
+ chunkIHFWUAH2_cjs.convertUriToUrl("ipfs://" + changes.avatarIpfsHash, network.type)
15085
+ );
15086
+ await queryClient.invalidateQueries({
15087
+ queryKey: getTextRecordsQueryKey(domain, network.type)
15088
+ });
15089
+ await queryClient.refetchQueries({
15090
+ queryKey: getTextRecordsQueryKey(domain, network.type)
15091
+ });
15092
+ };
15079
15093
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "form", onSubmit: handleSubmit(onSubmit), children: [
15080
15094
  /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
15081
15095
  /* @__PURE__ */ jsxRuntime.jsx(react.ModalHeader, { children: t("Confirm Changes") }),
@@ -15155,7 +15169,8 @@ var ProfileContent = ({
15155
15169
  setCurrentContent({
15156
15170
  type: "account-customization",
15157
15171
  props: {
15158
- setCurrentContent
15172
+ setCurrentContent,
15173
+ initialContentSource: "profile"
15159
15174
  }
15160
15175
  });
15161
15176
  },