@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.js CHANGED
@@ -23,7 +23,7 @@ var MainnetContracts = {
23
23
  oracle: "0xfa3975b98f3d0e3df18ed88ae6e69db31836b3f4212df02fae144b1e5a89ca8e",
24
24
  router: " "
25
25
  };
26
- var MainnetPackageId = "0xbffcccd9d24e319c729e724a0a0e6d0a403b24a03f643da4bbdb0fe6c925f82b";
26
+ var MainnetPackageId = "0x71a61b841cc90a74607e99084e47818a7d1424649f4047ad375d9c2a4111e658";
27
27
  var MainnetPoolGlobalConfigId = "0x7bcd5035a991f42fa84c5a42216b5638cb3f1a8c4f065063093b0a3d5f165d63";
28
28
  var MainnetNativeTokenDenom = SUI_TOKEN_DENOM;
29
29
  var MainnetAssets = {
@@ -674,37 +674,32 @@ var signAndExecuteTx = async (suiClient, signer, target, args, typeArguments, tr
674
674
  arguments: txArgs,
675
675
  typeArguments
676
676
  });
677
- try {
678
- if ("toSuiAddress" in signer) {
679
- const result = await suiClient.signAndExecuteTransaction({
680
- signer,
681
- transaction: tx,
682
- options
683
- });
684
- if (result.effects?.status.status === "success") {
685
- return result;
686
- } else {
687
- throw new TransactionFailedError2(result.digest, result.effects?.status.error, { result });
688
- }
677
+ if ("toSuiAddress" in signer) {
678
+ const result = await suiClient.signAndExecuteTransaction({
679
+ signer,
680
+ transaction: tx,
681
+ options
682
+ });
683
+ if (result.effects?.status.status === "success") {
684
+ return result;
689
685
  } else {
690
- const result = await signer.signAndExecuteTransaction({
691
- transaction: tx
692
- });
693
- if (!result.digest) {
694
- throw new TransactionFailedError2("not found");
695
- }
696
- const fullTx = await suiClient.waitForTransaction({
697
- digest: result.digest,
698
- options
699
- });
700
- return fullTx;
686
+ throw new TransactionFailedError2(result.digest, result.effects?.status.error, { result });
701
687
  }
702
- } catch (error) {
703
- throw UnexpectedError2.from(error, "Failed to execute transaction", {
704
- target: targetString,
705
- args,
706
- typeArguments
688
+ } else {
689
+ const result = await signer.signAndExecuteTransaction({
690
+ transaction: tx
707
691
  });
692
+ if (!result.digest) {
693
+ throw new TransactionFailedError2("not found");
694
+ }
695
+ const fullTx = await suiClient.waitForTransaction({
696
+ digest: result.digest,
697
+ options
698
+ });
699
+ if (fullTx.effects?.status.status !== "success") {
700
+ throw new TransactionFailedError2(result.digest, fullTx.effects?.status.error, { result });
701
+ }
702
+ return fullTx;
708
703
  }
709
704
  };
710
705
  var estimateTxGasPrice = async (suiClient, senderAddress, target, args, typeArguments, transaction, gasAdjustment = DEFAULT_GAS_ADJUSTMENT) => {