@bolt-liquidity-hq/sui-client 0.1.0-beta.23 → 0.1.0-beta.25

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
@@ -78,7 +78,7 @@ var MainnetContracts = {
78
78
  oracle: "0xfa3975b98f3d0e3df18ed88ae6e69db31836b3f4212df02fae144b1e5a89ca8e",
79
79
  router: " "
80
80
  };
81
- var MainnetPackageId = "0xbffcccd9d24e319c729e724a0a0e6d0a403b24a03f643da4bbdb0fe6c925f82b";
81
+ var MainnetPackageId = "0x71a61b841cc90a74607e99084e47818a7d1424649f4047ad375d9c2a4111e658";
82
82
  var MainnetPoolGlobalConfigId = "0x7bcd5035a991f42fa84c5a42216b5638cb3f1a8c4f065063093b0a3d5f165d63";
83
83
  var MainnetNativeTokenDenom = SUI_TOKEN_DENOM;
84
84
  var MainnetAssets = {
@@ -724,37 +724,32 @@ var signAndExecuteTx = async (suiClient, signer, target, args, typeArguments, tr
724
724
  arguments: txArgs,
725
725
  typeArguments
726
726
  });
727
- try {
728
- if ("toSuiAddress" in signer) {
729
- const result = await suiClient.signAndExecuteTransaction({
730
- signer,
731
- transaction: tx,
732
- options
733
- });
734
- if (result.effects?.status.status === "success") {
735
- return result;
736
- } else {
737
- throw new import_core4.TransactionFailedError(result.digest, result.effects?.status.error, { result });
738
- }
727
+ if ("toSuiAddress" in signer) {
728
+ const result = await suiClient.signAndExecuteTransaction({
729
+ signer,
730
+ transaction: tx,
731
+ options
732
+ });
733
+ if (result.effects?.status.status === "success") {
734
+ return result;
739
735
  } else {
740
- const result = await signer.signAndExecuteTransaction({
741
- transaction: tx
742
- });
743
- if (!result.digest) {
744
- throw new import_core4.TransactionFailedError("not found");
745
- }
746
- const fullTx = await suiClient.waitForTransaction({
747
- digest: result.digest,
748
- options
749
- });
750
- return fullTx;
736
+ throw new import_core4.TransactionFailedError(result.digest, result.effects?.status.error, { result });
751
737
  }
752
- } catch (error) {
753
- throw import_core4.UnexpectedError.from(error, "Failed to execute transaction", {
754
- target: targetString,
755
- args,
756
- typeArguments
738
+ } else {
739
+ const result = await signer.signAndExecuteTransaction({
740
+ transaction: tx
757
741
  });
742
+ if (!result.digest) {
743
+ throw new import_core4.TransactionFailedError("not found");
744
+ }
745
+ const fullTx = await suiClient.waitForTransaction({
746
+ digest: result.digest,
747
+ options
748
+ });
749
+ if (fullTx.effects?.status.status !== "success") {
750
+ throw new import_core4.TransactionFailedError(result.digest, fullTx.effects?.status.error, { result });
751
+ }
752
+ return fullTx;
758
753
  }
759
754
  };
760
755
  var estimateTxGasPrice = async (suiClient, senderAddress, target, args, typeArguments, transaction, gasAdjustment = import_core4.DEFAULT_GAS_ADJUSTMENT) => {