@vechain/vechain-kit 2.0.0-rc.6 → 2.0.0-rc.7

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
@@ -4825,7 +4825,7 @@ var AddressDisplay = ({
4825
4825
 
4826
4826
  // package.json
4827
4827
  var package_default = {
4828
- version: "2.0.0-rc.6"};
4828
+ version: "2.0.0-rc.7"};
4829
4829
  var VersionFooter = ({ ...props }) => {
4830
4830
  const { darkMode: isDark } = useVeChainKitConfig();
4831
4831
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -17855,8 +17855,13 @@ var getAllEventLogs = async ({
17855
17855
  };
17856
17856
 
17857
17857
  // src/hooks/thor/transactions/transactionUtils.ts
17858
- var estimateTxGas = async (thor, clauses, caller) => {
17859
- const response = await thor.transactions.estimateGas(clauses, caller);
17858
+ var estimateTxGas = async (thor, clauses, caller, options = {
17859
+ revision: "next"
17860
+ // default revision is next
17861
+ }) => {
17862
+ const response = await thor.transactions.estimateGas(clauses, caller, {
17863
+ ...options
17864
+ });
17860
17865
  if (response.reverted) throw new Error("Failed to estimate gas");
17861
17866
  return response.totalGas;
17862
17867
  };
@@ -17866,7 +17871,8 @@ var useSendTransaction = ({
17866
17871
  onTxConfirmed,
17867
17872
  onTxFailedOrCancelled,
17868
17873
  suggestedMaxGas,
17869
- privyUIOptions
17874
+ privyUIOptions,
17875
+ gasPadding
17870
17876
  }) => {
17871
17877
  const thor = dappKitReact.useThor();
17872
17878
  const { signer } = dappKitReact.useWallet();
@@ -17893,7 +17899,12 @@ var useSendTransaction = ({
17893
17899
  estimatedGas = await estimateTxGas(
17894
17900
  thor,
17895
17901
  [..._clauses],
17896
- signerAccountAddress
17902
+ signerAccountAddress,
17903
+ {
17904
+ revision: "next",
17905
+ ...gasPadding ? { gasPadding } : {}
17906
+ //If gasPadding is provided, use it, otherwise it will apply only revision
17907
+ }
17897
17908
  );
17898
17909
  } catch (e) {
17899
17910
  console.error("Gas estimation failed", e);